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

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

Issue 7671031: Merge 92520 - [chromium] Accelerated canvas breaks when moving canvases or resources between Pages (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 | « Source/WebCore/html/canvas/CanvasRenderingContext2D.h ('k') | Source/WebCore/page/Page.h » ('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 93254)
+++ Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (working copy)
@@ -66,6 +66,7 @@
#include "ChromeClient.h"
#include "DrawingBuffer.h"
#include "FrameView.h"
+#include "SharedGraphicsContext3D.h"
#if USE(ACCELERATED_COMPOSITING)
#include "RenderLayer.h"
#endif
@@ -142,9 +143,6 @@
#if ENABLE(DASHBOARD_SUPPORT)
, m_usesDashboardCompatibilityMode(usesDashboardCompatibilityMode)
#endif
-#if ENABLE(ACCELERATED_2D_CANVAS)
- , m_context3D(0)
-#endif
{
#if !ENABLE(DASHBOARD_SUPPORT)
ASSERT_UNUSED(usesDashboardCompatibilityMode, !usesDashboardCompatibilityMode);
@@ -195,7 +193,7 @@
{
#if ENABLE(ACCELERATED_2D_CANVAS)
if (m_context3D)
- return m_context3D->paintsIntoCanvasBuffer();
+ return m_context3D->context()->paintsIntoCanvasBuffer();
#endif
return true;
}
@@ -2050,7 +2048,7 @@
if (!m_context3D) {
Page* page = canvas()->document()->page();
- m_context3D = page->sharedGraphicsContext3D();
+ m_context3D = SharedGraphicsContext3D::create(page->chrome());
if (!m_context3D) {
clearAcceleration();
return;
@@ -2063,14 +2061,14 @@
return;
}
} else {
- m_drawingBuffer = m_context3D->createDrawingBuffer(canvas()->size());
+ m_drawingBuffer = m_context3D->context()->createDrawingBuffer(canvas()->size());
if (!m_drawingBuffer) {
clearAcceleration();
return;
}
}
- ctx->setGraphicsContext3D(m_context3D.get(), m_drawingBuffer.get(), canvas()->size());
+ ctx->setGraphicsContext3D(m_context3D->context(), m_drawingBuffer.get(), canvas()->size());
}
#endif
« no previous file with comments | « Source/WebCore/html/canvas/CanvasRenderingContext2D.h ('k') | Source/WebCore/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698