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

Issue 2776923003: cc: Partial draw without partial swap support. (Closed)

Created:
3 years, 8 months ago by reveman
Modified:
3 years, 8 months ago
Reviewers:
Daniele Castagna
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Partial draw without partial swap support. This introduces the ability for output surfaces to support partial draw without having to support partial swap. Partial draw support is evaluated for each frame and the main use case is minimizing draw cost for the common case when the damage rect is the same over a large set of consecutive frames. BUG=705290 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Patch Set 2 : gpu: Partial update without copy. #

Patch Set 3 : cleanup and fix overlay issues #

Patch Set 4 : cc: Partial draw without partial swap support. #

Patch Set 5 : avoid BufferQueue::RecreateBuffer changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -21 lines) Patch
M android_webview/browser/parent_output_surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/browser/parent_output_surface.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M cc/output/direct_renderer.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M cc/output/direct_renderer.cc View 1 2 3 2 chunks +5 lines, -6 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 3 chunks +13 lines, -11 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/output_surface.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M cc/output/output_surface_frame.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/overlay_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/pixel_test_output_surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/pixel_test_output_surface.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M components/display_compositor/buffer_queue.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/display_compositor/buffer_queue.cc View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/surfaces/display_output_surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/surfaces/display_output_surface.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (16 generated)
reveman
3 years, 8 months ago (2017-03-29 12:39:29 UTC) #8
piman
The advantage of the previous method is that for a large set of workloads (where ...
3 years, 8 months ago (2017-03-29 17:15:42 UTC) #9
Daniele Castagna
On 2017/03/29 at 17:15:42, piman wrote: > The advantage of the previous method is that ...
3 years, 8 months ago (2017-03-29 18:31:47 UTC) #10
reveman
On 2017/03/29 at 18:31:47, dcastagna wrote: > On 2017/03/29 at 17:15:42, piman wrote: > > ...
3 years, 8 months ago (2017-03-29 19:22:04 UTC) #11
piman
On 2017/03/29 19:22:04, reveman wrote: > On 2017/03/29 at 18:31:47, dcastagna wrote: > > On ...
3 years, 8 months ago (2017-03-29 19:29:47 UTC) #12
Daniele Castagna
On 2017/03/29 at 19:29:47, piman wrote: > On 2017/03/29 19:22:04, reveman wrote: > > On ...
3 years, 8 months ago (2017-03-29 19:53:06 UTC) #13
reveman
3 years, 8 months ago (2017-03-29 20:11:30 UTC) #14
On 2017/03/29 at 19:53:06, dcastagna wrote:
> On 2017/03/29 at 19:29:47, piman wrote:
> > On 2017/03/29 19:22:04, reveman wrote:
> > > On 2017/03/29 at 18:31:47, dcastagna wrote:
> > > > On 2017/03/29 at 17:15:42, piman wrote:
> > > > > The advantage of the previous method is that for a large set of
workloads
> > > (where the damage rect is consistent frame-to-frame, e.g. blinking cursor,
> > > video/canvas updates), the region to be copied becomes empty in the steady
> > > state. I think this is a very useful property to keep for devices that can
do
> > > it, because of the performance advantages. Thoughts?
> > > > 
> > > > I didn't know how we were doing partial updates. That seems pretty
efficient
> > > assuming the workload to copy old_damage - new_damage is generally less
than the
> > > workload to recomposite the same region (I guess it might not be the case
if
> > > we're compositing solid color quads or YUV buffers).
> > > > 
> > > > I don't understand why having the region being copied becoming empty in
the
> > > steady state would be better than this approach though. Wouldn't the
steady
> > > state of this approach (for the workloads you described) have the same
damage
> > > rect as the current approach (and no "copy"-region) eventually?
> > > 
> > > Yes, I'm also failing to see how the steady state would be different. The
copy
> > > approach might seem more efficient in theory but I wonder if increasing
the
> > > scissor rect slightly is not sometimes more efficient than binding a
fullscreen
> > > texture (that was not recently used by the GPU) for sampling and reading
some
> > > pixels out of it.
> > 
> > Oh, sorry, I initially misread the patch, I see what you're doing. I agree
that in the steady state it should be equivalent in terms of pixels written. I
still think the copy is going to be generally more efficient than re-render, in
particular as we look at enabling multisampling etc. and for high overdraw (and
because it can use dedicated 2D HW instead of the full 3D pipeline). Would it be
hard to treat the "can't read in-use images" restriction as a driver issue, with
a workaround of enlarging the damage rect (what this patch does) instead of
doing the copy, but keeping the copy as the favored path?
> 
> I agree it seems like the copy might be generally faster (and for sure the
cost is more predictable and has an upper-bound) than re-render. On Kevin the
buffer is also compressed, so that should help even more.
> 
> We introduced the issue in the first place though. Wouldn't it be better just
to try to evaluate how big of a change would be to disable implicit sync and
leave the code as it is instead of adding two different paths?

Yes, let's figure out if we can instead disable implicit sync and if not we move
forward with this as an optional partial swap mechanism where the copy approach
is still preferred.

Powered by Google App Engine
This is Rietveld 408576698