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

Issue 1769913003: sync compositor: Add output_surface_id (Closed)

Created:
4 years, 9 months ago by boliu
Modified:
4 years, 9 months ago
CC:
android-webview-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

sync compositor: Add output_surface_id plumbing The output_surface_id is unique for a particular renderer compositor instance. It is used to avoid returning resources from lost context to compositor with new context. Plumb output_surface_id from SynchronousOutputSurface all the way to android_webview::HardwareRenderer. To avoid having to send down a map<id, resource list>, a simpler guarantee is to assume the output_surface_id is increasing, so only need to return resources of with highest output surface id and drop resources other resources. BUG=592744 Committed: https://crrev.com/f4e57485631dc4c3beaa87de398975cab87fdc32 Cr-Commit-Position: refs/heads/master@{#382636}

Patch Set 1 #

Patch Set 2 : fix message write #

Patch Set 3 : functional #

Patch Set 4 : fix unittests compile #

Total comments: 12

Patch Set 5 : rebase #

Patch Set 6 : output_surface_id_for_returned_resources #

Patch Set 7 : unit test #

Total comments: 2

Patch Set 8 : move constructor #

Patch Set 9 : clang compile #

Patch Set 10 : clang compile try 2 #

Patch Set 11 : fix clang for real #

Patch Set 12 : assuming increasing id #

Total comments: 3

Patch Set 13 : fix version check condition #

Total comments: 1

Patch Set 14 : rebase #

Total comments: 6

Patch Set 15 : review #

Patch Set 16 : remove debug code #

Total comments: 8

Patch Set 17 : comment #

Total comments: 4

Patch Set 18 : dcheng review #

Total comments: 6

