Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

Issue 7839014: Merge http://trac.webkit.org/changeset/93131 : GraphicsContext3D should allow its hostWindow to b... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698