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

Unified Diff: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp

Issue 2345423002: Remove CanvasSurfaceLayerBridgeClient (Closed)
Patch Set: Revert one more thing Created 4 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
Index: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
index 2079366b7d1ef4d6ce15aece37bd2811281b9264..f0f48e1e25aaf34ed0deef26338f8973f5b5199f 100644
--- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
@@ -18,9 +18,9 @@
namespace blink {
-CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(std::unique_ptr<CanvasSurfaceLayerBridgeClient> client)
+CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(mojom::blink::OffscreenCanvasSurfacePtr service)
+ : m_service(std::move(service))
{
- m_client = std::move(client);
}
CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge()
@@ -29,7 +29,7 @@ CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge()
bool CanvasSurfaceLayerBridge::createSurfaceLayer(int canvasWidth, int canvasHeight)
{
- if (!m_client->syncGetSurfaceId(&m_surfaceId))
+ if (!m_service->GetSurfaceId(&m_surfaceId))
return false;
cc::SurfaceLayer::SatisfyCallback satisfyCallback = convertToBaseCallback(WTF::bind(&CanvasSurfaceLayerBridge::satisfyCallback, WTF::unretained(this)));
@@ -44,12 +44,12 @@ bool CanvasSurfaceLayerBridge::createSurfaceLayer(int canvasWidth, int canvasHei
void CanvasSurfaceLayerBridge::satisfyCallback(const cc::SurfaceSequence& sequence)
{
- m_client->asyncSatisfy(sequence);
+ m_service->Satisfy(sequence);
}
void CanvasSurfaceLayerBridge::requireCallback(const cc::SurfaceId& surfaceId, const cc::SurfaceSequence& sequence)
{
- m_client->asyncRequire(surfaceId, sequence);
+ m_service->Require(surfaceId, sequence);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698