Patch Set 19 : fix nit in test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+365 lines, -100 lines) Patch
M android_webview/browser/browser_view_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -10 lines 0 comments Download
M android_webview/browser/browser_view_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +98 lines, -1 line 0 comments Download
M android_webview/browser/child_frame.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M android_webview/browser/child_frame.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M android_webview/browser/hardware_renderer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -1 line 0 comments Download
M android_webview/browser/hardware_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +17 lines, -6 lines 0 comments Download
M android_webview/browser/shared_renderer_state.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -5 lines 0 comments Download
M android_webview/browser/shared_renderer_state.cc View 1 2 3 4 5 6 7 8 9 10 12 13 14 1 chunk +15 lines, -5 lines 0 comments Download
M android_webview/browser/test/rendering_test.h View 1 2 3 4 5 6 3 chunks +6 lines, -1 line 0 comments Download
M android_webview/browser/test/rendering_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +6 lines, -5 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_factory_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_factory_impl.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -4 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.cc View 1 2 3 4 5 6 7 2 chunks +17 lines, -14 lines 0 comments Download
M content/browser/android/synchronous_compositor_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -2 lines 0 comments Download
M content/browser/android/synchronous_compositor_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +22 lines, -8 lines 0 comments Download
M content/common/android/sync_compositor_messages.h View 1 2 3 4 5 3 chunks +4 lines, -1 line 0 comments Download
M content/common/android/sync_compositor_messages.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/android/synchronous_compositor.h View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -2 lines 0 comments Download
A content/public/browser/android/synchronous_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +27 lines, -0 lines 0 comments Download
M content/public/test/test_synchronous_compositor_android.h View 1 2 3 4 5 6 7 8 9 3 chunks +20 lines, -4 lines 0 comments Download
M content/public/test/test_synchronous_compositor_android.cc View 1 2 3 4 5 6 7 8 9 2 chunks +23 lines, -2 lines 0 comments Download
M content/renderer/android/synchronous_compositor_factory.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/android/synchronous_compositor_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/android/synchronous_compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/android/synchronous_compositor_proxy.h View 1 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/android/synchronous_compositor_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +15 lines, -15 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 51 (13 generated)
boliu
hush for first pass
4 years, 9 months ago (2016-03-08 03:46:56 UTC) #3
hush (inactive)
https://codereview.chromium.org/1769913003/diff/60001/android_webview/browser/hardware_renderer.cc File android_webview/browser/hardware_renderer.cc (right): https://codereview.chromium.org/1769913003/diff/60001/android_webview/browser/hardware_renderer.cc#newcode257 android_webview/browser/hardware_renderer.cc:257: uint32_t output_surface_id) { A bit weird that we have ...
4 years, 9 months ago (2016-03-08 23:55:50 UTC) #4
hush (inactive)
https://codereview.chromium.org/1769913003/diff/60001/content/common/android/sync_compositor_messages.h File content/common/android/sync_compositor_messages.h (right): https://codereview.chromium.org/1769913003/diff/60001/content/common/android/sync_compositor_messages.h#newcode162 content/common/android/sync_compositor_messages.h:162: uint32_t /* output_surface_id */, On 2016/03/08 23:55:49, hush wrote: ...
4 years, 9 months ago (2016-03-08 23:56:56 UTC) #5
boliu
no new patch set https://codereview.chromium.org/1769913003/diff/60001/android_webview/browser/hardware_renderer.cc File android_webview/browser/hardware_renderer.cc (right): https://codereview.chromium.org/1769913003/diff/60001/android_webview/browser/hardware_renderer.cc#newcode257 android_webview/browser/hardware_renderer.cc:257: uint32_t output_surface_id) { On 2016/03/08 ...
4 years, 9 months ago (2016-03-09 00:29:59 UTC) #6
hush (inactive)
https://codereview.chromium.org/1769913003/diff/60001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1769913003/diff/60001/content/browser/android/synchronous_compositor_host.cc#newcode43 content/browser/android/synchronous_compositor_host.cc:43: current_output_surface_id_(0u), On 2016/03/09 00:29:59, boliu wrote: > On 2016/03/08 ...
4 years, 9 months ago (2016-03-09 02:36:17 UTC) #7
boliu
https://codereview.chromium.org/1769913003/diff/60001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/1769913003/diff/60001/content/renderer/render_widget.cc#newcode767 content/renderer/render_widget.cc:767: uint32_t output_surface_id = next_output_surface_id_++; On 2016/03/09 02:36:17, hush wrote: ...
4 years, 9 months ago (2016-03-09 02:39:44 UTC) #8
hush (inactive)
https://codereview.chromium.org/1769913003/diff/60001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/1769913003/diff/60001/content/renderer/render_widget.cc#newcode767 content/renderer/render_widget.cc:767: uint32_t output_surface_id = next_output_surface_id_++; On 2016/03/09 02:39:44, boliu wrote: ...
4 years, 9 months ago (2016-03-09 20:21:49 UTC) #9
boliu
unit test up
4 years, 9 months ago (2016-03-10 15:37:49 UTC) #10
hush (inactive)
https://codereview.chromium.org/1769913003/diff/120001/android_webview/browser/browser_view_renderer_unittest.cc File android_webview/browser/browser_view_renderer_unittest.cc (right): https://codereview.chromium.org/1769913003/diff/120001/android_webview/browser/browser_view_renderer_unittest.cc#newcode257 android_webview/browser/browser_view_renderer_unittest.cc:257: // Make sure resources for the last output surface ...
4 years, 9 months ago (2016-03-10 22:34:20 UTC) #11
boliu
https://codereview.chromium.org/1769913003/diff/120001/android_webview/browser/browser_view_renderer_unittest.cc File android_webview/browser/browser_view_renderer_unittest.cc (right): https://codereview.chromium.org/1769913003/diff/120001/android_webview/browser/browser_view_renderer_unittest.cc#newcode257 android_webview/browser/browser_view_renderer_unittest.cc:257: // Make sure resources for the last output surface ...
4 years, 9 months ago (2016-03-10 22:49:30 UTC) #12
hush (inactive)
ok. android_webview lgtm
4 years, 9 months ago (2016-03-10 23:01:45 UTC) #13
boliu
+sievers for all of content Fwiw follow up for actually handling context loss here: https://codereview.chromium.org/1773873002/
4 years, 9 months ago (2016-03-11 22:25:17 UTC) #16
hush (inactive)
compilation error here: ../../android_webview/browser/shared_renderer_state.h:37:3: error: [chromium-style] Complex class/struct needs an explicit out-of-line destructor. struct ReturnedResources ...
4 years, 9 months ago (2016-03-12 01:28:10 UTC) #17
boliu
On 2016/03/12 01:28:10, hush wrote: > compilation error here: > ../../android_webview/browser/shared_renderer_state.h:37:3: error: > [chromium-style] Complex ...
4 years, 9 months ago (2016-03-12 01:28:55 UTC) #18
boliu
I thought of a case where android_webview code returns frame resources out of order, causing ...
4 years, 9 months ago (2016-03-14 16:59:56 UTC) #19
boliu
On 2016/03/14 16:59:56, boliu wrote: > I thought of a case where android_webview code returns ...
4 years, 9 months ago (2016-03-14 18:06:37 UTC) #21
hush (inactive)
https://codereview.chromium.org/1769913003/diff/220001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1769913003/diff/220001/content/browser/android/synchronous_compositor_host.cc#newcode277 content/browser/android/synchronous_compositor_host.cc:277: 0x80000000) { what does this mean? (especially with the ...
4 years, 9 months ago (2016-03-14 21:29:53 UTC) #22
hush (inactive)
https://codereview.chromium.org/1769913003/diff/220001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1769913003/diff/220001/content/browser/android/synchronous_compositor_host.cc#newcode277 content/browser/android/synchronous_compositor_host.cc:277: 0x80000000) { On 2016/03/14 21:29:53, hush wrote: > what ...
4 years, 9 months ago (2016-03-14 21:35:07 UTC) #23
boliu
https://codereview.chromium.org/1769913003/diff/220001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1769913003/diff/220001/content/browser/android/synchronous_compositor_host.cc#newcode277 content/browser/android/synchronous_compositor_host.cc:277: 0x80000000) { On 2016/03/14 21:35:07, hush wrote: > On ...
4 years, 9 months ago (2016-03-14 22:50:49 UTC) #24
hush (inactive)
https://codereview.chromium.org/1769913003/diff/240001/android_webview/browser/shared_renderer_state.cc File android_webview/browser/shared_renderer_state.cc (right): https://codereview.chromium.org/1769913003/diff/240001/android_webview/browser/shared_renderer_state.cc#newcode229 android_webview/browser/shared_renderer_state.cc:229: if ((returned_resources.output_surface_id - output_surface_id) < i guess you can ...
4 years, 9 months ago (2016-03-15 00:05:59 UTC) #25
no sievers
https://codereview.chromium.org/1769913003/diff/260001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1769913003/diff/260001/content/browser/android/synchronous_compositor_host.cc#newcode45 content/browser/android/synchronous_compositor_host.cc:45: output_surface_id_for_returned_resources_(0u), This looks like it might be potentially brittle ...
4 years, 9 months ago (2016-03-18 20:03:13 UTC) #26
boliu
hush: a_w code should be reviewed again. I removed the 0x80000000 thing from SharedRendererState as ...
4 years, 9 months ago (2016-03-19 00:18:16 UTC) #27
no sievers
https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc File android_webview/browser/hardware_renderer.cc (right): https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc#newcode232 android_webview/browser/hardware_renderer.cc:232: last_submitted_output_surface_id_); Regarding using |last_submitted_output_surface_id_| is that really true that ...
4 years, 9 months ago (2016-03-21 19:56:12 UTC) #28
hush (inactive)
lgtm https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.h File android_webview/browser/hardware_renderer.h (right): https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.h#newcode54 android_webview/browser/hardware_renderer.h:54: void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources, while you are at ...
4 years, 9 months ago (2016-03-21 20:43:56 UTC) #29
boliu
https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc File android_webview/browser/hardware_renderer.cc (right): https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc#newcode232 android_webview/browser/hardware_renderer.cc:232: last_submitted_output_surface_id_); On 2016/03/21 19:56:12, sievers wrote: > Regarding using ...
4 years, 9 months ago (2016-03-21 21:35:49 UTC) #30
no sievers
https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc File android_webview/browser/hardware_renderer.cc (right): https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc#newcode232 android_webview/browser/hardware_renderer.cc:232: last_submitted_output_surface_id_); On 2016/03/21 21:35:49, boliu wrote: > On 2016/03/21 ...
4 years, 9 months ago (2016-03-21 21:59:55 UTC) #31
boliu
https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc File android_webview/browser/hardware_renderer.cc (right): https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc#newcode232 android_webview/browser/hardware_renderer.cc:232: last_submitted_output_surface_id_); On 2016/03/21 21:59:54, sievers wrote: > On 2016/03/21 ...
4 years, 9 months ago (2016-03-21 22:10:30 UTC) #32
no sievers
On 2016/03/21 22:10:30, boliu wrote: > https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc > File android_webview/browser/hardware_renderer.cc (right): > > https://codereview.chromium.org/1769913003/diff/300001/android_webview/browser/hardware_renderer.cc#newcode232 > ...
4 years, 9 months ago (2016-03-21 22:18:29 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1769913003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1769913003/320001
4 years, 9 months ago (2016-03-21 22:44:16 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/159412)
4 years, 9 months ago (2016-03-21 22:55:12 UTC) #38
boliu
+dcheng for content/common/android/sync_compositor_messages.*
4 years, 9 months ago (2016-03-21 22:56:47 UTC) #40
dcheng
https://codereview.chromium.org/1769913003/diff/320001/content/public/browser/android/synchronous_compositor.cc File content/public/browser/android/synchronous_compositor.cc (right): https://codereview.chromium.org/1769913003/diff/320001/content/public/browser/android/synchronous_compositor.cc#newcode21 content/public/browser/android/synchronous_compositor.cc:21: SynchronousCompositor::Frame&& rhs) { Frame&& rhs should work, for consistency ...
4 years, 9 months ago (2016-03-22 07:22:37 UTC) #41
boliu
https://codereview.chromium.org/1769913003/diff/320001/content/public/browser/android/synchronous_compositor.cc File content/public/browser/android/synchronous_compositor.cc (right): https://codereview.chromium.org/1769913003/diff/320001/content/public/browser/android/synchronous_compositor.cc#newcode21 content/public/browser/android/synchronous_compositor.cc:21: SynchronousCompositor::Frame&& rhs) { On 2016/03/22 07:22:37, dcheng wrote: > ...
4 years, 9 months ago (2016-03-22 15:25:50 UTC) #42
dcheng
lgtm https://codereview.chromium.org/1769913003/diff/340001/android_webview/browser/browser_view_renderer_unittest.cc File android_webview/browser/browser_view_renderer_unittest.cc (right): https://codereview.chromium.org/1769913003/diff/340001/android_webview/browser/browser_view_renderer_unittest.cc#newcode210 android_webview/browser/browser_view_renderer_unittest.cc:210: for (auto& info : infos) { Nit: const ...
4 years, 9 months ago (2016-03-22 17:27:21 UTC) #43
boliu
https://codereview.chromium.org/1769913003/diff/340001/android_webview/browser/browser_view_renderer_unittest.cc File android_webview/browser/browser_view_renderer_unittest.cc (right): https://codereview.chromium.org/1769913003/diff/340001/android_webview/browser/browser_view_renderer_unittest.cc#newcode210 android_webview/browser/browser_view_renderer_unittest.cc:210: for (auto& info : infos) { On 2016/03/22 17:27:21, ...
4 years, 9 months ago (2016-03-22 18:11:22 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1769913003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1769913003/360001
4 years, 9 months ago (2016-03-22 18:11:46 UTC) #47
commit-bot: I haz the power
Committed patchset #19 (id:360001)
4 years, 9 months ago (2016-03-22 19:33:27 UTC) #49
commit-bot: I haz the power
4 years, 9 months ago (2016-03-22 19:34:26 UTC) #51
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/f4e57485631dc4c3beaa87de398975cab87fdc32
Cr-Commit-Position: refs/heads/master@{#382636}

Powered by Google App Engine
This is Rietveld 408576698