diff options
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/Surface.cpp | 12 | ||||
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 1 |
2 files changed, 7 insertions, 6 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; diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 4e6ffc6..34740a8 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -824,7 +824,6 @@ BaseLayerAndroid* WebViewCore::createBaseLayer() FixedBackgroundBaseLayerAndroid* baseBackground = new FixedBackgroundBaseLayerAndroid(content); - // TODO -- check we don't have the assumption that baselayer has only one child realBase = new BaseLayerAndroid(0); realBase->setSize(content->width(), content->height()); realBase->addChild(baseBackground); |