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

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

Issue 2036663003: Establish mojo service between Canvas (blink) and SurfaceManager (browser) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN build in android_dbg_recipe Created 4 years, 6 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: 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 3fca8d69353d0607e53a5837bceffd04d0eed656..bc7980cffdbe683be401b2fe88390a6a0439c866 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"
@@ -1174,9 +1175,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

Powered by Google App Engine
This is Rietveld 408576698