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

Unified Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp

Issue 2584643002: Revamp OffscreenCanvas commit flow (Closed)
Patch Set: rebase and fix conflict Created 4 years 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/modules/canvas/HTMLCanvasElementModule.cpp
diff --git a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
index 3345b84017aa8faf2c396eca7f77fe65783a2e77..72dc75e1c9df5126b60100bce63e7b1f8c93ec53 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
@@ -44,12 +44,7 @@ OffscreenCanvas* HTMLCanvasElementModule::transferControlToOffscreen(
return nullptr;
}
- if (!canvas.createSurfaceLayer()) {
- exceptionState.throwDOMException(
- V8Error,
- "Offscreen canvas creation failed due to an internal timeout.");
- return nullptr;
- }
+ canvas.createLayer();
return transferControlToOffscreenInternal(canvas, exceptionState);
}
@@ -72,20 +67,8 @@ OffscreenCanvas* HTMLCanvasElementModule::transferControlToOffscreenInternal(
CanvasSurfaceLayerBridge* bridge = canvas.surfaceLayerBridge();
if (bridge) {
- // If a bridge exists, it means canvas.createSurfaceLayer() has been called
- // and its SurfaceId has been populated as well.
- offscreenCanvas->setSurfaceId(
- bridge->getSurfaceId().frame_sink_id().client_id(),
- bridge->getSurfaceId().frame_sink_id().sink_id(),
- bridge->getSurfaceId().local_frame_id().local_id(),
- bridge->getSurfaceId()
- .local_frame_id()
- .nonce()
- .GetHighForSerialization(),
- bridge->getSurfaceId()
- .local_frame_id()
- .nonce()
- .GetLowForSerialization());
+ offscreenCanvas->setFrameSinkId(bridge->getFrameSinkId().client_id(),
+ bridge->getFrameSinkId().sink_id());
}
return offscreenCanvas;
}
« no previous file with comments | « third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698