summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-17 21:00:08 -0700
committerJohn Reck <jreck@google.com>2012-05-17 21:00:08 -0700
commit1e59a334a1203c7be3fff2f9dbf94fee5b879d20 (patch)
tree618ca0dfe4f8262f1487382906d3246067fa490f /Source/WebCore/platform/graphics
parent6af93dd239b6de08c9d86ee7a022148fb5a06643 (diff)
downloadexternal_webkit-1e59a334a1203c7be3fff2f9dbf94fee5b879d20.zip
external_webkit-1e59a334a1203c7be3fff2f9dbf94fee5b879d20.tar.gz
external_webkit-1e59a334a1203c7be3fff2f9dbf94fee5b879d20.tar.bz2
Make sure CanvasLayer isn't merged and is initialized correctly
Bug: 6516775 Change-Id: Ifecddec18d369ba701668be85d4032918fc8d4fa
Diffstat (limited to 'Source/WebCore/platform/graphics')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/CanvasLayer.cpp2
-rw-r--r--Source/WebCore/platform/graphics/android/layers/CanvasLayer.h1
-rw-r--r--Source/WebCore/platform/graphics/android/layers/LayerAndroid.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/CanvasLayer.cpp b/Source/WebCore/platform/graphics/android/layers/CanvasLayer.cpp
index 93806ff..4a7f161 100644
--- a/Source/WebCore/platform/graphics/android/layers/CanvasLayer.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/CanvasLayer.cpp
@@ -52,6 +52,8 @@ CanvasLayer::CanvasLayer(RenderLayer* owner, HTMLCanvasElement* canvas)
{
init();
m_canvas->addObserver(this);
+ // Make sure we initialize in case the canvas has already been laid out
+ canvasResized(m_canvas);
}
CanvasLayer::CanvasLayer(const CanvasLayer& layer)
diff --git a/Source/WebCore/platform/graphics/android/layers/CanvasLayer.h b/Source/WebCore/platform/graphics/android/layers/CanvasLayer.h
index c719451..fce6453 100644
--- a/Source/WebCore/platform/graphics/android/layers/CanvasLayer.h
+++ b/Source/WebCore/platform/graphics/android/layers/CanvasLayer.h
@@ -52,6 +52,7 @@ public:
virtual bool drawGL(bool layerTilesDisabled);
virtual void contentDraw(SkCanvas* canvas, PaintStyle style);
virtual bool needsTexture();
+ virtual bool needsIsolatedSurface() { return true; }
protected:
virtual InvalidateFlags onSetHwAccelerated(bool hwAccelerated);
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
index 52df0cf..9b239ee 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
@@ -281,7 +281,7 @@ public:
Surface* surface() { return m_surface; }
void setIntrinsicallyComposited(bool intCom) { m_intrinsicallyComposited = intCom; }
- bool needsIsolatedSurface() {
+ virtual bool needsIsolatedSurface() {
return (needsTexture() && m_intrinsicallyComposited) || m_animations.size();
}