summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-03-14 21:06:41 -0700
committerJohn Reck <jreck@google.com>2012-03-20 09:56:23 -0700
commita144ac64329978c258faadf3bc484cf4ae6c5d0d (patch)
treeebc3fdbea6ac1561330d4a94e67305aae495c6b7 /Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
parent640bfa989e82aad4ff79ff786f31a6962c37d8fd (diff)
downloadexternal_webkit-a144ac64329978c258faadf3bc484cf4ae6c5d0d.zip
external_webkit-a144ac64329978c258faadf3bc484cf4ae6c5d0d.tar.gz
external_webkit-a144ac64329978c258faadf3bc484cf4ae6c5d0d.tar.bz2
Canvas on a texture
Change-Id: I841b3e021298738c91701068992798a55290a520
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp7
1 files changed, 6 insertions, 1 deletions
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<HTMLCanvasElement*>(renderLayer->renderer()->node()));
+ } else
+ m_contentLayer = new LayerAndroid(renderLayer);
m_dirtyRegion.setEmpty();
gDebugGraphicsLayerAndroidInstances++;
}