compositor_frame.mojom has about 20 dependent mojom files from ui/, gpu/, skia/, cc/ipc/.
Right now, we must import it to offscreen_canvas_surface.mojom (inside Blink) in order to add a mojo interface to submit compositor frame. This is an essential step to implement OffscreenCanvas.commit() to pass compositor frame from renderer to browser via mojo IPC calls.
However, the struct_traits used by compositor_frame.mojom and its dependent mojom types are currently only used in Chromium. To make it used by Chromium and Blink, we need two different conversions (one typemapping user custom type to mojom type in mojom-blink.h and another typemapping user custome type to mojom type in mojom.h). To reduce code duplication, we should aim to use partial template specialization so that Chromium and Blink can share the typemapping usage.
This bug is about using compositor_frame.typemap to do type conversion in Blink.
compositor_frame.mojom has about 20 dependent mojom files from ui/, gpu/, skia/, cc/ipc/.
Right now, we must import it to offscreen_canvas_surface.mojom (inside Blink) in order to add a mojo interface to submit compositor frame. This is an essential step to implement OffscreenCanvas.commit() to pass compositor frame from renderer to browser via mojo IPC calls.
However, the struct_traits used by compositor_frame.mojom and its dependent mojom types are currently only used in Chromium. To make it used by Chromium and Blink, we need two different conversions (one typemapping user custom type to mojom type in mojom-blink.h and another typemapping user custome type to mojom type in mojom.h). To reduce code duplication, we should aim to use partial template specialization so that Chromium and Blink can share the typemapping usage.
Comment 1 by xlai@chromium.org
, Jul 19 2016