Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
index 422ffdb9e524598b4bd4a834cc2c1f9e6c1c414c..f39982453040e09ca08d234965612e28013a5b65 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
@@ -58,6 +58,7 @@ |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/graphics/Canvas2DImageBufferSurface.h" |
#include "platform/graphics/CanvasMetrics.h" |
+#include "platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h" |
#include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
#include "platform/graphics/ImageBuffer.h" |
#include "platform/graphics/RecordingImageBufferSurface.h" |
@@ -1182,9 +1183,12 @@ String HTMLCanvasElement::getIdFromControl(const Element* element) |
return String(); |
} |
-void HTMLCanvasElement::createSurfaceLayerBridge() |
+bool HTMLCanvasElement::createSurfaceLayer() |
{ |
- m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge()); |
+ DCHECK(!m_surfaceLayerBridge); |
+ OwnPtr<CanvasSurfaceLayerBridgeClient> bridgeClient = adoptPtr(new CanvasSurfaceLayerBridgeClientImpl()); |
+ m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge(std::move(bridgeClient))); |
+ return m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height()); |
} |
} // namespace blink |