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

Unified Diff: cc/resources/picture_layer_tiling_set.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.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 | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_layer_tiling_unittest.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 7c36a3ff552e40ccf701abdb466e489560500562..d9315434860bbd516a8e0b415ca569b50c7667f6 100644
--- a/cc/resources/picture_layer_tiling_set.cc
+++ b/cc/resources/picture_layer_tiling_set.cc
@@ -65,6 +65,13 @@ 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, it was not updated for the
+ // current frame. So we drop tilings from our set 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);
@@ -479,7 +486,8 @@ PictureLayerTilingSet::CoverageIterator::operator bool() const {
region_iter_.has_rect();
}
-void PictureLayerTilingSet::AsValueInto(base::debug::TracedValue* state) const {
+void PictureLayerTilingSet::AsValueInto(
+ base::trace_event::TracedValue* state) const {
for (size_t i = 0; i < tilings_.size(); ++i) {
state->BeginDictionary();
tilings_[i]->AsValueInto(state);
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698