OffscreenCanvas.commit() doe not handle multiple HTML canvases properly |
|||||
Issue descriptionThe current mechanism cannot support the attached use case when there are more than 1 html canvases and more than 1 offscreenCanvases, each doing their own painting and commit() independently. The root cause might be the fact that HTMLCanvasElement is sharing the same OffscreenCanvasSurface interface without proper handling of multiple instances.
,
Nov 2 2016
,
Nov 7 2016
The refactor which will handle the resize problem should solve this problem at the same time.
,
Nov 7 2016
Yup, CL (https://codereview.chromium.org/2479563005/) is out waiting for review.
,
Nov 11 2016
I'm not really understanding what an OffscreenCanvasSurface is and what an OffscreenCompositorFrameSink is. Could you please explain the roles of the two classes in your view?
,
Nov 14 2016
Perhaps this diagram explains better: https://www.lucidchart.com/documents/view/ee79924f-2d46-46ee-8da7-9ecd220eb6b1 OffscreenCanvasSurface is a service to connect to the HTMLCanvasElement on the main thread when it is about to create a SurfaceLayer (that requires a SurfaceId in hand, however, in the future when SurfaceId can be created on renderer), the GetSurfaceId IPC may no longer be needed. But even at that time, OffscreenCanvasSurface still has its function to connect renderer/main thread to browser/UI thread. I have plans in OffscreenCanvas resizing to make it a two-way communication. OffscreenCanvasCompositorFrameSink is a service to connect to the OffscreenCanvas on the worker thread.
,
Nov 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/92e403ca88572c004290ab15450ce3f6b030cbbd commit 92e403ca88572c004290ab15450ce3f6b030cbbd Author: xlai <xlai@chromium.org> Date: Thu Nov 17 19:25:05 2016 Create manager to track OffscreenCanvasSurfaceImpl instances OffscreenCanvasSurfaceManager is a singleton in browser UI thread to keep track of OffscreenCanvasSurfaceImpl instances (which connects to renderer/main thread). Each instance corresponds to one single pair of html canvas and its transferred OffscreenCanvas in renderer process and is therefore identified by a unique FrameSinkId. The manager is lazily created. It is useful in two cases: (1) managing the situation of multiple html canvases that have transferred to offscreen. (2) allowing the OffscreenCanvasCompositorFrameSink instance (which connects to OffscreenCanvas on renderer/worker) to connect to its counterpart OffscreenCanvasSurfaceImpl; this is to facilitate OffscreenCanvas resizing workflow implementation in next CLs. BUG= 661605 , 662498 Review-Url: https://codereview.chromium.org/2479563005 Cr-Commit-Position: refs/heads/master@{#432930} [modify] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/browser/BUILD.gn [modify] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/browser/renderer_host/offscreen_canvas_surface_impl.cc [modify] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/browser/renderer_host/offscreen_canvas_surface_impl.h [add] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/browser/renderer_host/offscreen_canvas_surface_manager.cc [add] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/browser/renderer_host/offscreen_canvas_surface_manager.h [add] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc [modify] https://crrev.com/92e403ca88572c004290ab15450ce3f6b030cbbd/content/test/BUILD.gn
,
Dec 19 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by xlai@chromium.org
, Nov 2 2016