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

Issue 2540783004: Add SurfaceManager option to use references exclusively. (Closed)

Created:
4 years ago by kylechar
Modified:
4 years ago
Reviewers:
Fady Samuel, vmpstr
CC:
chromium-reviews, rjkroege, cc-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add SurfaceManager option to use references exclusively. SurfaceManager should be able to walk from root and delete all destroyed and unreachable surfaces. This doesn't work in conjunction with surface sequence dependencies (like regular chrome) but works fine for mustash which only uses surface refrences. Add an optional parameter to SurfaceManager. This parameter would be removed when everything uses surface references. BUG=659227 Committed: https://crrev.com/a886f220c05a5d12d65ccf97bfc86ec1985dc93e Cr-Commit-Position: refs/heads/master@{#435970}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fixes. #

Total comments: 3

Patch Set 3 : Add .push(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -8 lines) Patch
M cc/surfaces/surface_manager.h View 1 2 4 chunks +13 lines, -2 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 6 chunks +56 lines, -5 lines 0 comments Download
M services/ui/surfaces/display_compositor.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 26 (15 generated)
kylechar
4 years ago (2016-11-30 15:57:57 UTC) #3
Fady Samuel
Very cool! lgtm
4 years ago (2016-11-30 16:03:11 UTC) #4
kylechar
Thanks! +enne for cc/surfaces/*
4 years ago (2016-11-30 16:03:50 UTC) #6
vmpstr
https://codereview.chromium.org/2540783004/diff/1/cc/surfaces/surface_manager.cc File cc/surfaces/surface_manager.cc (right): https://codereview.chromium.org/2540783004/diff/1/cc/surfaces/surface_manager.cc#newcode34 cc/surfaces/surface_manager.cc:34: LocalFrameId(1u, base::UnguessableToken::Create())) { Why 1u change? https://codereview.chromium.org/2540783004/diff/1/cc/surfaces/surface_manager.cc#newcode165 cc/surfaces/surface_manager.cc:165: std::queue<SurfaceId> ...
4 years ago (2016-12-01 21:04:02 UTC) #8
kylechar
https://codereview.chromium.org/2540783004/diff/1/cc/surfaces/surface_manager.cc File cc/surfaces/surface_manager.cc (right): https://codereview.chromium.org/2540783004/diff/1/cc/surfaces/surface_manager.cc#newcode34 cc/surfaces/surface_manager.cc:34: LocalFrameId(1u, base::UnguessableToken::Create())) { On 2016/12/01 21:04:02, vmpstr wrote: > ...
4 years ago (2016-12-01 22:49:58 UTC) #10
vmpstr
lgtm https://codereview.chromium.org/2540783004/diff/20001/cc/surfaces/surface_manager.cc File cc/surfaces/surface_manager.cc (right): https://codereview.chromium.org/2540783004/diff/20001/cc/surfaces/surface_manager.cc#newcode165 cc/surfaces/surface_manager.cc:165: std::queue<SurfaceId> surface_queue({root_surface_id_}); nit: still don't need brackets tho ...
4 years ago (2016-12-01 23:44:06 UTC) #11
kylechar
https://codereview.chromium.org/2540783004/diff/20001/cc/surfaces/surface_manager.cc File cc/surfaces/surface_manager.cc (right): https://codereview.chromium.org/2540783004/diff/20001/cc/surfaces/surface_manager.cc#newcode165 cc/surfaces/surface_manager.cc:165: std::queue<SurfaceId> surface_queue({root_surface_id_}); On 2016/12/01 23:44:06, vmpstr wrote: > nit: ...
4 years ago (2016-12-02 16:23:31 UTC) #12
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/2540783004/40001
4 years ago (2016-12-02 17:47:53 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-02 17:52:48 UTC) #23
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/a886f220c05a5d12d65ccf97bfc86ec1985dc93e Cr-Commit-Position: refs/heads/master@{#435970}
4 years ago (2016-12-02 17:56:49 UTC) #25
vmpstr
4 years ago (2016-12-02 19:54:49 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/2540783004/diff/20001/cc/surfaces/surface_man...
File cc/surfaces/surface_manager.cc (right):

https://codereview.chromium.org/2540783004/diff/20001/cc/surfaces/surface_man...
cc/surfaces/surface_manager.cc:165: std::queue<SurfaceId>
surface_queue({root_surface_id_});
On 2016/12/02 16:23:31, kylechar wrote:
> On 2016/12/01 23:44:06, vmpstr wrote:
> > nit: still don't need brackets tho :)
> 
> Do you mean the following
> std::queue<SurfaceId> surface_queue{root_surface_id_};
> 
> I actually can't get that to compile (it works fine for std::vector). Looking
> closer std::queue has different constructors than other contains.
> 
> I've added a separate push for the root_surface_id_ just to be safe.

Hmm weird. Thanks for making this safer then :P

Powered by Google App Engine
This is Rietveld 408576698