diff options
author | Nicolas Roard <nicolasroard@google.com> | 2012-05-03 14:59:59 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-03 14:59:59 -0700 |
commit | c896f84c19de80a82235a1ee89abe8076a91296c (patch) | |
tree | 5a803d8d6d19a2ee71eac17cdef904630e917e5f /Source/WebCore | |
parent | c5342b1cfa0d6bf775c53aacd13f90362da78c37 (diff) | |
parent | 44fc37bf2a57490f319e5ddd4f692abf235cb9ca (diff) | |
download | external_webkit-c896f84c19de80a82235a1ee89abe8076a91296c.zip external_webkit-c896f84c19de80a82235a1ee89abe8076a91296c.tar.gz external_webkit-c896f84c19de80a82235a1ee89abe8076a91296c.tar.bz2 |
Merge "Fixed single-surface rendering with fixed-background elements" into jb-dev
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/Surface.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp index 652c165..437b8ff 100644 --- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp @@ -192,10 +192,10 @@ void Surface::prepareGL(bool layerTilesDisabled, bool updateWithBlit) ALOGV("prepareGL on Surf %p, no SurfBack, needsTexture? %d", this, m_surfaceBacking, needsTexture()); - if (!needsTexture()) + if (needsTexture() || (isBase() && layerTilesDisabled)) + m_surfaceBacking = new SurfaceBacking(isBase()); + else return; - - m_surfaceBacking = new SurfaceBacking(isBase()); } if (tilesDisabled) { @@ -351,8 +351,10 @@ bool Surface::paint(SkCanvas* canvas) // In single surface mode, draw layer content onto the base layer if (isBase() && getFirstLayer()->countChildren() - && getFirstLayer()->state()->layersRenderingMode() > GLWebViewState::kClippedTextures) - getFirstLayer()->getChild(0)->drawCanvas(canvas, true, Layer::FlattenedLayers); + && getFirstLayer()->state()->layersRenderingMode() > GLWebViewState::kClippedTextures) { + for (unsigned int i = 0; i < getFirstLayer()->countChildren(); i++) + getFirstLayer()->getChild(i)->drawCanvas(canvas, true, Layer::FlattenedLayers); + } } else { SkAutoCanvasRestore acr(canvas, true); SkMatrix matrix; |