Intent to add Blink->Chromium dependency: Source/platform/ -> cc/

45 views
Skip to first unread message

Jeremy Roman

unread,
Sep 25, 2015, 10:30:01 AM9/25/15
to blink-dev, paint-dev
Doc: https://docs.google.com/document/d/1Jfwwx29XaGkfpARfiO8dQd7lQYVs3znrSc3DdKZhCj8/edit?usp=sharing

tl;dr: I'd like to allow including cc/ from Source/platform/[graphics/], so that we can call cc from Blink's compositing support code.

This will probably imply access to a handful of classes in base/ (such as scoped_ptr and scoped_refptr) and ui/gfx/ (such as gfx::Rect), which are used in cc's public interface. Their use should be confined to just before/after calling into cc.

Currently the only path requires mirroring cc's interfaces in public/platform/ and then implementing bindings in cc/blink/, converting/wrapping argument types in the process.

Kentaro Hara

unread,
Sep 25, 2015, 10:40:36 AM9/25/15
to Jeremy Roman, blink-dev, paint-dev
The platform/graphics/ => cc/ dependency sounds nice to me.


--
Kentaro Hara, Tokyo, Japan

Fady Samuel

unread,
Sep 25, 2015, 10:42:55 AM9/25/15
to Jeremy Roman, blink-dev, paint-dev
Please, let's be cautious before making drastic changes here. There are other Blink embedders in the Chromium repo, such as Mandoline.

Fady

Kentaro Hara

unread,
Sep 25, 2015, 10:45:59 AM9/25/15
to Fady Samuel, Jeremy Roman, blink-dev, paint-dev
From the perspective of dependencies from Blink to Chromium, what's a requirement for Mandoline?


Jeremy Roman

unread,
Sep 25, 2015, 11:05:02 AM9/25/15
to Fady Samuel, blink-dev, paint-dev
On Fri, Sep 25, 2015 at 10:42 AM, Fady Samuel <fsa...@chromium.org> wrote:
Please, let's be cautious before making drastic changes here. There are other Blink embedders in the Chromium repo, such as Mandoline.

The initial target here is more things that are in cc/blink/ than things that are in content/. It's surprising to me (though I now see that it is the case) that components/html_viewer (i.e. Mandoline) forces the cc-blink interaction to be different. This kind of overriding would presumably be hit by other refactors, such as SPv2, which affect how the compositor interacts with Blink. Why is Mandoline an agent in these interactions, when its current counterpart, content, isn't?

Fady Samuel

unread,
Sep 25, 2015, 11:12:47 AM9/25/15
to Jeremy Roman, blink-dev, paint-dev
I can't speak to all the differences but one reason we differ from cc/blink/ is Mandoline "Views" are tightly coupled to Surfaces. In Mandoline, a CompositorFrame is submitted to a View.

We can work toward unified cc/blink usage. I'm not opposing anything in your proposal just yet. I need to think about it more carefully first, and see how this aligns with our future plans in Mandoline.

Fady

Dimitri Glazkov

unread,
Sep 25, 2015, 12:41:13 PM9/25/15
to Fady Samuel, Jeremy Roman, blink-dev, paint-dev
Mandoline is great and is a natural next step to evolve our IPC plumbing. However, at this point, we need to be careful that your work doesn't slow down or interfere with the mission-critical work of the rest of the team.

:DG<

Fady
--
You received this message because you are subscribed to the Google Groups "paint-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paint-dev+...@chromium.org.
To post to this group, send email to pain...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/paint-dev/CAMZzjTkwBP96grxdnqQfPYh7F1DEF7H70Q4NbHHk%3DOJjqU-OqA%40mail.gmail.com.

Chris Harrelson

unread,
Sep 25, 2015, 12:48:13 PM9/25/15
to Jeremy Roman, blink-dev, paint-dev
I like this proposal. We should be careful when implementing to avoid problems (some potential problems are mentioned in the doc or its comments), but I think it's sound and a good step forward.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Elliott Sprehn

unread,
Sep 25, 2015, 1:00:29 PM9/25/15
to Chris Harrelson, Jeremy Roman, blink-dev, paint-dev
+1, it seems very reasonable to merge the two glue layers. btw there seems to be two conflicting statements here and in the doc, is this only going to be in platform/graphics/ or in the rest of platform/ as well?

I don't think we should block on Mandoline, Paint Slimming is looking to ship big changes in the next two quarters, we need to prioritize their success and this should make their lives easier. :)

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

Jeremy Roman

unread,
Sep 25, 2015, 1:02:47 PM9/25/15
to Elliott Sprehn, Chris Harrelson, blink-dev, paint-dev
I'd originally intended to add the DEPS rule to Source/platform/ (because there's currently no Source/platform/graphics/DEPS), but based on haraken's feedback I'm willing to put restrict it to the subdirectories of Source/platform/ that it applies to (mostly graphics/, but perhaps also geometry/ for conversion utilities).

Alex Clarke

unread,
Sep 25, 2015, 1:11:43 PM9/25/15
to Kentaro Hara, Jeremy Roman, blink-dev, paint-dev
I'd really love to have base::TimerTicks in platform/  there's been several times (including today) where I got the units wrong when passing a time from blink to chrome.  Can we have that dependency?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Dana Jansens

unread,
Sep 25, 2015, 1:58:53 PM9/25/15
to Fady Samuel, Jeremy Roman, blink-dev, paint-dev
On Fri, Sep 25, 2015 at 7:42 AM, Fady Samuel <fsa...@chromium.org> wrote:
Please, let's be cautious before making drastic changes here. There are other Blink embedders in the Chromium repo, such as Mandoline.

The cc/blink/ bindings exist for the sole purpose of adding a hard virtual indirection between blink and cc. There's no real benefit for this now, we should drop this bindings layer and blink can use cc:: directly, just as ui/compositor/ or content/ does.

Mandoline already lives in the chromium repo. If it wants to use cc it should do it directly also, not through the cc/blink/ interface.
 
Fady

On Fri, Sep 25, 2015 at 10:29 AM, Jeremy Roman <jbr...@chromium.org> wrote:
Doc: https://docs.google.com/document/d/1Jfwwx29XaGkfpARfiO8dQd7lQYVs3znrSc3DdKZhCj8/edit?usp=sharing

tl;dr: I'd like to allow including cc/ from Source/platform/[graphics/], so that we can call cc from Blink's compositing support code.

This will probably imply access to a handful of classes in base/ (such as scoped_ptr and scoped_refptr) and ui/gfx/ (such as gfx::Rect), which are used in cc's public interface. Their use should be confined to just before/after calling into cc.

Currently the only path requires mirroring cc's interfaces in public/platform/ and then implementing bindings in cc/blink/, converting/wrapping argument types in the process.

LGTM as a cc owner
 

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

Elliott Sprehn

unread,
Sep 25, 2015, 2:31:49 PM9/25/15
to Jeremy Roman, Chris Harrelson, blink-dev, paint-dev
Great, lets start with the finer granularity of graphics/ and geometry/ to start (provided adding the DEPS in graphics/ isn't too hard) and expand from there. 

Fady Samuel

unread,
Sep 25, 2015, 2:33:13 PM9/25/15
to Dana Jansens, Jeremy Roman, blink-dev, paint-dev
sgtm, thanks Dana!

Fady
Reply all
Reply to author
Forward
0 new messages