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

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed)

Created:
4 years, 4 months ago by danakj
Modified:
4 years, 4 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, Fady Samuel, jam, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, sievers+watch_chromium.org, tfarina, Ian Vollick
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plumb SetVisible from ui::Compositor to the DirectRenderer. This connection got lost when ui::Compositor was switched to using Display and Surfaces. Restore the connection so that when the root compositor becomes invisible we drop the backbuffer memory in the DirectRenderer. R=piman@chromium.org TBR=sky BUG=606056 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/6f2861b9c957c7374a2a2c084c6cafba01b5e5d6 Cr-Commit-Position: refs/heads/master@{#412421}

Patch Set 1 #

Total comments: 1

Patch Set 2 : setvisible-browser: . #

Patch Set 3 : setvisible-browser: typo #

Patch Set 4 : setvisible-browser: . #

Patch Set 5 : setvisible-browser: stopdrawingwhennotvisible #

Patch Set 6 : setvisible-browser: makesuresetvisiblegetsthruONCEANDFORALL #

Patch Set 7 : setvisible-browser: dcheckvisible #

Patch Set 8 : setvisible-browser: fix-and-add-cc-tests #

Patch Set 9 : setvisible-browser: . #

Total comments: 6

Patch Set 10 : setvisible-browser: rebase #

Patch Set 11 : setvisible-browser: . #

Patch Set 12 : setvisible-browser: fix-new-cc-test #

Total comments: 10

Patch Set 13 : setvisible-browser: nits #

Patch Set 14 : setvisible-browser: webview #

Patch Set 15 : setvisible-browser: and-compositor-impl #

Patch Set 16 : setvisible-browser: onemore #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -45 lines) Patch
M android_webview/browser/surfaces_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/direct_renderer.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 17 chunks +33 lines, -13 lines 0 comments Download
M cc/output/overlay_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/renderer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/output/software_renderer_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/display.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M cc/surfaces/display_scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -0 lines 0 comments Download
M cc/surfaces/display_scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +40 lines, -15 lines 0 comments Download
M cc/surfaces/display_scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +119 lines, -11 lines 0 comments Download
M cc/surfaces/display_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/surface_display_output_surface_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/fake_external_begin_frame_source.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/pixel_test.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M cc/test/test_delegating_output_surface.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 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 14 15 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +8 lines, -1 line 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M ui/compositor/test/in_process_context_factory.h View 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M ui/compositor/test/test_compositor_host_android.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/test/test_compositor_host_ozone.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/test/test_compositor_host_win.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M ui/compositor/test/test_compositor_host_x11.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/surface_context_factory.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/surface_context_factory.cc View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 108 (66 generated)
danakj
+fsamuel for mus
4 years, 4 months ago (2016-08-10 23:03:16 UTC) #4
danakj
+fsamuel for mus
4 years, 4 months ago (2016-08-10 23:03:18 UTC) #5
danakj
On 2016/08/10 23:03:18, danakj wrote: > +fsamuel for mus Oh, sorry, no owners there. +sky ...
4 years, 4 months ago (2016-08-10 23:04:33 UTC) #9
danakj
https://codereview.chromium.org/2238693002/diff/1/cc/output/renderer.h File cc/output/renderer.h (right): https://codereview.chromium.org/2238693002/diff/1/cc/output/renderer.h#newcode90 cc/output/renderer.h:90: : client_(client), settings_(settings), visible_(false) {} This is a change ...
4 years, 4 months ago (2016-08-10 23:05:26 UTC) #10
danakj
This is a bit more complicated, arg. We need to restore visible when the output ...
4 years, 4 months ago (2016-08-10 23:36:41 UTC) #11
danakj
So ok this is more like it. It's an exercise for the reader if this ...
4 years, 4 months ago (2016-08-11 00:02:11 UTC) #15
enne (OOO)
Here's an alternate thought that I'm not sure is ideal. What about just dropping the ...
4 years, 4 months ago (2016-08-11 00:04:19 UTC) #16
danakj
On 2016/08/11 00:04:19, enne wrote: > Here's an alternate thought that I'm not sure is ...
4 years, 4 months ago (2016-08-11 00:08:37 UTC) #17
piman
LGTM re: discarding the OutputSurface (and I assume the context), it feels more involved - ...
4 years, 4 months ago (2016-08-11 04:01:34 UTC) #18
danakj
Sounds good.
4 years, 4 months ago (2016-08-11 16:57:30 UTC) #20
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/2238693002/20001
4 years, 4 months ago (2016-08-11 16:57:59 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/206093)
4 years, 4 months ago (2016-08-11 17:12:55 UTC) #24
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/2238693002/40001
4 years, 4 months ago (2016-08-11 22:16:10 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/206344)
4 years, 4 months ago (2016-08-11 22:37:47 UTC) #29
danakj
So ok I fixed the InProcessContextFactory for tests, to track the visible state and set ...
4 years, 4 months ago (2016-08-13 00:24:05 UTC) #32
danakj
OK So now the DisplayScheduler stops trying to draw when not visible. And we dcheck ...
4 years, 4 months ago (2016-08-13 01:39:44 UTC) #46
danakj
On 2016/08/13 01:39:44, danakj wrote: > OK So now the DisplayScheduler stops trying to draw ...
4 years, 4 months ago (2016-08-13 01:40:09 UTC) #48
danakj
I added/changed some DisplayScheduler tests for dealing with visibility.
4 years, 4 months ago (2016-08-13 02:25:17 UTC) #52
piman
lgtm
4 years, 4 months ago (2016-08-15 20:33:17 UTC) #57
jbauman
lgtm On 2016/08/13 01:40:09, danakj wrote: > On 2016/08/13 01:39:44, danakj wrote: > > OK ...
4 years, 4 months ago (2016-08-15 21:37:25 UTC) #58
sunnyps
Left a few comments. All the SetVisible(true) calls make me think that visible = true ...
4 years, 4 months ago (2016-08-15 23:20:03 UTC) #59
danakj
On Mon, Aug 15, 2016 at 4:20 PM, <sunnyps@chromium.org> wrote: > Left a few comments. ...
4 years, 4 months ago (2016-08-15 23:47:46 UTC) #60
danakj
sunnyps: PTAL piman: PTAL. - I've made ui/compositor DEPS allow khronos/GLES2/gl2.h for the unit test ...
4 years, 4 months ago (2016-08-16 00:37:23 UTC) #64
piman
lgtm
4 years, 4 months ago (2016-08-16 00:45:28 UTC) #65
danakj
On 2016/08/15 23:47:46, danakj wrote: > On Mon, Aug 15, 2016 at 4:20 PM, <mailto:sunnyps@chromium.org> ...
4 years, 4 months ago (2016-08-16 19:55:14 UTC) #74
sunnyps
LGTM with nits https://codereview.chromium.org/2238693002/diff/280001/cc/output/gl_renderer_unittest.cc File cc/output/gl_renderer_unittest.cc (right): https://codereview.chromium.org/2238693002/diff/280001/cc/output/gl_renderer_unittest.cc#newcode2220 cc/output/gl_renderer_unittest.cc:2220: EXPECT_CALL(*(context_support_ptr_), SetClientVisible(0, true)); nit: brackets around ...
4 years, 4 months ago (2016-08-16 20:18:13 UTC) #75
danakj
https://codereview.chromium.org/2238693002/diff/280001/cc/output/gl_renderer_unittest.cc File cc/output/gl_renderer_unittest.cc (right): https://codereview.chromium.org/2238693002/diff/280001/cc/output/gl_renderer_unittest.cc#newcode2220 cc/output/gl_renderer_unittest.cc:2220: EXPECT_CALL(*(context_support_ptr_), SetClientVisible(0, true)); On 2016/08/16 20:18:13, sunnyps wrote: > ...
4 years, 4 months ago (2016-08-16 20:33:06 UTC) #76
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/2238693002/300001
4 years, 4 months ago (2016-08-16 20:33:54 UTC) #79
danakj
https://codereview.chromium.org/2238693002/diff/280001/cc/output/gl_renderer_unittest.cc File cc/output/gl_renderer_unittest.cc (right): https://codereview.chromium.org/2238693002/diff/280001/cc/output/gl_renderer_unittest.cc#newcode2225 cc/output/gl_renderer_unittest.cc:2225: Mock::VerifyAndClearExpectations(context_support_ptr_); On 2016/08/16 20:33:05, danakj wrote: > On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 20:34:22 UTC) #80
danakj
Ah, I broke webview somehow. [ RUN ] ActiveCompositorSwitchAfterConstructionTest.RunTest [FATAL:direct_renderer.cc(204)] Check failed: visible().
4 years, 4 months ago (2016-08-16 21:57:06 UTC) #82
danakj
I think the change in android_webview/browser/surfaces_instance.cc will fix it, setting visible on the Display when ...
4 years, 4 months ago (2016-08-16 22:04:28 UTC) #85
boliu
On 2016/08/16 22:04:28, danakj wrote: > I think the change in android_webview/browser/surfaces_instance.cc will fix it, ...
4 years, 4 months ago (2016-08-16 22:05:37 UTC) #86
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/2238693002/320001
4 years, 4 months ago (2016-08-16 22:12:11 UTC) #90
danakj
Need one more call to SetVisible(true) in CompositorImpl::InitializeDisplay too.
4 years, 4 months ago (2016-08-16 23:20:29 UTC) #91
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/2238693002/340001
4 years, 4 months ago (2016-08-16 23:43:25 UTC) #96
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/123895)
4 years, 4 months ago (2016-08-17 00:48:28 UTC) #98
danakj
Hm hm. android_webview_test_apk is timing out or failing somehow. Running it locally it seems to ...
4 years, 4 months ago (2016-08-17 00:49:52 UTC) #99
danakj
On 2016/08/17 00:49:52, danakj wrote: > Hm hm. android_webview_test_apk is timing out or failing somehow. ...
4 years, 4 months ago (2016-08-17 01:00:38 UTC) #100
danakj
On 2016/08/17 01:00:38, danakj wrote: > On 2016/08/17 00:49:52, danakj wrote: > > Hm hm. ...
4 years, 4 months ago (2016-08-17 01:16:29 UTC) #101
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/2238693002/360001
4 years, 4 months ago (2016-08-17 01:17:00 UTC) #104
commit-bot: I haz the power
Committed patchset #16 (id:360001)
4 years, 4 months ago (2016-08-17 02:10:40 UTC) #106
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 02:12:53 UTC) #108
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/6f2861b9c957c7374a2a2c084c6cafba01b5e5d6
Cr-Commit-Position: refs/heads/master@{#412421}

Powered by Google App Engine
This is Rietveld 408576698