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

Issue 2285433002: Use compositor_frame typemap in Blink (Closed)

Created:
4 years, 3 months ago by xlai (Olivia)
Modified:
4 years, 3 months ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, cc-bugs_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, jam, piman+watch_chromium.org, qsr+mojo_chromium.org, tdresser+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use compositor_frame typemap in Blink After mojo implementation change to share DataView between Blink and Chromium (crbug.com/632061 fixed), now it is possible to use cc.mojom.CompositorFrame and its typemap in Blink. Previously this attempt failed because of the need to convert all struct_traits of compositor_frame's dependent types to partial templates (that would cause code bloating) or the need to include all typemaps of dependent types to Blink (that would violate Blink-Chromium dependency restriction); but now neither of these is needed. This CL does the following: 1. It makes all the struct_traits of dependent types of compositor_frame.mojom to use shared DataView. 2. It extracts the struct_traits source files and put them as a standalone build target, which is then referenced by their coresponding typemap as well as the other struct_traits target that depend on them. In this way, the struct traits source files form a build dependency graph just as same as the mojom files. This allows Blink to include the cc struct traits (with proper dependency beneath it) to compile the compositor_frame typemap. 3. Ultimately, the usage of compositor_frame happens in offscreen_canvas_surface.mojom in Blink. 4. The offscreen_canvas_surface.mojom is isolated in build (see third_party/ WebKit/public/BUILD) because it includes compositor_frame.h (a super complex data type that includes a lot of other things) that would pollute the other Blink mojom files. This is not to interfere other existing or future mojom files in Blink that do not want to include compositor_frame. I put these in the comment. Since it is an isolated build target, I add it to deps in WebKit/Source/platform/BUILD.gn and content/browser/BUILD.gn, the only two places that use offscreen_canvas_surface. TBR=danakj@chromium.com,sievers@chromium.org BUG=629566 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/8f40538bf3fb692a3c0f1352c4294b0f35b465f6 Cr-Commit-Position: refs/heads/master@{#416022}

Patch Set 1 #

Patch Set 2 : Fix analyze rebase master #

Patch Set 3 : Fixed android_clang bot failure #

Total comments: 4

Patch Set 4 : Do not write empty function in content #

Total comments: 13

Patch Set 5 : Edit BUILD.gn etc based on feedback #

Patch Set 6 : Rebase master #

