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

Issue 2036663003: Establish mojo service between Canvas (blink) and SurfaceManager (browser) (Closed)

Created:
4 years, 6 months ago by xlai (Olivia)
Modified:
4 years, 3 months ago
CC:
jbroman, Aaron Boodman, abarth-chromium, ajuma, ajuma+watch_chromium.org, ajuma+watch-canvas_chromium.org, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), haraken, jam, jchaffraix+rendering, leviw+renderwatch, nasko+codewatch_chromium.org, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, qsr+mojo_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, viettrungluu+watch_chromium.org, xidachen, yzshen+watch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Establish mojo service between Canvas (blink) and SurfaceManager (browser) This patch adds a new mojo message pipe between Canvas in blink and the Surface management on browser, to facilitate the out-of-process commit flow from OffscreenCanvas to browser. This patch only implements the first two IPC to ensure SurfaceLayer on renderer, SurfaceId/Surface on browser are created. The implementation can be seen in three parts: client, browser host, and mojo service interface. Some codes are added to an existing layout test to test if the whole workflow works. Client: CanvasSurfaceLayerBridge is HTMLCanvasElement's communicator with SurfaceLayer. It is created only when HTMLCanvasElement.transferControlToOffscreen() is invoked. It has an instance of CanvasSurfaceLayerBridgeClient, which is a virtual interface containing all mojo calls. To create a SurfaceLayer, it sends a sync msg "GetSurfaceId" to browser to retrieve a unique SurfaceId. Immediately after that, it sends an async msg "RequestSurfaceCreation" to request Surface getting created for this particular Id. After that, it creates a SurfaceLayer (with SatisfyCallback and RequireCallback) for HTMLCanvasElement and set the SurfaceId for the layer and registers it to the graphics layer. A unit test is added; it fakes the browser side and mocks the BridgeClient. Browser: OffscreenCanvasSurfaceServiceImpl sits on the other end of the mojo message pipe. It is created when all the mojo connections are registered in render_process_host. It responds to requests from CanvasSurfaceLayerBridge and do SurfaceId generation, SurfaceFactory and Surface creation accordingly. It is a client of SurfaceFactory. Mojo service interface: It is defined in offscreen_canvas_surface_service.mojom. It defines two structs: SurfaceId and SurfaceSequence, that correspondds to that in cc. I use typemaps to convert cc::SurfaceId and cc::SurfaceSequence to the corresponding mojo intermediate structs. BUG=611796, 563852 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d Cr-Commit-Position: refs/heads/master@{#400838}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Change based on fsamuel@'s feedback #

Patch Set 3 : Cleanup #

Patch Set 4 : Fix unit test #

Total comments: 1

Patch Set 5 : Rebase, format, minor edits #

Total comments: 2

Patch Set 6 : Throw away typemaps in Blink #

Total comments: 38

Patch Set 7 : Redo CanvasSurfaceLayerBridge unit test and fix nits from reviewers #

Patch Set 8 : Fixed gyp build #

Patch Set 9 : rebase #

Patch Set 10 : Fix GN build in cast_shell_linux #

Total comments: 1

Patch Set 11 : Fix GN build in android_dbg_recipe #

Total comments: 11

Patch Set 12 : rebase master #

Patch Set 13 : Edit based on jbroman's comment #

Patch Set 14 : Minor Fix on OwnPtr on CanvasSurfaceLayerBridgeTest #

Total comments: 5

Patch Set 15 : Remove Service suffix on mojo interface name #

Total comments: 4

Patch Set 16 : Dangling pointer fix + nits fix #

Patch Set 17 : Rebase master and replace OwnPtr to std::unique_ptr #

