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

Issue 1648533002: [mojo] Get rid of Skia type converters (Closed)

Created:
4 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, Hadi
Base URL:
https://chromium.googlesource.com/chromium/src.git@native-arrays
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[mojo] Get rid of Skia type converters In order to ease the transition to Mojo IPC, we should reuse existing ParamTraits whenever possible. We should also generally avoid doing the extra TypeConverter copies that are common between mojom types and native types. This CL redefines the mojom skia::Bitmap as a native-only type aliased to SkBitmap so that Mojo messages can carry pickled SkBitmaps in their existing wire format. The ImageDownloader service (the only one currently using skia::Bitmap) is updated as well. BUG=None

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : + missing typemap #

Patch Set 4 : no copying #

Patch Set 5 : treat typemaps as mojom rule inputs #

Patch Set 6 : gyp #

Patch Set 7 : #

Patch Set 8 : fix ios gyp; proper pickle sizing #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -300 lines) Patch
M content/browser/web_contents/web_contents_impl.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 3 chunks +9 lines, -2 lines 0 comments Download
M content/content.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/content_common_mojo_bindings.gyp View 1 2 3 4 5 6 7 1 chunk +34 lines, -33 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/image_downloader/image_downloader_impl.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/image_downloader/image_downloader_impl.cc View 1 2 3 4 chunks +4 lines, -5 lines 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 1 2 3 4 5 6 8 chunks +39 lines, -13 lines 1 comment Download
A mojo/public/tools/bindings/mojom_get_generator_typemap_args.py View 1 2 3 4 5 6 1 chunk +21 lines, -0 lines 0 comments Download
M skia/public/BUILD.gn View 1 chunk +0 lines, -5 lines 0 comments Download
M skia/public/interfaces/BUILD.gn View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M skia/public/interfaces/bitmap.mojom View 1 chunk +2 lines, -36 lines 1 comment Download
A skia/public/interfaces/skia.typemap View 2 1 chunk +17 lines, -0 lines 0 comments Download
D skia/public/type_converters.h View 1 chunk +0 lines, -26 lines 0 comments Download
D skia/public/type_converters.cc View 1 chunk +0 lines, -141 lines 0 comments Download
M skia/skia.gyp View 1 2 3 4 5 6 7 6 chunks +5 lines, -28 lines 0 comments Download
A skia/skia_mojo_bindings.gyp View 1 2 3 4 5 6 7 1 chunk +37 lines, -0 lines 0 comments Download
M third_party/mojo/mojom_bindings_generator.gypi View 1 2 3 4 5 6 4 chunks +14 lines, -0 lines 0 comments Download
M ui/gfx/ipc/gfx_param_traits.h View 1 chunk +5 lines, -2 lines 0 comments Download
M ui/gfx/ipc/gfx_param_traits.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 3 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (9 generated)
Ken Rockot(use gerrit already)
reed@ could you please take a look at skia/? The gist of this change is ...
4 years, 10 months ago (2016-01-30 04:19:59 UTC) #2
Ken Rockot(use gerrit already)
And also +tsepez for ui/gfx/ipc
4 years, 10 months ago (2016-01-30 04:24:12 UTC) #4
reed1
mtklein, could you look at the skia changes for mojo?
4 years, 10 months ago (2016-01-30 13:23:52 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1648533002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1648533002/80001
4 years, 10 months ago (2016-01-30 15:10:41 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/165794)
4 years, 10 months ago (2016-01-30 15:17:06 UTC) #10
Ken Rockot(use gerrit already)
FYI: This patch ended up exploding in complexity a bit due to the widespread problem ...
4 years, 10 months ago (2016-02-01 17:49:07 UTC) #13
jam
https://codereview.chromium.org/1648533002/diff/180001/mojo/public/tools/bindings/mojom.gni File mojo/public/tools/bindings/mojom.gni (right): https://codereview.chromium.org/1648533002/diff/180001/mojo/public/tools/bindings/mojom.gni#newcode41 mojo/public/tools/bindings/mojom.gni:41: # dependencies must be public by design. Please use ...
4 years, 10 months ago (2016-02-01 17:53:48 UTC) #14
Ken Rockot(use gerrit already)
WriteData also writes the size of the data first (which is a 32bit int). See ...
4 years, 10 months ago (2016-02-01 17:57:01 UTC) #15
Tom Sepez
https://codereview.chromium.org/1648533002/diff/180001/ui/gfx/ipc/gfx_param_traits.cc File ui/gfx/ipc/gfx_param_traits.cc (right): https://codereview.chromium.org/1648533002/diff/180001/ui/gfx/ipc/gfx_param_traits.cc#newcode259 ui/gfx/ipc/gfx_param_traits.cc:259: size_t ParamTraits<SkBitmap>::GetSize(const SkBitmap& p) { I prefer the first ...
4 years, 10 months ago (2016-02-01 18:31:58 UTC) #16
jam
On 2016/02/01 17:57:01, Ken Rockot wrote: > WriteData also writes the size of the data ...
4 years, 10 months ago (2016-02-01 18:39:27 UTC) #17
jam
just saw the other comment now. ok looks like both options work, either is fine ...
4 years, 10 months ago (2016-02-01 18:58:16 UTC) #18
Ken Rockot(use gerrit already)
I'll work on a good general purpose solution for getting sizing right. Does it seem ...
4 years, 10 months ago (2016-02-01 18:58:38 UTC) #19
jam
On 2016/02/01 18:58:38, Ken Rockot wrote: > I'll work on a good general purpose solution ...
4 years, 10 months ago (2016-02-01 19:06:40 UTC) #20
Ken Rockot(use gerrit already)
On 2016/02/01 at 19:06:40, jam wrote: > On 2016/02/01 18:58:38, Ken Rockot wrote: > > ...
4 years, 10 months ago (2016-02-01 19:11:25 UTC) #21
mtklein_C
I'm confused why the transitional shim goes in this direction. If we expect to use ...
4 years, 10 months ago (2016-02-01 20:21:07 UTC) #22
Ken Rockot(use gerrit already)
Yes, we'd have to rewrite the mojom eventually to kill off ParamTraits. The long-term path ...
4 years, 10 months ago (2016-02-01 20:32:06 UTC) #23
mtklein
On 2016/02/01 20:32:06, Ken Rockot wrote: > Yes, we'd have to rewrite the mojom eventually ...
4 years, 10 months ago (2016-02-01 21:18:01 UTC) #24
jam
On 2016/02/01 21:18:01, mtklein wrote: > On 2016/02/01 20:32:06, Ken Rockot wrote: > > Yes, ...
4 years, 10 months ago (2016-02-01 22:14:34 UTC) #25
mtklein_C
> what's the timeline for when this is needed? from your description, it sounds like ...
4 years, 10 months ago (2016-02-02 14:50:09 UTC) #26
yzshen1
https://codereview.chromium.org/1648533002/diff/180001/skia/public/interfaces/bitmap.mojom File skia/public/interfaces/bitmap.mojom (right): https://codereview.chromium.org/1648533002/diff/180001/skia/public/interfaces/bitmap.mojom#newcode8 skia/public/interfaces/bitmap.mojom:8: [Native=True] nit: please consider using [Native] (it equals to ...
4 years, 10 months ago (2016-02-05 17:48:26 UTC) #28
Ken Rockot(use gerrit already)
[Native] SGTM. thanks! On Fri, Feb 5, 2016 at 9:48 AM, <yzshen@chromium.org> wrote: > https://codereview.chromium.org/1648533002/diff/180001/skia/public/interfaces/bitmap.mojom ...
4 years, 10 months ago (2016-02-05 17:49:02 UTC) #29
Hadi
I was wondering if there are any updates on the timeline of this CL? I ...
4 years, 9 months ago (2016-03-04 16:07:12 UTC) #30
Ken Rockot(use gerrit already)
I may be able to land it some time next week. Sorry, I thought your ...
4 years, 9 months ago (2016-03-04 16:10:01 UTC) #32
Hadi
What is the plan for this CL? Why did we close it?
4 years, 8 months ago (2016-04-06 18:34:36 UTC) #33
Ken Rockot(use gerrit already)
4 years, 8 months ago (2016-04-12 14:39:47 UTC) #34
Message was sent while issue was closed.
I closed it because I don't think we want to repurpose IPC::ParamTraits for
Skia types, which was the original plan. Work is under way to make mojo
StructTraits viable for Skia's types (among others), at which point we can
start chipping away at these type converters.

On Wed, Apr 6, 2016 at 11:34 AM, <moshayedi@chromium.org> wrote:

> What is the plan for this CL? Why did we close it?
>
> https://codereview.chromium.org/1648533002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698