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

Issue 10689108: Aura: Have ui::Layer implement WebKit::WebExternalTextureLayerClient (Closed)

Created:
8 years, 5 months ago by jonathan.backer
Modified:
8 years, 5 months ago
CC:
chromium-reviews, Ian Vollick, piman+watch_chromium.org, jonathan.backer
Visibility:
Public.

Description

Aura: Have ui::Layer implement WebKit::WebExternalTextureLayerClient With --ui-enable-threaded-compositing, every Layer::SetExternalTexture() was causing a heavy CCThreadProxy::acquireLayerTextures(). This synchronization is unnecessary on the common case of buffer flips, because RWHVA handles the necessary synchronization via OnCompositingWillStart callbacks. To reduce the synchronization burden, we handle - wait for a commit on resize fast ACKS - handle the common case of buffer flips via WebExternalTextureLayerClient::prepareTexture() - and explicitly call WebExternalTextureLayer::willModifyTexture() when we need the extra synchronization on tear down. BUG=136012 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146621

Patch Set 1 : "" #

Patch Set 2 : Wait for commit before fast ACKing on resize. #

Total comments: 7

Patch Set 3 : Address reviewer comments, remove dead code, plumb through context. #

Total comments: 7

Patch Set 4 : Address review comments and fix failing tests. #

Patch Set 5 : Disable the test compositor instead. #

Total comments: 4

