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

Issue 2402173002: cc: Get rid of PostSwapBuffersComplete. (Closed)

Created:
4 years, 2 months ago by danakj
Modified:
4 years, 2 months ago
CC:
anandc+watch-blimp_chromium.org, bgoldman+watch-blimp_chromium.org, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, dtrainor+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, jam, jbauman+watch_chromium.org, jessicag+watch-blimp_chromium.org, kalyank, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, kylechar, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, piman+watch_chromium.org, scf+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, sievers+watch_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Get rid of PostSwapBuffersComplete. OutputSurface and CompositorFrameSink both have this method which is not part of the interface but used to post a call to the client's DidSwapBuffersComplete to the current ThreadTaskRunnerHandle. This is problematic since that is *not* the compositor task runner which can be overridden, and it clutters these base class APIs. This moves the calls to the client DidSwapBuffersComplete() out to each implementation of OutputSurface or CompositorFrameSink. Some additional changes in the process: - BrowserCompositorOutputSurface had OnGpuSwapBuffersCompleted but it was only used for gpu cases, so moved to GpuBrowserCompositorOutputSurface and remove the NOTREACHED() version in SoftwareBrowserCompositorOutputSurface. - Blimp was not using the draw callback to provide backpressure for submitted CompositorFrames, and just posting immediately, so hook that up instead of doing a simple post-task dance there. - SoftwareBrowserCompositorOutputSurface was using ThreadTaskRunnerHandle to make another post task too but it should be using the compositor's task runner. Since it now has it, use that. R=enne@chromium.org, khushalsagar@chromium.org BUG=616973, 606056 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18 Cr-Commit-Position: refs/heads/master@{#424294}

Patch Set 1 #

Patch Set 2 : postswap: rebase #

Patch Set 3 : postswap: . #

Patch Set 4 : postswap: . #

Total comments: 11

Patch Set 5 : postswap: . #

Total comments: 10

Patch Set 6 : postswap: . #

Patch Set 7 : postswap: rebsae #

Patch Set 8 : postswap: rebase-more #

Patch Set 9 : postswap: . #

Patch Set 10 : postswap: fix-blimp-unittest-post-swap-acks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -180 lines) Patch
M blimp/client/core/compositor/blimp_compositor.h View 1 chunk +4 lines, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.cc View 1 chunk +12 lines, -2 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor_frame_sink.h View 1 chunk +1 line, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor_frame_sink.cc View 2 chunks +4 lines, -1 line 0 comments Download
M blimp/client/core/compositor/blimp_compositor_frame_sink_proxy.h View 1 chunk +4 lines, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor_frame_sink_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M blimp/client/support/compositor/blimp_embedder_compositor.cc View 1 2 3 4 5 6 7 5 chunks +21 lines, -9 lines 0 comments Download
M cc/output/compositor_frame_sink.h View 1 2 3 4 5 6 3 chunks +0 lines, -6 lines 0 comments Download
M cc/output/compositor_frame_sink.cc View 1 2 3 4 5 6 3 chunks +2 lines, -11 lines 0 comments Download
M cc/output/output_surface.h View 1 2 3 4 5 6 7 3 chunks +0 lines, -7 lines 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -16 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_compositor_frame_sink.h View 2 chunks +6 lines, -0 lines 0 comments Download
M cc/test/fake_compositor_frame_sink.cc View 3 chunks +10 lines, -3 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 4 5 6 7 3 chunks +10 lines, -4 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/test/pixel_test_output_surface.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M cc/test/pixel_test_output_surface.cc View 1 2 3 4 5 6 7 3 chunks +11 lines, -5 lines 0 comments Download
M cc/test/test_compositor_frame_sink.h View 1 2 3 5 chunks +10 lines, -1 line 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -12 lines 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.h View 1 chunk +0 lines, -10 lines 0 comments Download
M content/browser/compositor/gpu_browser_compositor_output_surface.h View 1 2 3 4 5 6 7 3 chunks +13 lines, -15 lines 0 comments Download
M content/browser/compositor/gpu_browser_compositor_output_surface.cc View 1 2 3 4 5 6 7 3 chunks +27 lines, -28 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/compositor/offscreen_browser_compositor_output_surface.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/compositor/reflector_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/compositor/software_browser_compositor_output_surface.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/compositor/software_browser_compositor_output_surface.cc View 1 2 3 4 5 6 7 5 chunks +16 lines, -12 lines 0 comments Download
M content/browser/compositor/software_browser_compositor_output_surface_unittest.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/compositor/vulkan_browser_compositor_output_surface.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/compositor/vulkan_browser_compositor_output_surface.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 4 chunks +15 lines, -10 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 58 (39 generated)
danakj
enne: overall khushal: blimp/ boliu: content/..android*
4 years, 2 months ago (2016-10-08 01:21:10 UTC) #6
danakj
+sunnyps for cc/ stuff too as it's overlapping stuff he did recently.
4 years, 2 months ago (2016-10-08 01:51:11 UTC) #15
danakj
https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc#newcode253 blimp/client/core/compositor/blimp_compositor.cc:253: DCHECK(surface_factory_); I cargo-culted this, but is it value?
4 years, 2 months ago (2016-10-08 02:05:44 UTC) #18
boliu
https://codereview.chromium.org/2402173002/diff/80001/content/browser/compositor/vulkan_browser_compositor_output_surface.cc File content/browser/compositor/vulkan_browser_compositor_output_surface.cc (left): https://codereview.chromium.org/2402173002/diff/80001/content/browser/compositor/vulkan_browser_compositor_output_surface.cc#oldcode57 content/browser/compositor/vulkan_browser_compositor_output_surface.cc:57: PostSwapBuffersComplete(); was the previous thing calling DidSwapBuffersComplete twice per ...
4 years, 2 months ago (2016-10-09 22:55:08 UTC) #21
Khushal
lgtm. Thanks! https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc#newcode253 blimp/client/core/compositor/blimp_compositor.cc:253: DCHECK(surface_factory_); On 2016/10/08 02:05:44, danakj wrote: > ...
4 years, 2 months ago (2016-10-10 17:40:10 UTC) #22
danakj
PTAL https://codereview.chromium.org/2402173002/diff/80001/blimp/client/support/compositor/blimp_embedder_compositor.cc File blimp/client/support/compositor/blimp_embedder_compositor.cc (right): https://codereview.chromium.org/2402173002/diff/80001/blimp/client/support/compositor/blimp_embedder_compositor.cc#newcode63 blimp/client/support/compositor/blimp_embedder_compositor.cc:63: task_runner_->PostTask( On 2016/10/10 17:40:10, Khushal wrote: > Comment ...
4 years, 2 months ago (2016-10-10 20:28:20 UTC) #23
boliu
content/browser lgtm
4 years, 2 months ago (2016-10-10 20:31:28 UTC) #24
danakj
On 2016/10/10 17:40:10, Khushal wrote: > lgtm. Thanks! +dtrainor for blimp owners
4 years, 2 months ago (2016-10-10 20:34:54 UTC) #28
enne (OOO)
lgtm, this seems like nice cleanup https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc#newcode253 blimp/client/core/compositor/blimp_compositor.cc:253: DCHECK(surface_factory_); On 2016/10/08 ...
4 years, 2 months ago (2016-10-10 20:42:20 UTC) #30
danakj
https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc#newcode253 blimp/client/core/compositor/blimp_compositor.cc:253: DCHECK(surface_factory_); On 2016/10/10 20:42:20, enne wrote: > On 2016/10/08 ...
4 years, 2 months ago (2016-10-10 20:46:36 UTC) #31
danakj
https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2402173002/diff/80001/blimp/client/core/compositor/blimp_compositor.cc#newcode253 blimp/client/core/compositor/blimp_compositor.cc:253: DCHECK(surface_factory_); On 2016/10/10 20:46:36, danakj wrote: > On 2016/10/10 ...
4 years, 2 months ago (2016-10-10 20:48:13 UTC) #32
sunnyps
lgtm % nits https://codereview.chromium.org/2402173002/diff/100001/cc/output/compositor_frame_sink.h File cc/output/compositor_frame_sink.h (right): https://codereview.chromium.org/2402173002/diff/100001/cc/output/compositor_frame_sink.h#newcode136 cc/output/compositor_frame_sink.h:136: base::WeakPtrFactory<CompositorFrameSink> weak_ptr_factory_; nit: We don't this ...
4 years, 2 months ago (2016-10-10 20:58:16 UTC) #33
danakj
https://codereview.chromium.org/2402173002/diff/100001/cc/output/compositor_frame_sink.h File cc/output/compositor_frame_sink.h (right): https://codereview.chromium.org/2402173002/diff/100001/cc/output/compositor_frame_sink.h#newcode136 cc/output/compositor_frame_sink.h:136: base::WeakPtrFactory<CompositorFrameSink> weak_ptr_factory_; On 2016/10/10 20:58:15, sunnyps wrote: > nit: ...
4 years, 2 months ago (2016-10-10 21:02:11 UTC) #34
danakj
https://codereview.chromium.org/2402173002/diff/100001/cc/test/test_compositor_frame_sink.cc File cc/test/test_compositor_frame_sink.cc (right): https://codereview.chromium.org/2402173002/diff/100001/cc/test/test_compositor_frame_sink.cc#newcode164 cc/test/test_compositor_frame_sink.cc:164: void TestCompositorFrameSink::DidDrawCallback() { On 2016/10/10 21:02:11, danakj wrote: > ...
4 years, 2 months ago (2016-10-10 21:32:29 UTC) #40
David Trainor- moved to gerrit
rubberstamp lgtm
4 years, 2 months ago (2016-10-10 22:22:30 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2402173002/180001
4 years, 2 months ago (2016-10-10 22:25:24 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/313325)
4 years, 2 months ago (2016-10-10 22:57:54 UTC) #49
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 2 months ago (2016-10-11 00:00:59 UTC) #56
commit-bot: I haz the power
4 years, 2 months ago (2016-10-11 00:02:40 UTC) #58
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18
Cr-Commit-Position: refs/heads/master@{#424294}

Powered by Google App Engine
This is Rietveld 408576698