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

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed)

Created:
7 years, 6 months ago by aelias_OOO_until_Jul13
Modified:
7 years, 6 months ago
Reviewers:
joth, no sievers, jbauman, piman
CC:
chromium-reviews, jonathan.backer, Ian Vollick, jam, apatrick_chromium, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, danakj, jamesr, benm (inactive), boliu
Visibility:
Public.

Description

Unified OutputSurface::SwapBuffers. This patch introduces a hard contract that CC will always call OutputSurface::SwapBuffers(), and OutputSurface will always respond with OutputSurfaceClient::OnSwapBuffersComplete(), in all rendering modes. I deleted the methods SendFrameToParentCompositor, PostSubBuffer, and OnSendFrameToParentCompositorAck, subsuming them into SwapBuffers. I also deleted all the settings and capabilities specifying which variant needed to be called. This should be a no-op for all graphics modes except for Android WebView, where it has the benefits of ensuring OnSwapBuffersComplete is called and that CompositorFrameMetadata is available even though no parent compositor exists. NOTRY=true BUG=237006 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=205501

Patch Set 1 #

Patch Set 2 : Fix compile #

Patch Set 3 : Clean up #

Total comments: 11

Patch Set 4 : Address joth's code review comments #

Total comments: 2

Patch Set 5 : SynchronousCompositorOutputSurface::DemandDrawSw #

Total comments: 9

Patch Set 6 : Address piman@'s comments #

Total comments: 1

Patch Set 7 : Fix rename #

Patch Set 8 : Fix Aura compile by changing image_transport_factory #

Patch Set 9 : Fix layer_unittests to stop relying on no-damage commits causing draw observer trigger #

Patch Set 10 : Fix compile #

Total comments: 2

Patch Set 11 : Add early out to OutputSurface base class for software compositing #

Patch Set 12 : Avoid duplicate early out on software_frame_data #

