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

Issue 2278283003: Refactor client visibility handling (Closed)

Created:
4 years, 3 months ago by ericrk
Modified:
4 years, 3 months ago
Reviewers:
danakj, msw, no sievers, Wez, boliu
CC:
chromium-reviews, sievers+watch_chromium.org, nyquist+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, jam, gcasto+watch-blimp_chromium.org, jbauman+watch_chromium.org, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, darin-cc_chromium.org, lethalantidote+watch-blimp_chromium.org, kalyank, android-webview-reviews_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, khushalsagar+watch-blimp_chromium.org, rjkroege, anandc+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, danakj+watch_chromium.org, dtrainor+watch-blimp_chromium.org, Fady Samuel
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor client visibility handling Currently, ContextSupport::SetClientVisibile relies on the caller remembering to pair visible/not-visible calls. Failure to do so will result in a "leak", where the context support will always think there are visible clients. To avoid this, visibility handling now uses ScopedVisibility objects which will dcheck if visible > not visible updates are not paired. This change also introduces a new ContextCacheController object which handles trimming context caches based on visibility. This simplifies handling in clients of the ContextProvider and removes this logic from ContextSupport. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/f6c4fb6b0b77f35f094cb73c49b0bfe22d3f4461 Cr-Commit-Position: refs/heads/master@{#415491}

Patch Set 1 #

Patch Set 2 : fix perftest #

Patch Set 3 : fix compositor_unittests #

Total comments: 55

Patch Set 4 : feedback #

Total comments: 16

Patch Set 5 : rebase #

Patch Set 6 : feedback + de-virtualize cc::ccc #

Patch Set 7 : rebase #

Patch Set 8 : fix android #

Patch Set 9 : more fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+526 lines, -282 lines) Patch
M android_webview/browser/aw_render_thread_context_provider.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M android_webview/browser/aw_render_thread_context_provider.cc View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -10 lines 0 comments Download
M blimp/client/support/compositor/blimp_context_provider.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M blimp/client/support/compositor/blimp_context_provider.cc View 1 2 3 4 5 6 4 chunks +10 lines, -8 lines 0 comments Download
M cc/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A cc/output/context_cache_controller.h View 1 2 3 4 1 chunk +74 lines, -0 lines 0 comments Download
A cc/output/context_cache_controller.cc View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download
A cc/output/context_cache_controller_unittest.cc View 1 2 3 1 chunk +56 lines, -0 lines 0 comments Download
M cc/output/context_provider.h View 3 chunks +2 lines, -3 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 2 chunks +15 lines, -9 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 4 5 3 chunks +3 lines, -28 lines 0 comments Download
M cc/raster/raster_buffer_provider_perftest.cc View 1 2 3 4 chunks +8 lines, -2 lines 0 comments Download
M cc/test/test_context_provider.h View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download
M cc/test/test_context_provider.cc View 4 5 5 chunks +9 lines, -3 lines 0 comments Download
M cc/test/test_context_support.h View 2 chunks +0 lines, -3 lines 0 comments Download
M cc/test/test_context_support.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M cc/test/test_in_process_context_provider.h View 2 chunks +2 lines, -1 line 0 comments Download
M cc/test/test_in_process_context_provider.cc View 4 chunks +9 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 3 chunks +12 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 chunks +65 lines, -51 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 4 chunks +126 lines, -84 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 5 chunks +9 lines, -7 lines 0 comments Download
M gpu/command_buffer/client/context_support.h View 1 chunk +0 lines, -4 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 2 chunks +0 lines, -5 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 chunk +0 lines, -15 lines 0 comments Download
M services/ui/public/cpp/context_provider.h View 2 chunks +2 lines, -1 line 0 comments Download
M services/ui/public/cpp/context_provider.cc View 1 2 3 3 chunks +9 lines, -0 lines 0 comments Download
M services/ui/surfaces/surfaces_context_provider.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M services/ui/surfaces/surfaces_context_provider.cc View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_provider.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M ui/compositor/test/in_process_context_provider.cc View 1 2 4 chunks +10 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 58 (42 generated)
ericrk
Hey Daniel, what do you think of something like this?
4 years, 3 months ago (2016-08-26 21:47:34 UTC) #13
ericrk
Hey Dana, here's the re-work of the visibility cleanup. Mostly pretty similar, except that we ...
4 years, 3 months ago (2016-08-26 22:53:03 UTC) #20
ericrk
https://codereview.chromium.org/2278283003/diff/100001/cc/output/context_cache_controller.h File cc/output/context_cache_controller.h (right): https://codereview.chromium.org/2278283003/diff/100001/cc/output/context_cache_controller.h#newcode27 cc/output/context_cache_controller.h:27: class CC_EXPORT ContextCacheController { This name is a bit ...
4 years, 3 months ago (2016-08-26 22:55:47 UTC) #21
danakj
https://codereview.chromium.org/2278283003/diff/100001/android_webview/browser/aw_render_thread_context_provider.h File android_webview/browser/aw_render_thread_context_provider.h (right): https://codereview.chromium.org/2278283003/diff/100001/android_webview/browser/aw_render_thread_context_provider.h#newcode62 android_webview/browser/aw_render_thread_context_provider.h:62: std::unique_ptr<cc::ContextCacheController> cache_controller_; This has a pointer to the gr_context_ ...
4 years, 3 months ago (2016-08-26 23:49:09 UTC) #22
ericrk
Thanks for the feedback! https://codereview.chromium.org/2278283003/diff/100001/android_webview/browser/aw_render_thread_context_provider.h File android_webview/browser/aw_render_thread_context_provider.h (right): https://codereview.chromium.org/2278283003/diff/100001/android_webview/browser/aw_render_thread_context_provider.h#newcode62 android_webview/browser/aw_render_thread_context_provider.h:62: std::unique_ptr<cc::ContextCacheController> cache_controller_; On 2016/08/26 23:49:08, ...
4 years, 3 months ago (2016-08-29 22:43:23 UTC) #25
danakj
LGTM, few more thoughts https://codereview.chromium.org/2278283003/diff/100001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/2278283003/diff/100001/cc/output/gl_renderer.cc#newcode423 cc/output/gl_renderer.cc:423: output_surface_->context_provider() On 2016/08/29 22:43:22, ericrk ...
4 years, 3 months ago (2016-08-29 23:56:20 UTC) #26
ericrk
Thanks for the feedback! De-virtualized to simplify things. https://codereview.chromium.org/2278283003/diff/160001/cc/output/context_cache_controller.h File cc/output/context_cache_controller.h (right): https://codereview.chromium.org/2278283003/diff/160001/cc/output/context_cache_controller.h#newcode52 cc/output/context_cache_controller.h:52: virtual ...
4 years, 3 months ago (2016-08-30 18:18:58 UTC) #28
ericrk
Adding some reviewers for ContextProvider changes - ContextProviders now have a ContextCacheController - this manages ...
4 years, 3 months ago (2016-08-30 18:22:04 UTC) #30
boliu
rs lgtm
4 years, 3 months ago (2016-08-30 18:27:12 UTC) #33
no sievers
content + gpu lgtm
4 years, 3 months ago (2016-08-30 20:09:52 UTC) #40
Wez
blimp/ LGTM It looks like the impl in the BlimpContextProvider is pretty standard - is ...
4 years, 3 months ago (2016-08-30 20:48:49 UTC) #45
msw
services/ui rubber-stamp lgtm (+CC fsamuel and rjkroege)
4 years, 3 months ago (2016-08-30 23:11:50 UTC) #50
ericrk
On 2016/08/30 20:48:49, Wez wrote: > blimp/ LGTM > > It looks like the impl ...
4 years, 3 months ago (2016-08-30 23:20:26 UTC) #51
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/2278283003/280001
4 years, 3 months ago (2016-08-30 23:21:12 UTC) #54
commit-bot: I haz the power
Committed patchset #9 (id:280001)
4 years, 3 months ago (2016-08-30 23:27:55 UTC) #56
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 23:29:43 UTC) #58
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f6c4fb6b0b77f35f094cb73c49b0bfe22d3f4461
Cr-Commit-Position: refs/heads/master@{#415491}

Powered by Google App Engine
This is Rietveld 408576698