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

Unified Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 379253002: Initial implementation of display list backed 2D canvases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use WebRuntimeFeatures Created 6 years, 5 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
Index: Source/core/html/HTMLCanvasElement.cpp
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 8f6029648c98e1d63d3950ddd6878ee2bc8f46fc..851c31265b041eaa7907b9977c232b19a1369b4e 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -48,6 +48,7 @@
#include "platform/graphics/Canvas2DImageBufferSurface.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
#include "platform/graphics/ImageBuffer.h"
+#include "platform/graphics/RecordingImageBufferSurface.h"
#include "platform/graphics/UnacceleratedImageBufferSurface.h"
#include "platform/graphics/gpu/WebGLImageBufferSurface.h"
#include "platform/transforms/AffineTransform.h"
@@ -444,6 +445,12 @@ PassOwnPtr<ImageBufferSurface> HTMLCanvasElement::createImageBufferSurface(const
if (is3D())
return adoptPtr(new WebGLImageBufferSurface(size(), opacityMode));
+ if (RuntimeEnabledFeatures::displayList2dCanvasEnabled()) {
+ OwnPtr<ImageBufferSurface> surface = adoptPtr(new RecordingImageBufferSurface(size(), opacityMode));
+ if (surface->isValid())
+ return surface.release();
+ }
+
if (shouldAccelerate(deviceSize)) {
if (document().settings())
*msaaSampleCount = document().settings()->accelerated2dCanvasMSAASampleCount();
« no previous file with comments | « no previous file | Source/platform/RuntimeEnabledFeatures.in » ('j') | Source/platform/graphics/ImageBufferSurface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698