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

Issue 1394403002: Mac Overlays: Plumb through GL solid color overlay support (Closed)

Created:
5 years, 2 months ago by ccameron
Modified:
5 years ago
CC:
Aaron Boodman, abarth-chromium, Andre, ben+mojo_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, extensions-reviews_chromium.org, jam, piman+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac Overlays: Plumb through GL solid color overlay support BUG=533677

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -25 lines) Patch
M content/common/gpu/image_transport_surface_overlay_mac.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.mm View 4 chunks +35 lines, -5 lines 0 comments Download
M gpu/GLES2/gl2chromium_autogen.h View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/GLES2/gl2extchromium.h View 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 chunk +8 lines, -0 lines 1 comment Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 2 chunks +19 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 chunk +17 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 chunk +22 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_autogen.h View 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_autogen.h View 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h View 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_autogen.h View 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h View 1 chunk +17 lines, -0 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 chunk +97 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 chunk +24 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 chunk +20 lines, -19 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.h View 1 chunk +9 lines, -0 lines 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h View 1 chunk +20 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.h View 1 chunk +7 lines, -1 line 0 comments Download
M ui/gl/gl_surface.cc View 1 chunk +10 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 7 (1 generated)
ccameron
This is the extra function that we discussed in the meeting earlier. Lmk if this ...
5 years, 2 months ago (2015-10-08 23:04:30 UTC) #2
reveman
Seems reasonable as short term solution if it's critical to making progress but I think ...
5 years, 2 months ago (2015-10-09 14:17:56 UTC) #3
ccameron
On 2015/10/09 14:17:56, reveman wrote: > Seems reasonable as short term solution if it's critical ...
5 years, 2 months ago (2015-10-09 16:44:02 UTC) #4
reveman
On 2015/10/09 at 16:44:02, ccameron wrote: > On 2015/10/09 14:17:56, reveman wrote: > > Seems ...
5 years, 2 months ago (2015-10-09 17:46:46 UTC) #5
ccameron
So, we have two issues going on. First issue: When we created the "surfaceless" output ...
5 years, 2 months ago (2015-10-09 19:12:40 UTC) #6
reveman
5 years, 2 months ago (2015-10-13 00:20:22 UTC) #7
On 2015/10/09 at 19:12:40, ccameron wrote:
> So, we have two issues going on.
> 
> First issue: When we created the "surfaceless" output surfaces (the ones that
draw to a backbuffer that is displayed using ScheduleOverlayPlane, where
"SwapBuffers" just means "draw the previously scheduled back buffer plane"), we
could have gone further, and moved the display of those planes to the browser
process.
> 
> Second issue: The mac CALayer path is much more flexible than the hardware
overlay path (basically amounting to a "sometimes" compositor), and running both
of them through the "schedule overlay planes" API is something of an abuse of
the concept of overlay planes. I am curious about the flexibility of the "real"
hardware overlays API, and if perhaps implementing a compositor using that API
would be something other OSes would want to do.
> 
> On 2015/10/09 17:46:46, reveman wrote:
> > To me, what we're trying to do on Mac seems more like having the browser
> > compositor be a "delegating" compositor than a compositor with a gl
renderer.
> 
> For quite some time to come (6-9 months, at least), we'll still need to be
able to fall back to using the GLRenderer, because there are lots of edge cases
that we don't yet handle. When we can't handle something, the GLRenderer will
draw to its backbuffer, and we'll have to display that backbuffer.
> 
> > I just like to know what the plan is so I know if this patch is a temporary
> > solution or something we're going to use long term and add more of.
> >
> > FYI, the CreateGpuMemoryBufferFromHandle API
> >
(https://docs.google.com/a/google.com/document/d/1AKDYwF6b9eOhnQszd4ipCaBebqi8...)
> > I'm adding is exactly what we need for importing IOSurfaces created by a
video
> > decoder into chromium's GMB system. We probably want to use that for quads
too
> > if we're going down the non-ScheduleXYZOverlayPlane path as that allows us
to
> > explicit create IOSurface backed resources in the child compositor.
> 
> I feel that we're not ready to take on the "first issue". For the moment, I
find it much easier to reason about everything when it goes through the command
buffer. I'd very strongly prefer to keep everything going through the command
buffer for now. If we want to take on the "first issue", we should do it in a
way that makes sense on CrOS, Android, and possibly Windows as well. I don't
want that to be holding up the large-and-immediately-available power gains on
Mac.

Makes sense. FYI, Wayland output on Linux would be a good example of where we
would benefit from the same type of mechanism on a different platform.

> 
> WRT the second issue ... what are your thoughts on having us just fork the
ScheduleOverlayPlane path, and create a "ScheduleNativeLayer" path, which does
basically the same thing, but without pretending to actually map to hardware
overlays? This is actually fairly important, because we're running into issues
with sharing the code to create overlays -- the existing pathway wants to, for
example, reject things with premultiplied alpha (while we don't). Also we're
going to want to enable promotion of textures and tiles, but only for this
"CALayer path" -- we don't want CrOS to start promoting the first tile that it
sees just because it can (we should keep it focused on video, etc).
> 
> So, my vote would be to ditch this patch, and change it to something that does
a ScheduleNativeLayer( ... ), which specifies things that aren't allowed by
overlay planes, such as
> - opacity
> - background color
> - floating-point bounds
> - etc
> And, at the same time, create a "NativeLayer" fork of the OverlayPlane stuff,
which will, in effect, be the "all or nothing" strategy that we've been doing.

Sgtm. Maybe even make it MacOSX specific ScheduleNativeCALayer.

Powered by Google App Engine
This is Rietveld 408576698