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

Issue 11079007: Fix issue incremental upload can evict textures being drawn (Closed)

Created:
8 years, 2 months ago by ccameron
Modified:
8 years, 2 months ago
Reviewers:
jamesr, epenner, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Fix issue where textures currently being drawn by the impl thread can be recycled or evicted by the main thread. Explicitly push priorities to their backings when a commit begins, and then update the presence of backings' resources in the impl tree when the trees are synchronized. Note that in the worst case we can momentarily overshoot the texture budget by a factor of two because we keep around both the currently-drawing and the next frame. Make the CCProxy implementations call the PTM directly instead of maintaining a bunch of wrapper functions in CCLayerTreeHost. Make reduceMemory (called when synchronizing trees at the end of a commit) be the one true place where backings structures are deleted (they are just evicted in all other places). Also, we can cut the PTM into a CCPrioritizedTextureManager and CCPrioritizedBackingManager where the former is a main-thread structure and the latter is an impl-thread structure. This change make the PTM follow parts of the commit flow, which will be more explicit with the separate structures. BUG=152496 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161949

Patch Set 1 #

Patch Set 2 : Incorporate review feedback #

Total comments: 7

Patch Set 3 : Incorporate review feedback #

Patch Set 4 : Fix ordering #

Patch Set 5 : Resolve against head #

Patch Set 6 : Resolve against The Great Renaming #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -169 lines) Patch
M cc/layer_tree_host.h View 1 2 3 4 5 1 chunk +0 lines, -16 lines 0 comments Download
M cc/layer_tree_host.cc View 1 2 3 4 5 3 chunks +3 lines, -38 lines 0 comments Download
M cc/prioritized_texture.h View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M cc/prioritized_texture.cc View 1 2 3 4 5 2 chunks +15 lines, -3 lines 0 comments Download
M cc/prioritized_texture_manager.h View 1 2 3 4 5 4 chunks +31 lines, -20 lines 0 comments Download
M cc/prioritized_texture_manager.cc View 1 2 3 4 5 13 chunks +72 lines, -53 lines 0 comments Download
M cc/prioritized_texture_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/single_thread_proxy.cc View 1 2 3 4 5 3 chunks +5 lines, -7 lines 0 comments Download
M cc/thread_proxy.h View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 3 4 5 6 chunks +20 lines, -25 lines 0 comments Download
M cc/tiled_layer_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
ccameron
8 years, 2 months ago (2012-10-06 00:09:37 UTC) #1
epenner
On 2012/10/06 00:09:37, ccameron1 wrote: As a bit of a history for this bug: The ...
8 years, 2 months ago (2012-10-06 05:53:13 UTC) #2
ccameron
The CL that you uploaded fixes the issue and is overall much simpler. That said, ...
8 years, 2 months ago (2012-10-07 21:32:38 UTC) #3
epenner
Sounds good, let's meet up to discuss. If anything though, we shouldn't add functionality until ...
8 years, 2 months ago (2012-10-07 22:33:15 UTC) #4
epenner
> Part of the reason this doesn't happen currently is the particular behavior or > ...
8 years, 2 months ago (2012-10-07 22:50:40 UTC) #5
ccameron
On 2012/10/07 22:33:15, epenner wrote: > Sounds good, let's meet up to discuss. If anything ...
8 years, 2 months ago (2012-10-08 08:17:15 UTC) #6
ccameron
Eric and I talked about this offline, and we decided to keep the two-phase "push ...
8 years, 2 months ago (2012-10-09 08:36:49 UTC) #7
epenner
Looking good. https://codereview.chromium.org/11079007/diff/7001/cc/CCPrioritizedTextureManager.cpp File cc/CCPrioritizedTextureManager.cpp (right): https://codereview.chromium.org/11079007/diff/7001/cc/CCPrioritizedTextureManager.cpp#newcode402 cc/CCPrioritizedTextureManager.cpp:402: ASSERT(m_backings.find(backing) == m_backings.end()); Maybe ASSERT that it's ...
8 years, 2 months ago (2012-10-09 17:25:04 UTC) #8
epenner
On 2012/10/09 17:25:04, epenner wrote: > Looking good. The description needs updating as a lot ...
8 years, 2 months ago (2012-10-09 17:27:21 UTC) #9
ccameron
Thanks! https://codereview.chromium.org/11079007/diff/7001/cc/CCPrioritizedTextureManager.cpp File cc/CCPrioritizedTextureManager.cpp (right): https://codereview.chromium.org/11079007/diff/7001/cc/CCPrioritizedTextureManager.cpp#newcode402 cc/CCPrioritizedTextureManager.cpp:402: ASSERT(m_backings.find(backing) == m_backings.end()); On 2012/10/09 17:25:04, epenner wrote: ...
8 years, 2 months ago (2012-10-09 21:03:56 UTC) #10
ccameron
Resolved against head. Ptal.
8 years, 2 months ago (2012-10-11 20:28:21 UTC) #11
ccameron
ptal
8 years, 2 months ago (2012-10-12 19:12:46 UTC) #12
ccameron
Resolved against The Great Renaming.
8 years, 2 months ago (2012-10-13 00:21:33 UTC) #13
ccameron
ptal
8 years, 2 months ago (2012-10-15 17:18:01 UTC) #14
enne (OOO)
lgtm lgtm > Also, we can cut the PTM into a CCPrioritizedTextureManager and CCPrioritizedBackingManager where ...
8 years, 2 months ago (2012-10-15 18:12:15 UTC) #15
jamesr
On 2012/10/15 18:12:15, enne wrote: > lgtm > > lgtm > > > Also, we ...
8 years, 2 months ago (2012-10-15 18:13:14 UTC) #16
enne (OOO)
More seriously, before such a cut happens, I'd like to whiteboard out how such a ...
8 years, 2 months ago (2012-10-15 18:15:08 UTC) #17
ccameron
Thanks!! On 2012/10/15 18:15:08, enne wrote: > More seriously, before such a cut happens, I'd ...
8 years, 2 months ago (2012-10-15 18:29:11 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/11079007/21001
8 years, 2 months ago (2012-10-15 18:29:56 UTC) #19
commit-bot: I haz the power
8 years, 2 months ago (2012-10-15 20:43:27 UTC) #20
Change committed as 161949

Powered by Google App Engine
This is Rietveld 408576698