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

Side by Side Diff: cc/resources/picture_layer_tiling_set.cc

Issue 878743005: cc: Add some debugging info to failing DCHECK in PictureLayerTilingSet (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 if (!tilings_.empty()) { 118 if (!tilings_.empty()) {
119 size_t num_high_res = std::count_if(tilings_.begin(), tilings_.end(), 119 size_t num_high_res = std::count_if(tilings_.begin(), tilings_.end(),
120 [](PictureLayerTiling* tiling) { 120 [](PictureLayerTiling* tiling) {
121 return tiling->resolution() == HIGH_RESOLUTION; 121 return tiling->resolution() == HIGH_RESOLUTION;
122 }); 122 });
123 DCHECK_LE(num_high_res, 1u); 123 DCHECK_LE(num_high_res, 1u);
124 // When commiting from the main thread the high res tiling may get dropped, 124 // When commiting from the main thread the high res tiling may get dropped,
125 // but when cloning to the active tree, there should always be one. 125 // but when cloning to the active tree, there should always be one.
126 if (twin_set) 126 if (twin_set)
vmpstr 2015/02/05 18:26:33 nit: wrap in braces please
danakj 2015/02/05 18:32:03 Done.
127 DCHECK_EQ(1u, num_high_res); 127 DCHECK_EQ(1u, num_high_res)
128 << " num tilings on active: " << tilings_.size()
vmpstr 2015/02/05 18:26:33 Maybe also tilings_->NumHighResTilings() for both
danakj 2015/02/05 18:32:03 Done.
129 << " num tilings on pending: " << twin_set->tilings_.size()
130 << " are on active tree: " << (client_->GetTree() == ACTIVE_TREE);
128 } 131 }
129 #endif 132 #endif
130 } 133 }
131 134
132 void PictureLayerTilingSet::CleanUpTilings( 135 void PictureLayerTilingSet::CleanUpTilings(
133 float min_acceptable_high_res_scale, 136 float min_acceptable_high_res_scale,
134 float max_acceptable_high_res_scale, 137 float max_acceptable_high_res_scale,
135 const std::vector<PictureLayerTiling*>& needed_tilings, 138 const std::vector<PictureLayerTiling*>& needed_tilings,
136 bool should_have_low_res, 139 bool should_have_low_res,
137 PictureLayerTilingSet* twin_set, 140 PictureLayerTilingSet* twin_set,
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 case LOWER_THAN_LOW_RES: 539 case LOWER_THAN_LOW_RES:
537 range = TilingRange(low_res_range.end, tilings_.size()); 540 range = TilingRange(low_res_range.end, tilings_.size());
538 break; 541 break;
539 } 542 }
540 543
541 DCHECK_LE(range.start, range.end); 544 DCHECK_LE(range.start, range.end);
542 return range; 545 return range;
543 } 546 }
544 547
545 } // namespace cc 548 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698