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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 196343005: cc: Replace recorded region with direct map lookup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Partial invalidation test case Created 6 years, 9 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/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 9ec6fac5c412c7dff2a8c98c38dfecaa0625ad26..f06bd6a72b986e2eb32a8ab829969a5acc0f7bbe 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -864,8 +864,7 @@ PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) {
PictureLayerTiling* tiling = tilings_->AddTiling(contents_scale);
- const Region& recorded = pile_->recorded_region();
- DCHECK(!recorded.IsEmpty());
+ DCHECK(pile_->HasRecordings());
if (twin_layer_ &&
twin_layer_->ShouldUseGpuRasterization() == ShouldUseGpuRasterization())
@@ -1177,7 +1176,7 @@ void PictureLayerImpl::ResetRasterScale() {
bool PictureLayerImpl::CanHaveTilings() const {
if (!DrawsContent())
return false;
- if (pile_->recorded_region().IsEmpty())
+ if (!pile_->HasRecordings())
return false;
return true;
}
@@ -1221,11 +1220,6 @@ void PictureLayerImpl::AsValueInto(base::DictionaryValue* state) const {
state->Set("pictures", pile_->AsValue().release());
state->Set("invalidation", invalidation_.AsValue().release());
- Region unrecorded_region(gfx::Rect(pile_->size()));
- unrecorded_region.Subtract(pile_->recorded_region());
- if (!unrecorded_region.IsEmpty())
- state->Set("unrecorded_region", unrecorded_region.AsValue().release());
-
scoped_ptr<base::ListValue> coverage_tiles(new base::ListValue);
for (PictureLayerTilingSet::CoverageIterator iter(tilings_.get(),
contents_scale_x(),
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698