Index: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp |
=================================================================== |
--- Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (revision 94600) |
+++ Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (working copy) |
@@ -191,9 +191,13 @@ |
bool CanvasRenderingContext2D::paintsIntoCanvasBuffer() const |
{ |
-#if ENABLE(ACCELERATED_2D_CANVAS) |
- if (m_context3D) |
- return m_context3D->context()->paintsIntoCanvasBuffer(); |
+#if ENABLE(ACCELERATED_2D_CANVAS) && USE(ACCELERATED_COMPOSITING) |
+ if (!isAccelerated()) |
+ return true; |
+ |
+ RenderBox* renderBox = canvas()->renderBox(); |
+ if (renderBox && renderBox->hasLayer() && renderBox->layer()->hasAcceleratedCompositing()) |
+ return false; |
#endif |
return true; |
} |
@@ -2047,8 +2051,7 @@ |
} |
if (!m_context3D) { |
- Page* page = canvas()->document()->page(); |
- m_context3D = SharedGraphicsContext3D::create(page->chrome()); |
+ m_context3D = SharedGraphicsContext3D::create(0); |
if (!m_context3D) { |
clearAcceleration(); |
return; |