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

Issue 1513283002: Add support to send optimal format as part of ScheduleOverlayPlane (Closed)

Created:
5 years ago by kalyank
Modified:
4 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, cc-bugs_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, extensions-reviews_chromium.org, feature-media-reviews_chromium.org, jam, jbauman+watch_chromium.org, mcasas+watch_chromium.org, ozone-reviews_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, rjkroege, sievers+watch_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

Add support to send optimal format as part of ScheduleOverlayPlane On ChromeOS, during swap we try to convert the storage formats of Video buffers to the most optimal one (i.e. YUV etc) which can save Memroy bandwidth during scan out. This is currently hardcoded in GbmBuffer, however this format support can vary on different hardware and hence we should check first if this format is supported before using it. This CL adds basic support to pass two additional parameters storage_format and handle_scaling as part of ScheduleOverlayPlane. These act as hints about the optimal format supported by the hardware and if scaling needs to be handled in chrome before the composition (i.e. Display Controller cannot handle plane scaling). Currently these are hardcoded in DrmOverlayCandidateHost, in a followup patch I will add support to actually query these from driver and pass it on here. BUG=553264 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Total comments: 3

Patch Set 2 : Update cmd_buffer_functions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -229 lines) Patch
M cc/output/gl_renderer.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 chunks +9 lines, -5 lines 0 comments Download
M cc/output/overlay_candidate.h View 3 chunks +5 lines, -0 lines 0 comments Download
M cc/output/overlay_candidate.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/output/overlay_unittest.cc View 21 chunks +40 lines, -34 lines 0 comments Download
M cc/test/test_context_support.h View 1 chunk +6 lines, -2 lines 0 comments Download
M cc/test/test_context_support.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.h View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.mm View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/media/avda_codec_image.h View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/media/avda_codec_image.cc View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/stream_texture_android.h View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/stream_texture_android.cc View 1 chunk +3 lines, -1 line 0 comments Download
M gpu/GLES2/gl2extchromium.h View 1 4 chunks +10 lines, -2 lines 0 comments Download
M gpu/command_buffer/client/context_support.h View 2 chunks +4 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 1 2 chunks +6 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 2 chunks +6 lines, -4 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 2 chunks +4 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 chunks +20 lines, -2 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 2 chunks +15 lines, -10 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_autogen.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_autogen.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_autogen.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h View 1 2 chunks +6 lines, -3 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 6 chunks +40 lines, -26 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 1 chunk +18 lines, -15 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 chunks +17 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/stream_texture_manager_in_process_android.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/texture_definition.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.cc View 1 2 chunks +7 lines, -4 lines 0 comments Download
M mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h View 1 3 chunks +6 lines, -2 lines 0 comments Download
M ui/gl/gl_image.h View 2 chunks +4 lines, -1 line 0 comments Download
M ui/gl/gl_image_egl.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_egl.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_glx.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_glx.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_io_surface.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_io_surface.mm View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_memory.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_memory.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_ozone_native_pixmap.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_ozone_native_pixmap.cc View 1 chunk +7 lines, -7 lines 0 comments Download
M ui/gl/gl_image_stub.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_stub.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_surface_texture.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_image_surface_texture.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_surface.h View 3 chunks +14 lines, -2 lines 0 comments Download
M ui/gl/gl_surface.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M ui/gl/gl_surface_egl.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 chunk +7 lines, -6 lines 0 comments Download
M ui/gl/gl_surface_overlay.h View 2 chunks +5 lines, -1 line 0 comments Download
M ui/gl/gl_surface_overlay.cc View 1 chunk +8 lines, -3 lines 0 comments Download
M ui/gl/gl_surface_ozone.cc View 6 chunks +24 lines, -13 lines 0 comments Download
M ui/ozone/demo/surfaceless_gl_renderer.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M ui/ozone/platform/cast/surface_factory_cast.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer.h View 1 chunk +6 lines, -5 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer.cc View 4 chunks +23 lines, -25 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M ui/ozone/platform/headless/headless_surface_factory.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/ozone/public/native_pixmap.h View 3 chunks +6 lines, -1 line 0 comments Download
M ui/ozone/public/overlay_candidates_ozone.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 14 (4 generated)
kalyank
@reveman @piman @alexst PTAL
5 years ago (2015-12-10 16:47:12 UTC) #5
reveman
Can we implement this using CopyTexImage instead? See https://codereview.chromium.org/1419733005 for an example of how that's ...
5 years ago (2015-12-10 16:58:31 UTC) #6
kalyank
On 2015/12/10 16:58:31, reveman wrote: > Can we implement this using CopyTexImage instead? See > ...
5 years ago (2015-12-10 18:49:34 UTC) #7
piman
I'm not sure I understand this CL. It looks like we're getting redundant information from ...
5 years ago (2015-12-11 08:32:25 UTC) #8
kalyank
https://codereview.chromium.org/1513283002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1513283002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode9450 gpu/command_buffer/service/gles2_cmd_decoder.cc:9450: GetGFXOverlayStorageFormat(c.storage_format), On 2015/12/11 08:32:25, piman (OOO back 12-11) wrote: ...
5 years ago (2015-12-11 19:22:36 UTC) #9
kalyank
On 2015/12/11 08:32:25, piman (OOO back 12-11) wrote: > I'm not sure I understand this ...
5 years ago (2015-12-11 19:31:55 UTC) #10
piman
On Sat, Dec 12, 2015 at 4:22 AM, <kalyan.kondapally@intel.com> wrote: > > > https://codereview.chromium.org/1513283002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc > ...
5 years ago (2015-12-14 11:37:12 UTC) #11
kalyank
> > > Sorry, I still don't understand. All the code you link to is ...
5 years ago (2015-12-14 18:15:50 UTC) #12
piman
On 2015/12/14 18:15:50, kalyank wrote: > > > > > Sorry, I still don't understand. ...
5 years ago (2015-12-15 06:55:10 UTC) #13
piman
5 years ago (2015-12-15 07:03:08 UTC) #14
On Tue, Dec 15, 2015 at 3:55 PM, <piman@chromium.org> wrote:

