summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-05-03 14:39:35 -0700
committerNicolas Roard <nicolasroard@google.com>2012-05-03 14:57:33 -0700
commit44fc37bf2a57490f319e5ddd4f692abf235cb9ca (patch)
tree2b7db852a98ff2c1f2fca046b532d455061f93f1 /Source/WebCore/platform/graphics/android/rendering/Surface.cpp
parente859a34171f2a36877d95197d118d962078f8aa0 (diff)
downloadexternal_webkit-44fc37bf2a57490f319e5ddd4f692abf235cb9ca.zip
external_webkit-44fc37bf2a57490f319e5ddd4f692abf235cb9ca.tar.gz
external_webkit-44fc37bf2a57490f319e5ddd4f692abf235cb9ca.tar.bz2
Fixed single-surface rendering with fixed-background elements
In single-surface rendering, we did not paint the surface collection correctly if there was more than one child on the base surface (which is the case with fixed-background elements). Change-Id: I6e8d34630060414159b5f13cd302c1dc2165a048
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/Surface.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.cpp12
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;