Patch Set 7 : Adapt to new change after rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -143 lines) Patch
M cc/ipc/BUILD.gn View 1 2 3 4 3 chunks +40 lines, -10 lines 0 comments Download
M cc/ipc/compositor_frame.typemap View 1 chunk +3 lines, -4 lines 0 comments Download
A cc/ipc/compositor_frame_for_blink.typemap View 1 chunk +40 lines, -0 lines 0 comments Download
M cc/ipc/compositor_frame_metadata.typemap View 1 chunk +1 line, -6 lines 0 comments Download
M cc/ipc/compositor_frame_metadata_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/compositor_frame_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/filter_operation.typemap View 1 chunk +3 lines, -1 line 0 comments Download
M cc/ipc/filter_operation_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/filter_operations.typemap View 1 chunk +3 lines, -1 line 0 comments Download
M cc/ipc/filter_operations_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/quads_struct_traits.h View 1 2 3 4 5 3 chunks +21 lines, -21 lines 0 comments Download
M cc/ipc/quads_struct_traits.cc View 1 2 3 4 5 1 chunk +9 lines, -9 lines 0 comments Download
M cc/ipc/render_pass.typemap View 1 chunk +1 line, -6 lines 0 comments Download
M cc/ipc/render_pass_id.typemap View 1 chunk +3 lines, -1 line 0 comments Download
M cc/ipc/render_pass_id_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/render_pass_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/selection.typemap View 1 chunk +3 lines, -1 line 0 comments Download
M cc/ipc/selection_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/shared_quad_state.typemap View 1 chunk +3 lines, -2 lines 0 comments Download
M cc/ipc/shared_quad_state_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/surface_id.typemap View 1 chunk +3 lines, -1 line 0 comments Download
M cc/ipc/surface_id_struct_traits.h View 1 chunk +4 lines, -6 lines 0 comments Download
M cc/ipc/surface_sequence_struct_traits.h View 2 chunks +5 lines, -6 lines 0 comments Download
M cc/ipc/transferable_resource.typemap View 1 chunk +1 line, -13 lines 0 comments Download
M cc/ipc/transferable_resource_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M gpu/ipc/common/BUILD.gn View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M gpu/ipc/common/gpu_info.typemap View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/common/mailbox_holder.typemap View 1 chunk +1 line, -5 lines 0 comments Download
M gpu/ipc/common/mailbox_holder_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M gpu/ipc/common/mailbox_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M gpu/ipc/common/sync_token.typemap View 1 chunk +4 lines, -1 line 0 comments Download
M gpu/ipc/common/sync_token_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/common/BUILD.gn View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M mojo/common/common_custom_types.typemap View 1 chunk +1 line, -1 line 0 comments Download
M mojo/common/common_custom_types_struct_traits.h View 1 2 3 4 1 chunk +4 lines, -7 lines 0 comments Download
M mojo/common/common_custom_types_struct_traits.cc View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M skia/public/interfaces/BUILD.gn View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M skia/public/interfaces/image_filter.typemap View 1 chunk +6 lines, -3 lines 0 comments Download
M skia/public/interfaces/image_filter_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 2 chunks +21 lines, -2 lines 0 comments Download
M third_party/WebKit/public/blink_typemaps.gni View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M ui/events/mojo/BUILD.gn View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M ui/events/mojo/latency_info.typemap View 1 chunk +6 lines, -9 lines 0 comments Download
M ui/events/mojo/latency_info_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/geometry/mojo/BUILD.gn View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/geometry/mojo/geometry.typemap View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/geometry/mojo/geometry_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/mojo/BUILD.gn View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M ui/gfx/mojo/selection_bound.typemap View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gfx/mojo/selection_bound_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/mojo/transform.typemap View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/gfx/mojo/transform_struct_traits.h View 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 54 (33 generated)
xlai (Olivia)
@dcheng: Before I send this CL to more reviewers, I would like you to review ...
4 years, 3 months ago (2016-08-25 20:57:17 UTC) #5
xlai (Olivia)
ping @dcheng.
4 years, 3 months ago (2016-08-29 17:26:21 UTC) #14
dcheng
LGTM with one nit and one question https://codereview.chromium.org/2285433002/diff/40001/cc/ipc/compositor_frame_struct_traits.h File cc/ipc/compositor_frame_struct_traits.h (right): https://codereview.chromium.org/2285433002/diff/40001/cc/ipc/compositor_frame_struct_traits.h#newcode8 cc/ipc/compositor_frame_struct_traits.h:8: #include "cc/ipc/compositor_frame.mojom-shared.h" ...
4 years, 3 months ago (2016-08-29 20:10:37 UTC) #17
xlai (Olivia)
To all reviewers: please only review the GN build files (including .gn, .gni and .typemap ...
4 years, 3 months ago (2016-08-29 21:43:11 UTC) #22
xlai (Olivia)
+danakj@: ui/gfx and cc/ipc. +sievers@: content/ +junov@: skia/ +yzshen@: mojo/ +pdr@: third_party/WebKit/public/ +sadrul@: ui/events/ Please ...
4 years, 3 months ago (2016-08-30 19:22:49 UTC) #24
Justin Novosad
lgtm for skia
4 years, 3 months ago (2016-08-30 20:17:17 UTC) #25
Justin Novosad
With nits... https://codereview.chromium.org/2285433002/diff/60001/skia/public/interfaces/image_filter.typemap File skia/public/interfaces/image_filter.typemap (right): https://codereview.chromium.org/2285433002/diff/60001/skia/public/interfaces/image_filter.typemap#newcode9 skia/public/interfaces/image_filter.typemap:9: "//skia/public/interfaces:struct_traits", Could you put this on one ...
4 years, 3 months ago (2016-08-30 20:17:36 UTC) #26
xlai (Olivia)
https://codereview.chromium.org/2285433002/diff/60001/skia/public/interfaces/image_filter.typemap File skia/public/interfaces/image_filter.typemap (right): https://codereview.chromium.org/2285433002/diff/60001/skia/public/interfaces/image_filter.typemap#newcode9 skia/public/interfaces/image_filter.typemap:9: "//skia/public/interfaces:struct_traits", On 2016/08/30 20:17:36, Justin Novosad wrote: > Could ...
4 years, 3 months ago (2016-08-30 21:33:12 UTC) #27
pdr.
I don't have a lot of experience with mojo yet so I'd prefer if someone ...
4 years, 3 months ago (2016-08-30 23:55:52 UTC) #29
esprehn
Maybe I don't understand this but it seems to be pulling the cc data structures ...
4 years, 3 months ago (2016-08-31 00:04:00 UTC) #30
xlai (Olivia)
I will address both pdr.@ and esprehn@'s concerns together. First of all, cc::CompositorFrame is allowed ...
4 years, 3 months ago (2016-08-31 01:03:30 UTC) #31
pdr.
On 2016/08/31 at 01:03:30, xlai wrote: Thank you for the detailed response. That addresses my ...
4 years, 3 months ago (2016-08-31 17:39:53 UTC) #32
esprehn
I don't understand how "this one does NOT expose the dependent objects of compositor_frame.mojom into ...
4 years, 3 months ago (2016-08-31 17:46:04 UTC) #33
xlai (Olivia)
I intend to make mojo IPC calls from Source/platform/graphics/ and I've already restrict such a ...
4 years, 3 months ago (2016-08-31 19:26:53 UTC) #34
esprehn
Yeah that seems fine. lgtm
4 years, 3 months ago (2016-08-31 23:12:13 UTC) #35
yzshen1
LGTM with a few nits. Thanks! https://codereview.chromium.org/2285433002/diff/60001/mojo/common/BUILD.gn File mojo/common/BUILD.gn (right): https://codereview.chromium.org/2285433002/diff/60001/mojo/common/BUILD.gn#newcode93 mojo/common/BUILD.gn:93: group("struct_traits") { Can ...
4 years, 3 months ago (2016-09-01 00:02:54 UTC) #36
sadrul
stamp lgtm with yzshen@'s comments addressed.
4 years, 3 months ago (2016-09-01 05:37:59 UTC) #37
xlai (Olivia)
https://codereview.chromium.org/2285433002/diff/60001/mojo/common/BUILD.gn File mojo/common/BUILD.gn (right): https://codereview.chromium.org/2285433002/diff/60001/mojo/common/BUILD.gn#newcode93 mojo/common/BUILD.gn:93: group("struct_traits") { On 2016/09/01 00:02:54, yzshen1 wrote: > Can ...
4 years, 3 months ago (2016-09-01 16:57:44 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2285433002/120001
4 years, 3 months ago (2016-09-01 18:46:08 UTC) #50
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-09-01 19:46:41 UTC) #52
commit-bot: I haz the power
4 years, 3 months ago (2016-09-01 19:48:23 UTC) #54
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/8f40538bf3fb692a3c0f1352c4294b0f35b465f6
Cr-Commit-Position: refs/heads/master@{#416022}

Powered by Google App Engine
This is Rietveld 408576698