> On 2015/12/14 18:15:50, kalyank wrote:
>
>> > >
>> > Sorry, I still don't understand. All the code you link to is
>> service-side.
>> > Why does the (untrusted) client need to be involved to pass format data
>> > between the place where it's allocated and the place where it's used?
>>
>
> When processing Overlays, DrmOverlayCandidateHost will validate if a
>>
> particular
>
>> layer can be promoted to Overlay and Cache the result. The validation
>> happens
>> in GPU process side.
>>
>
>
>
>
https://code.google.com/p/chromium/codesearch#chromium/src/ui/ozone/platform/.
> ..
>
>
>
https://code.google.com/p/chromium/codesearch#chromium/src/ui/ozone/platform/.
> ..
>
> During the validation in GPU side, we do a test commit to check if the
>>
> hardware
>
>> can support this layer on a Hardware plane or not. Idea is during this
>> phase
>>
> we
>
>> should also be able to determine optimal format and if scaling can be
>>
> supported
>
>> by the hardware. These values need to be available when compositing that
>> given
>>
>
> layer using a hardware plane. One solution was to cache the
>>
> Overlaycheck_params(
>
>> which contains needed data about the layer and hold these values also) in
>> GPU
>> Process side and during swap retrieve these values for that given layer.
>> However, as DrmOverlayCandidateHost already maintains cache of
>> OverlayCheck_params and knows which layers are going to be scheduled,
>> I was thinking we could use that to retrieve these values and pass it as
>> part
>>
> of
>
>> ScheduleOverlay. This avoids need for maintaining another cache in GPU
>> side
>>
> and
>
>> having to make sure it's in sync with the cache in
>> DrmOverlayCandidateHost.Do
>> you think we should try to handle this in server side completely without
>> DrmOverlayCandidateHost having the need to pass this information.
>>
>
Keeping the cache on the GPU side too seems a lot simpler than moving this
data around, given the potential trust issues and loose semantics.


>
> > https://codereview.chromium.org/1513283002/
>> > >
>> >
>> > --
>> > 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 mailto:chromium-reviews+unsubscribe@chromium.org.
>>
>
>
>
> https://codereview.chromium.org/1513283002/
>

-- 
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