Patch Set 6 : Nuke TestImageTransportFactory. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -482 lines) Patch
M ash/wm/window_animations.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/gpu/gpu_feature_browsertest.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
D content/browser/renderer_host/image_transport_client.h View 1 2 1 chunk +0 lines, -46 lines 0 comments Download
D content/browser/renderer_host/image_transport_client.cc View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
D content/browser/renderer_host/image_transport_client_linux.cc View 1 2 1 chunk +0 lines, -311 lines 0 comments Download
M content/browser/renderer_host/image_transport_factory.h View 1 2 3 4 5 3 chunks +4 lines, -11 lines 0 comments Download
M content/browser/renderer_host/image_transport_factory.cc View 1 2 3 4 5 8 chunks +26 lines, -53 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 chunks +12 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 11 chunks +77 lines, -28 lines 0 comments Download
M content/common/gpu/image_transport_surface.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface.cc View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface_win.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 2 chunks +0 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 1 chunk +0 lines, -5 lines 2 comments Download
M ui/aura/bench/bench_main.cc View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M ui/aura/root_window.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/root_window.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 chunks +8 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 3 chunks +17 lines, -0 lines 0 comments Download
M ui/compositor/compositor_observer.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M ui/compositor/layer.h View 1 2 3 3 chunks +10 lines, -3 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 3 chunks +15 lines, -3 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
jonathan.backer
I think I've got all the synchronization issues covered (other than the resize lock -- ...
8 years, 5 months ago (2012-07-09 14:43:38 UTC) #1
piman
https://chromiumcodereview.appspot.com/10689108/diff/4001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://chromiumcodereview.appspot.com/10689108/diff/4001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode555 content/browser/renderer_host/render_widget_host_view_aura.cc:555: InsertSyncPointAndACK(params_in_pixel.route_id, gpu_host_id, compositor); compositor is NULL here. I don't ...
8 years, 5 months ago (2012-07-09 22:40:00 UTC) #2
jonathan.backer
I ripped out ImageTransportClient because it was effectively dead (perhaps used in tests --- but ...
8 years, 5 months ago (2012-07-11 21:02:02 UTC) #3
piman
At a high level, logic looks fine. Thanks for removing ImageTransportClient, I think that's good. ...
8 years, 5 months ago (2012-07-12 00:18:09 UTC) #4
jonathan.backer
Addressed comments, including add DidCommit to CompositorObservers. The only substantial change in this revision was ...
8 years, 5 months ago (2012-07-12 13:53:22 UTC) #5
piman
LGTM. A couple of nits. https://chromiumcodereview.appspot.com/10689108/diff/5027/content/browser/renderer_host/image_transport_factory.cc File content/browser/renderer_host/image_transport_factory.cc (right): https://chromiumcodereview.appspot.com/10689108/diff/5027/content/browser/renderer_host/image_transport_factory.cc#newcode152 content/browser/renderer_host/image_transport_factory.cc:152: // A weak pointer. ...
8 years, 5 months ago (2012-07-12 17:42:27 UTC) #6
jonathan.backer
Runs fine locally. Waiting for try jobs. https://chromiumcodereview.appspot.com/10689108/diff/5027/content/browser/renderer_host/image_transport_factory.cc File content/browser/renderer_host/image_transport_factory.cc (right): https://chromiumcodereview.appspot.com/10689108/diff/5027/content/browser/renderer_host/image_transport_factory.cc#newcode152 content/browser/renderer_host/image_transport_factory.cc:152: // A ...
8 years, 5 months ago (2012-07-13 13:26:24 UTC) #7
jonathan.backer
piman: Can you check the content/common/gpu changes? +zmo for chrome/test/gpu OWNERS: using a real compositor ...
8 years, 5 months ago (2012-07-13 15:22:09 UTC) #8
Ben Goodger (Google)
lgtm
8 years, 5 months ago (2012-07-13 16:33:32 UTC) #9
piman
lgtm
8 years, 5 months ago (2012-07-13 16:44:33 UTC) #10
Ken Russell (switch to Gerrit)
chrome/test/gpu/ LGTM
8 years, 5 months ago (2012-07-13 17:44:38 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/backer@chromium.org/10689108/6008
8 years, 5 months ago (2012-07-13 17:45:48 UTC) #12
commit-bot: I haz the power
Presubmit check for 10689108-6008 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 5 months ago (2012-07-13 17:46:03 UTC) #13
jam
lgtm for the gypi (the rest has owners)
8 years, 5 months ago (2012-07-13 17:54:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/backer@chromium.org/10689108/6008
8 years, 5 months ago (2012-07-13 18:00:45 UTC) #15
commit-bot: I haz the power
Change committed as 146621
8 years, 5 months ago (2012-07-13 19:35:42 UTC) #16
jbates
https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (left): https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc#oldcode8237 gpu/command_buffer/service/gles2_cmd_decoder.cc:8237: TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", why did this move? it changed the ...
8 years, 5 months ago (2012-07-18 22:50:28 UTC) #17
jonathan.backer
https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (left): https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc#oldcode8237 gpu/command_buffer/service/gles2_cmd_decoder.cc:8237: TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", On 2012/07/18 22:50:28, jbates wrote: > why ...
8 years, 5 months ago (2012-07-19 13:04:31 UTC) #18
jbates
On 2012/07/19 13:04:31, jonathan.backer wrote: > https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc > File gpu/command_buffer/service/gles2_cmd_decoder.cc (left): > > https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc#oldcode8237 > ...
8 years, 5 months ago (2012-07-19 15:14:37 UTC) #19
piman
On Thu, Jul 19, 2012 at 8:14 AM, <jbates@chromium.org> wrote: > On 2012/07/19 13:04:31, jonathan.backer ...
8 years, 5 months ago (2012-07-19 16:56:48 UTC) #20
jbates
8 years, 5 months ago (2012-07-21 05:27:26 UTC) #21
On 2012/07/19 16:56:48, piman wrote:
> On Thu, Jul 19, 2012 at 8:14 AM, <mailto:jbates@chromium.org> wrote:
> 
> > On 2012/07/19 13:04:31, jonathan.backer wrote:
> >
> > https://chromiumcodereview.**appspot.com/10689108/diff/**
> >
>
6008/gpu/command_buffer/**service/gles2_cmd_decoder.cc<https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc>
> >
> >> File gpu/command_buffer/service/**gles2_cmd_decoder.cc (left):
> >>
> >
> >
> > https://chromiumcodereview.**appspot.com/10689108/diff/**
> >
>
6008/gpu/command_buffer/**service/gles2_cmd_decoder.cc#**oldcode8237<https://chromiumcodereview.appspot.com/10689108/diff/6008/gpu/command_buffer/service/gles2_cmd_decoder.cc#oldcode8237>
> >
> >> gpu/command_buffer/service/**gles2_cmd_decoder.cc:8237:
> >> TRACE_EVENT_INSTANT2("test_**gpu", "SwapBuffers",
> >> On 2012/07/18 22:50:28, jbates wrote:
> >> > why did this move? it changed the windows WebGL latency results so I
> >> don't
> >> think
> >> > this was correct.
> >>
> >
> >  This moved because I had CrOS use a real display for GpuFeatureTests in
> >> order
> >>
> > to
> >
> >> remove some dead code
>
(http://codereview.chromium.**org/10696221/%3Chttp://codereview.chromium.org/1...>)
> >> that was only
> >> being used in test (it used to be used in production, but had been
> >> deprecated
> >>
> > a
> >
> >> month or two ago).
> >>
> >
> >  More specifically, CrOS uses the GPU process to display it's UI. So any
> >> time a
> >> window move, a menu opened, or new tab contents need display, we'd
> >> trigger a
> >> SwapBuffers in the decoder process. It was clear that GpuFeatureTests only
> >>
> > meant
> >
> >> to grab renderer SwapBuffers. Moving this to ImageTransportSurface
> >> achieves
> >>
> > this
> >
> >> goal.
> >>
> >
> > I guess the problem is this event is also used by performance_browser_tests
> > (latency_test.cc) with specific timing requirements. It must be where it
> > was for
> > latency tests. However, it sounds like there will need to be some more
> > tweaks to
> > get the latency_test to run on CrOS, but as of yet
> > performance_browser_tests
> > does not run on CrOS.
> >
> 
> Shouldn't we just update test expectations?

The new latency is invalid rather than different. I don't even really know
exactly what it's measuring because it was designed to expect the swap to be
synchronous with the webgl context blit.

> 
> Antoine
> 
> 
> >
> > One solution for now is to copy the SwapBuffers event back to where it was
> > and
> > rename it to something like SwapBuffersLatency. Then update
> > latency_test.cc to
> > use SwapBuffersLatency instead of SwapBuffers..
> >
> >
> >
> >  As for why this affects latency, we're now signalling a SwapBuffers after
> >> it
> >>
> > has
> >
> >> been acted on, rather than before. Specifically,
> >> PbufferImageTransportSurface::**SwapBuffers() defers to a fence before
> >> telling
> >>
> > the
> >
> >> browser that there is a new frame to display. I'm not sure what you're
> >> trying
> >>
> > to
> >
> >> measure, but my gut tells me that this is probably what you want --- this
> >>
> > fence
> >
> >> introduces latency that is user visible (and a quick search in
> >>
> > content/browser/
> >
> >> for "test_gpu" comes up empty for windows, suggesting that it's not
> >> accounted
> >> for in some other way).
> >>
> >
> >  If this is definitely not what you want, let me know and I can work
> >> around it.
> >>
> >
> >
> >
> >
>
https://chromiumcodereview.**appspot.com/10689108/%3Chttps://chromiumcoderevi...>
> >

Powered by Google App Engine
This is Rietveld 408576698