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

Unified Diff: cc/resources/picture_layer_tiling_set.cc

Issue 924213002: cc: Fix DCHECK when impl thread changes scale on a layer being hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling_set.cc
diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc
index e1659be78f592296b1a3bd78f4d32592588762df..7225d29c37621caab9bb718f4c39e675837054a1 100644
--- a/cc/resources/picture_layer_tiling_set.cc
+++ b/cc/resources/picture_layer_tiling_set.cc
@@ -65,6 +65,14 @@ void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSource(
// Copy over tilings that are shared with the |twin_set| tiling set (if it
// exists).
if (twin_set) {
+ if (twin_set->tilings_.empty()) {
+ // If the twin (pending) tiling set is empty, for example it does not have
enne (OOO) 2015/02/14 00:31:05 Are there any reasons why the active tree could st
danakj 2015/02/14 00:41:25 We don't know what properties to use for the tilin
enne (OOO) 2015/02/14 00:50:30 I guess I'm trying to say that I don't understand
danakj 2015/02/14 00:52:20 The pending set is empty means UpdateTiles didn't
enne (OOO) 2015/02/14 00:53:14 Sure, but why does UpdateTiles not happening on th
danakj 2015/02/14 00:57:38 Ah. Well, the other choice is to leave behind a bu
+ // valid draw properties so no tilings, then we drop all tilings here as
+ // well, instead of leaving behind unshared tilings that are all
+ // non-ideal.
+ RemoveAllTilings();
+ }
+
for (PictureLayerTiling* twin_tiling : twin_set->tilings_) {
float contents_scale = twin_tiling->contents_scale();
DCHECK_GE(contents_scale, minimum_contents_scale);
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698