Patch Set 18 : OWNERS change on offscreencanvas folder #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+547 lines, -40 lines) Patch
M cc/ipc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -2 lines 0 comments Download
M cc/ipc/surface_id_struct_traits.h View 1 2 3 4 5 6 2 chunks +6 lines, -4 lines 0 comments Download
M cc/ipc/surface_sequence_struct_traits.h View 1 2 3 4 5 6 2 chunks +6 lines, -5 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/renderer_host/offscreen_canvas_surface_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +53 lines, -0 lines 0 comments Download
A content/browser/renderer_host/offscreen_canvas_surface_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +81 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html View 1 2 3 1 chunk +23 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen-expected.txt View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp View 1 2 3 4 1 chunk +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 12 13 14 15 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +17 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +34 lines, -6 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h View 1 2 3 4 5 6 1 chunk +31 lines, -0 lines 4 comments Download
A third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.cpp View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +120 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/blink_typemaps.gni View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/blink.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +16 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/offscreencanvas/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 92 (37 generated)
xlai (Olivia)
This patch creates a new mojo service between canvas and surface management in browser side, ...
4 years, 6 months ago (2016-06-02 22:18:59 UTC) #6
Fady Samuel
My high level comment is I don't think you should be using a sync IPC. ...
4 years, 6 months ago (2016-06-02 22:32:23 UTC) #8
Justin Novosad
https://codereview.chromium.org/2036663003/diff/1/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom File third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom (right): https://codereview.chromium.org/2036663003/diff/1/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom#newcode22 third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom:22: GetSurfaceId() => (SurfaceId surface_id); On 2016/06/02 22:32:23, Fady Samuel ...
4 years, 6 months ago (2016-06-07 19:58:45 UTC) #9
Fady Samuel
https://codereview.chromium.org/2036663003/diff/1/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom File third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom (right): https://codereview.chromium.org/2036663003/diff/1/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom#newcode22 third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom:22: GetSurfaceId() => (SurfaceId surface_id); On 2016/06/07 19:58:44, Justin Novosad ...
4 years, 6 months ago (2016-06-07 20:03:08 UTC) #10
Justin Novosad
On 2016/06/07 20:03:08, Fady Samuel wrote: > https://codereview.chromium.org/2036663003/diff/1/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom > File > third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom > (right): > ...
4 years, 6 months ago (2016-06-07 20:09:26 UTC) #11
Fady Samuel
On 2016/06/07 20:09:26, Justin Novosad wrote: > On 2016/06/07 20:03:08, Fady Samuel wrote: > > ...
4 years, 6 months ago (2016-06-07 20:20:58 UTC) #12
xlai (Olivia)
PTAL. This patch creates a mojo service and implements the first two mojo messages as ...
4 years, 6 months ago (2016-06-10 18:08:04 UTC) #16
Justin Novosad
lgtm with nit for core/html modules/canvas and platform/graphics https://codereview.chromium.org/2036663003/diff/60001/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp File third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp (right): https://codereview.chromium.org/2036663003/diff/60001/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp#newcode27 third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp:27: exceptionState.throwDOMException(V8GeneralError, ...
4 years, 6 months ago (2016-06-10 18:48:16 UTC) #17
Fady Samuel
lgtm
4 years, 6 months ago (2016-06-13 14:54:07 UTC) #19
danakj
https://codereview.chromium.org/2036663003/diff/100001/cc/ipc/cc_ipc.gyp File cc/ipc/cc_ipc.gyp (right): https://codereview.chromium.org/2036663003/diff/100001/cc/ipc/cc_ipc.gyp#newcode68 cc/ipc/cc_ipc.gyp:68: '../../third_party/WebKit/Source/platform/mojo/SurfaceId.typemap', I think you need the inverse. cc does ...
4 years, 6 months ago (2016-06-13 18:38:11 UTC) #20
danakj
https://codereview.chromium.org/2036663003/diff/100001/cc/ipc/cc_ipc.gyp File cc/ipc/cc_ipc.gyp (right): https://codereview.chromium.org/2036663003/diff/100001/cc/ipc/cc_ipc.gyp#newcode68 cc/ipc/cc_ipc.gyp:68: '../../third_party/WebKit/Source/platform/mojo/SurfaceId.typemap', On 2016/06/13 18:38:10, danakj wrote: > I think ...
4 years, 6 months ago (2016-06-13 18:40:04 UTC) #21
xlai (Olivia)
To danakj@: I tried to remove the duplicate typemap in Blink and it works in ...
4 years, 6 months ago (2016-06-13 19:31:27 UTC) #23
danakj
https://codereview.chromium.org/2036663003/diff/140001/cc/ipc/surface_id_struct_traits.h File cc/ipc/surface_id_struct_traits.h (right): https://codereview.chromium.org/2036663003/diff/140001/cc/ipc/surface_id_struct_traits.h#newcode12 cc/ipc/surface_id_struct_traits.h:12: template <typename T> Do you still need these then? ...
4 years, 6 months ago (2016-06-13 20:02:46 UTC) #24
xlai (Olivia)
https://codereview.chromium.org/2036663003/diff/140001/cc/ipc/surface_id_struct_traits.h File cc/ipc/surface_id_struct_traits.h (right): https://codereview.chromium.org/2036663003/diff/140001/cc/ipc/surface_id_struct_traits.h#newcode12 cc/ipc/surface_id_struct_traits.h:12: template <typename T> On 2016/06/13 20:02:46, danakj wrote: > ...
4 years, 6 months ago (2016-06-13 20:20:14 UTC) #25
danakj
cc/ changes LGTM. Let me know if there's anything else you'd like me to look ...
4 years, 6 months ago (2016-06-13 20:24:20 UTC) #26
danakj
https://codereview.chromium.org/2036663003/diff/140001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp (right): https://codereview.chromium.org/2036663003/diff/140001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp#newcode42 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp:42: const cc::SurfaceLayer::SatisfyCallback& satisfyCallback = createBaseCallback(bind<cc::SurfaceSequence>(&CanvasSurfaceLayerBridge::satisfyCallback, this)); don't use a ...
4 years, 6 months ago (2016-06-13 20:53:39 UTC) #27
Justin Novosad
On 2016/06/13 20:53:39, danakj wrote: > How are you going to handle resizing (do you ...
4 years, 6 months ago (2016-06-13 21:03:19 UTC) #28
danakj
On 2016/06/13 21:03:19, Justin Novosad wrote: > On 2016/06/13 20:53:39, danakj wrote: > > > ...
4 years, 6 months ago (2016-06-13 21:30:40 UTC) #29
piman
LGTM+nit for content/ https://codereview.chromium.org/2036663003/diff/140001/content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc File content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc (right): https://codereview.chromium.org/2036663003/diff/140001/content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc#newcode59 content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc:59: LOG(ERROR) << "Attempting to require callback ...
4 years, 6 months ago (2016-06-14 00:28:58 UTC) #30
jbauman
lgtm
4 years, 6 months ago (2016-06-14 00:57:22 UTC) #31
dcheng
mojom lgtm with nits https://codereview.chromium.org/2036663003/diff/140001/content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc File content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc (right): https://codereview.chromium.org/2036663003/diff/140001/content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc#newcode26 content/browser/renderer_host/offscreen_canvas_surface_service_impl.cc:26: id_allocator_ = CreateSurfaceIdAllocator(); Nit: Put ...
4 years, 6 months ago (2016-06-14 09:56:45 UTC) #32
xlai (Olivia)
Based on discussion with danakj@, I cleaned up the unit test for CanvasSurfaceLayerBridge so that ...
4 years, 6 months ago (2016-06-14 21:10:18 UTC) #33
danakj
https://codereview.chromium.org/2036663003/diff/140001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp (right): https://codereview.chromium.org/2036663003/diff/140001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp#newcode63 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp:63: bool CanvasSurfaceLayerBridge::syncGetServiceId() On 2016/06/14 21:10:17, xlai (Olivia) wrote: > ...
4 years, 6 months ago (2016-06-14 22:07:00 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/220001
4 years, 6 months ago (2016-06-16 18:45:28 UTC) #38
danakj
Nice work with the client, LGTM https://codereview.chromium.org/2036663003/diff/220001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp (right): https://codereview.chromium.org/2036663003/diff/220001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp#newcode22 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp:22: m_client = std::move(client); ...
4 years, 6 months ago (2016-06-16 18:49:45 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/240001
4 years, 6 months ago (2016-06-16 20:29:46 UTC) #42
jbroman
I hope you don't mind a couple of drive-by comments about the platform/graphics/ bit of ...
4 years, 6 months ago (2016-06-16 21:11:48 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-16 22:16:06 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/240001
4 years, 6 months ago (2016-06-16 22:39:35 UTC) #48
xlai (Olivia)
Edit based on jbroman's feedback https://codereview.chromium.org/2036663003/diff/240001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp (right): https://codereview.chromium.org/2036663003/diff/240001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp#newcode27 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp:27: m_client.reset(); On 2016/06/16 21:11:48, ...
4 years, 6 months ago (2016-06-16 23:16:21 UTC) #50
danakj
https://codereview.chromium.org/2036663003/diff/240001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp (right): https://codereview.chromium.org/2036663003/diff/240001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp#newcode62 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp:62: FakeOffscreenCanvasSurfaceServiceImpl* m_surfaceService; On 2016/06/16 23:16:21, xlai (Olivia) wrote: > ...
4 years, 6 months ago (2016-06-16 23:19:23 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/300001
4 years, 6 months ago (2016-06-17 00:02:21 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/231089)
4 years, 6 months ago (2016-06-17 00:14:04 UTC) #56
danakj
Thanks for the OwnPtr https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp (right): https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp#newcode62 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp:62: OwnPtr<FakeOffscreenCanvasSurfaceServiceImpl> m_surfaceService; Since the m_surfaceLayerBridge ...
4 years, 6 months ago (2016-06-17 00:33:28 UTC) #57
Ben Goodger (Google)
https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom File third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom (right): https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom#newcode10 third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom:10: interface OffscreenCanvasSurfaceService { Are you using the -Service suffix ...
4 years, 6 months ago (2016-06-17 00:38:33 UTC) #59
xlai (Olivia)
As suggested by ben@, removed the suffix "service" from mojo interface. https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp (right): ...
4 years, 6 months ago (2016-06-17 16:04:07 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/320001
4 years, 6 months ago (2016-06-17 16:21:52 UTC) #63
danakj
Long comment explanation sorry *^_^* https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp (right): https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp#newcode62 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp:62: OwnPtr<FakeOffscreenCanvasSurfaceServiceImpl> m_surfaceService; On 2016/06/17 ...
4 years, 6 months ago (2016-06-17 17:53:04 UTC) #64
Ben Goodger (Google)
mojom interface name lgtm, see nits: https://codereview.chromium.org/2036663003/diff/320001/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom File third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom (right): https://codereview.chromium.org/2036663003/diff/320001/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom#newcode11 third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom:11: nit: remove newline ...
4 years, 6 months ago (2016-06-17 17:58:03 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/240940)
4 years, 6 months ago (2016-06-17 19:36:28 UTC) #67
xlai (Olivia)
rebase master and edits based on danakj@ and ben@'s latest comments. https://codereview.chromium.org/2036663003/diff/300001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp (right): ...
4 years, 6 months ago (2016-06-17 20:47:02 UTC) #68
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/340001
4 years, 6 months ago (2016-06-18 15:47:14 UTC) #70
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/241338)
4 years, 6 months ago (2016-06-18 17:21:52 UTC) #72
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/360001
4 years, 6 months ago (2016-06-20 19:57:07 UTC) #74
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/203521)
4 years, 6 months ago (2016-06-20 20:08:17 UTC) #76
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/380001
4 years, 6 months ago (2016-06-20 22:06:13 UTC) #78
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-20 23:36:46 UTC) #80
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036663003/380001
4 years, 6 months ago (2016-06-20 23:38:06 UTC) #83
commit-bot: I haz the power
Committed patchset #18 (id:380001)
4 years, 6 months ago (2016-06-20 23:49:28 UTC) #85
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d Cr-Commit-Position: refs/heads/master@{#400838}
4 years, 6 months ago (2016-06-20 23:51:13 UTC) #87
dcheng
https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h (right): https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h#newcode16 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h:16: class PLATFORM_EXPORT CanvasSurfaceLayerBridgeClient { Apparently this class just exists ...
4 years, 3 months ago (2016-09-15 20:45:11 UTC) #88
xlai (Olivia)
https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h (right): https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h#newcode16 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h:16: class PLATFORM_EXPORT CanvasSurfaceLayerBridgeClient { This class was added since ...
4 years, 3 months ago (2016-09-15 22:53:10 UTC) #89
xlai (Olivia)
On 2016/09/15 22:53:10, xlai (Olivia) wrote: > https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h > File > third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h > (right): > ...
4 years, 3 months ago (2016-09-15 23:13:31 UTC) #90
danakj
https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h File third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h (right): https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h#newcode16 third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h:16: class PLATFORM_EXPORT CanvasSurfaceLayerBridgeClient { On 2016/09/15 22:53:10, xlai (Olivia) ...
4 years, 3 months ago (2016-09-15 23:48:47 UTC) #91
dcheng
4 years, 3 months ago (2016-09-18 17:24:43 UTC) #92
Message was sent while issue was closed.
https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Sou...
File
third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h
(right):

https://codereview.chromium.org/2036663003/diff/380001/third_party/WebKit/Sou...
third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h:16:
class PLATFORM_EXPORT CanvasSurfaceLayerBridgeClient {
On 2016/09/15 23:48:47, danakj wrote:
> On 2016/09/15 22:53:10, xlai (Olivia) wrote:
> > This class was added since Patch Set 7 and it was suggested by danakj@ (See
> her
> > comments
> > on Patch Set 6 for details). Basically, the major purpose of this class is
to
> > make it cleaner between
> > code and test such that the unit test will not interfere too much with the
> > original code; it's a better
> > way to do testing. 
> > Another benefit is that the include of
offscreen_canvas_surface.mojom-blink.h
> > (which occurs in/CanvasSurfaceLayerBridgeClientImpl.h) will not interfere
with
> > HTMLCanvasElement.cpp that
> > include CanvasSurfaceLayerBridge.
> 
> I think what Daniel is getting at is that we should just use a mojo interface
> and make the implementation of that interface in the unit tests. That's what
we
> were going for but you ran into problems where you were unable to instantiate
a
> mojo service in the unit tests? So we went with an abstract class instead.
> Daniel believes you should be able to do this with just a mojo interface and
> have it work in tests tho, maybe his example would help explain how/.
> 
> > 
> > On 2016/09/15 20:45:11, dcheng wrote:
> > > Apparently this class just exists as a layer of indirection for mojo vs
> tests?
> > > Can we get rid of it? The test can just implement a mock version of the
mojo
> > > interface and use it directly. See
> > >
> >
>
https://cs.chromium.org/chromium/src/url/mojo/url_gurl_struct_traits_unittest...
> > > for an example of how to do this all in a unit test.
> > 
> 

I have a CL for this (https://codereview.chromium.org/2345423002/) although
there's some weird issues with sync methods in unit tests. I'll figure out
what's going on and send it out for review.

Powered by Google App Engine
This is Rietveld 408576698