Patch Set 13 : Rebase to 205473 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -389 lines) Patch
M cc/output/delegating_renderer.h View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/output/delegating_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -5 lines 0 comments Download
M cc/output/gl_frame_data.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M cc/output/gl_frame_data.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M cc/output/gl_renderer.h View 1 chunk +1 line, -2 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +15 lines, -18 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 4 chunks +8 lines, -41 lines 0 comments Download
M cc/output/output_surface.h View 1 2 3 4 5 5 chunks +14 lines, -9 lines 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +52 lines, -17 lines 0 comments Download
M cc/output/output_surface_client.h View 1 chunk +1 line, -3 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M cc/output/renderer.h View 3 chunks +2 lines, -3 lines 0 comments Download
M cc/output/software_renderer.h View 3 chunks +3 lines, -5 lines 0 comments Download
M cc/output/software_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +9 lines, -23 lines 0 comments Download
M cc/scheduler/frame_rate_controller.h View 2 chunks +0 lines, -3 lines 0 comments Download
M cc/scheduler/frame_rate_controller.cc View 5 chunks +2 lines, -18 lines 0 comments Download
M cc/scheduler/scheduler.h View 1 chunk +0 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler.cc View 2 chunks +6 lines, -12 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 2 3 4 5 3 chunks +5 lines, -9 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 4 5 2 chunks +30 lines, -24 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +1 line, -5 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +7 lines, -16 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 3 chunks +1 line, -7 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M cc/trees/thread_proxy.cc View 3 chunks +0 lines, -7 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.cc View 1 2 3 4 5 chunks +18 lines, -17 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/renderer_host/image_transport_factory.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -20 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/gpu/compositor_output_surface.h View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M content/renderer/gpu/compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +19 lines, -31 lines 0 comments Download
A content/renderer/gpu/delegated_compositor_output_surface.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
A content/renderer/gpu/delegated_compositor_output_surface.cc View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M content/renderer/gpu/mailbox_output_surface.h View 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/gpu/mailbox_output_surface.cc View 3 chunks +17 lines, -27 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -9 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -9 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -6 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 11 chunks +31 lines, -15 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
aelias_OOO_until_Jul13
Hi Antoine, PTAL. I realized last week that this cleanup would also fix several WebView ...
7 years, 6 months ago (2013-06-10 08:14:39 UTC) #1
joth
Thanks for the sweeping clean up Alex, it's going to really make our lives easier. ...
7 years, 6 months ago (2013-06-10 18:43:32 UTC) #2
aelias_OOO_until_Jul13
https://codereview.chromium.org/16304003/diff/9001/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/16304003/diff/9001/cc/output/output_surface.cc#newcode195 cc/output/output_surface.cc:195: } cc_unittests package is already passing as of Patch ...
7 years, 6 months ago (2013-06-10 18:57:57 UTC) #3
joth
lgtm https://codereview.chromium.org/16304003/diff/9001/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/16304003/diff/9001/cc/output/output_surface.cc#newcode195 cc/output/output_surface.cc:195: } On 2013/06/10 18:57:57, aelias wrote: > cc_unittests ...
7 years, 6 months ago (2013-06-10 19:04:49 UTC) #4
joth
Ben just pointed out this causes SW draw to think it failed to draw... simple ...
7 years, 6 months ago (2013-06-10 19:06:42 UTC) #5
aelias_OOO_until_Jul13
https://codereview.chromium.org/16304003/diff/18001/content/browser/android/in_process/synchronous_compositor_output_surface.cc File content/browser/android/in_process/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/16304003/diff/18001/content/browser/android/in_process/synchronous_compositor_output_surface.cc#newcode210 content/browser/android/in_process/synchronous_compositor_output_surface.cc:210: return finished_draw; On 2013/06/10 19:06:42, joth wrote: > ah, ...
7 years, 6 months ago (2013-06-10 19:19:03 UTC) #6
joth
lgtm (and ben confirmed that works)
7 years, 6 months ago (2013-06-10 19:28:01 UTC) #7
piman
Very nice cleanup, me likes. There's a couple of things. There's also https://codereview.chromium.org/16730003/ that's in ...
7 years, 6 months ago (2013-06-10 19:52:25 UTC) #8
aelias_OOO_until_Jul13
https://codereview.chromium.org/16304003/diff/24001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/16304003/diff/24001/cc/output/gl_renderer.cc#newcode1998 cc/output/gl_renderer.cc:1998: swap_buffer_rect_.height()); On 2013/06/10 19:52:25, piman wrote: > Is it ...
7 years, 6 months ago (2013-06-10 23:18:06 UTC) #9
piman
lgtm https://codereview.chromium.org/16304003/diff/36002/content/renderer/gpu/compositor_output_surface.h File content/renderer/gpu/compositor_output_surface.h (right): https://codereview.chromium.org/16304003/diff/36002/content/renderer/gpu/compositor_output_surface.h#newcode48 content/renderer/gpu/compositor_output_surface.h:48: bool swap_buffers_via_ipc); nit: I would rename this parameter ...
7 years, 6 months ago (2013-06-10 23:30:05 UTC) #10
aelias_OOO_until_Jul13
FYI, a few of the Aura layer_unittests were relying on the old behavior that a ...
7 years, 6 months ago (2013-06-11 05:59:48 UTC) #11
jbauman
https://codereview.chromium.org/16304003/diff/26017/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/16304003/diff/26017/cc/output/output_surface.cc#newcode187 cc/output/output_surface.cc:187: DCHECK(context3d_); This won't necessarily be the case in the ...
7 years, 6 months ago (2013-06-11 06:52:28 UTC) #12
piman
On Mon, Jun 10, 2013 at 10:59 PM, <aelias@chromium.org> wrote: > FYI, a few of ...
7 years, 6 months ago (2013-06-11 06:56:56 UTC) #13
aelias_OOO_until_Jul13
On 2013/06/11 06:56:56, piman wrote: > On Mon, Jun 10, 2013 at 10:59 PM, <mailto:aelias@chromium.org> ...
7 years, 6 months ago (2013-06-11 07:02:07 UTC) #14
aelias_OOO_until_Jul13
https://codereview.chromium.org/16304003/diff/26017/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/16304003/diff/26017/cc/output/output_surface.cc#newcode187 cc/output/output_surface.cc:187: DCHECK(context3d_); On 2013/06/11 06:52:28, jbauman wrote: > This won't ...
7 years, 6 months ago (2013-06-11 07:12:45 UTC) #15
piman
On 2013/06/11 07:02:07, aelias wrote: > On 2013/06/11 06:56:56, piman wrote: > > On Mon, ...
7 years, 6 months ago (2013-06-11 07:27:46 UTC) #16
aelias_OOO_until_Jul13
On 2013/06/11 07:27:46, piman wrote: > On 2013/06/11 07:02:07, aelias wrote: > > On 2013/06/11 ...
7 years, 6 months ago (2013-06-11 07:34:34 UTC) #17
piman
On Tue, Jun 11, 2013 at 12:34 AM, <aelias@chromium.org> wrote: > On 2013/06/11 07:27:46, piman ...
7 years, 6 months ago (2013-06-11 07:59:03 UTC) #18
aelias_OOO_until_Jul13
OK, all the trybots went green in one of the recent patchsets, let's try to ...
7 years, 6 months ago (2013-06-11 09:17:56 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aelias@chromium.org/16304003/78001
7 years, 6 months ago (2013-06-11 09:18:22 UTC) #20
commit-bot: I haz the power
Change committed as 205501
7 years, 6 months ago (2013-06-11 12:19:31 UTC) #21
slavi
7 years, 6 months ago (2013-06-11 16:43:47 UTC) #22
Message was sent while issue was closed.
On 2013/06/11 07:12:45, aelias wrote:
>
https://codereview.chromium.org/16304003/diff/26017/cc/output/output_surface.cc
> File cc/output/output_surface.cc (right):
> 
>
https://codereview.chromium.org/16304003/diff/26017/cc/output/output_surface....
> cc/output/output_surface.cc:187: DCHECK(context3d_);
> On 2013/06/11 06:52:28, jbauman wrote:
> > This won't necessarily be the case in the software renderer path, will it?
> 
> Hmm, you're right, thanks.  I added an early out here.
> 
> What are the latest flags to try out end-to-end software compositing on Linux?

> I had only tested renderer-side software composting.

Still --ui-enable-software-compositing --enable-software-compositing-gl-adapter
--enable-compositor-frame-message --disable-accelerated-2d-canvas
--force-compositing-mode --allow-webui-compositing  --no-sandbox.
Soon to be --disable-gpu mode.

Powered by Google App Engine
This is Rietveld 408576698