From a144ac64329978c258faadf3bc484cf4ae6c5d0d Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 14 Mar 2012 21:06:41 -0700 Subject: Canvas on a texture Change-Id: I841b3e021298738c91701068992798a55290a520 --- Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp') diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index 2f9b379..fa620e0 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -25,6 +25,7 @@ #include "AndroidAnimation.h" #include "AndroidLog.h" #include "Animation.h" +#include "CanvasLayer.h" #include "FloatRect.h" #include "FixedPositioning.h" #include "GraphicsContext.h" @@ -119,7 +120,11 @@ GraphicsLayerAndroid::GraphicsLayerAndroid(GraphicsLayerClient* client) : m_foregroundClipLayer(0) { RenderLayer* renderLayer = renderLayerFromClient(m_client); - m_contentLayer = new LayerAndroid(renderLayer); + if (renderLayer && renderLayer->renderer()->isCanvas()) { + m_contentLayer = new CanvasLayer(renderLayer, + static_cast(renderLayer->renderer()->node())); + } else + m_contentLayer = new LayerAndroid(renderLayer); m_dirtyRegion.setEmpty(); gDebugGraphicsLayerAndroidInstances++; } -- cgit v1.1