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

Issue 2642123004: Fix surface reference assumptions in SurfaceManager. (Closed)

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

Description

Fix surface reference assumptions in SurfaceManager. The original plan was to use the surface reference graph plus SurfaceSequences to help migrate code to use surface reference graph. That doesn't look to be necessary and/or workable now so cleanup SurfaceMananger. 1. Remove checking count of surface references in the surface reference graph. We won't add references if we are using the old system. 2. If a surface drops to having 0 incoming references, don't delete all references it holds. We are doing garbage collection via top-level root, so there is no need to cleanup references. This wouldn't work if a cycle got introduced anyways. 3. Add cleanup of references when a surface is deleted. Since (2) no longer happens we have to cleanup references on delete. 4. Cleanup unit tests. The older tests are improved to actually check the specific references exist instead of just having the right number. Also fix some style differences across new + old tests to make them easier to read. This also sets things up to remove the SurfaceReferenceManager interface that is now unused. BUG=659227 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2642123004 Cr-Commit-Position: refs/heads/master@{#446053} Committed: https://chromium.googlesource.com/chromium/src/+/43117a2e3860fed908e46bed85624b17358fe63b

Patch Set 1 #

Patch Set 2 : Rebase + fixes. #

Patch Set 3 : Rebase + fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -204 lines) Patch
M cc/surfaces/surface_factory_unittest.cc View 1 2 1 chunk +7 lines, -2 lines 0 comments Download
M cc/surfaces/surface_manager.h View 1 2 1 chunk +17 lines, -9 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 7 chunks +62 lines, -76 lines 0 comments Download
M cc/surfaces/surface_manager_ref_unittest.cc View 1 15 chunks +116 lines, -117 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (17 generated)
kylechar
+danakj for review +fsamuel FYI
3 years, 11 months ago (2017-01-24 18:23:58 UTC) #7
danakj
Passing to jbauman, lmk if that's not good
3 years, 11 months ago (2017-01-24 19:25:38 UTC) #11
jbauman
lgtm
3 years, 11 months ago (2017-01-24 20:53:11 UTC) #12
kylechar
Thanks!
3 years, 11 months ago (2017-01-25 16:42:04 UTC) #13
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/2642123004/40001
3 years, 11 months ago (2017-01-25 17:40:05 UTC) #20
commit-bot: I haz the power
3 years, 11 months ago (2017-01-25 17:46:34 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/43117a2e3860fed908e46bed8562...

Powered by Google App Engine
This is Rietveld 408576698