summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 19:57:29 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 19:57:29 +0000
commit110b0b695868288938ef2398ace68f4e1193de91 (patch)
treeba63784f77488bd14432293d3af0e5afa038c2c4
parent112eb9ffd329d580b2f4d610518ca8698743e093 (diff)
downloadchromium_src-110b0b695868288938ef2398ace68f4e1193de91.zip
chromium_src-110b0b695868288938ef2398ace68f4e1193de91.tar.gz
chromium_src-110b0b695868288938ef2398ace68f4e1193de91.tar.bz2
Skip the deferred painting workaround when there is a looper.
A looper is used for text with shadows and that seems not working well with the deferred painting workaround. BUG=126266 TEST=Verify fix for issue 126266. Review URL: http://codereview.chromium.org/10356018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135400 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/gfx/render_text.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 3f8de7f..e655ed7 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -257,9 +257,14 @@ void SkiaTextRenderer::DrawPosText(const SkPoint* pos,
// rendered with incorrect gamma when using the fade shader. Draw the text
// to a layer and restore it faded by drawing a rect in kDstIn_Mode mode.
//
+ // Skip this when there is a looper which seems not working well with
+ // deferred paint. Currently a looper is only used for text shadows.
+ //
// TODO(asvitkine): Remove this work-around once the Skia bug is fixed.
// http://code.google.com/p/skia/issues/detail?id=590
- if (!paint_.isLCDRenderText() && paint_.getShader()) {
+ if (!paint_.isLCDRenderText() &&
+ paint_.getShader() &&
+ !paint_.getLooper()) {
deferred_fade_shader_ = paint_.getShader();
paint_.setShader(NULL);
canvas_skia_->saveLayer(&bounds_, NULL);