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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 716283003: cc: Remove GetRasterSource from PictureLayerTilingClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('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 6d8914033e1d43802052d9f9302bb656a1b9e657..a3ad71df49c2d709d417b364ee25f80f6058a92c 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -124,7 +124,7 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
layer_impl->UpdateRasterSource(raster_source_);
- DCHECK(!raster_source_->IsSolidColor() || !tilings_->num_tilings());
+ DCHECK_IMPLIES(raster_source_->IsSolidColor(), tilings_->num_tilings() == 0);
// Tilings would be expensive to push, so we swap.
layer_impl->tilings_.swap(tilings_);
layer_impl->tilings_->SetClient(layer_impl);
@@ -632,10 +632,6 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling,
flags);
}
-RasterSource* PictureLayerImpl::GetRasterSource() {
- return raster_source_.get();
-}
-
const Region* PictureLayerImpl::GetPendingInvalidation() {
if (layer_tree_impl()->IsPendingTree())
return &invalidation_;
@@ -788,9 +784,9 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
bool synced_high_res_tiling = false;
if (CanHaveTilings()) {
- synced_high_res_tiling =
- tilings_->SyncTilings(*other->tilings_, raster_source_->GetSize(),
- invalidation_, MinimumContentsScale());
+ synced_high_res_tiling = tilings_->SyncTilings(
+ *other->tilings_, raster_source_->GetSize(), invalidation_,
+ MinimumContentsScale(), raster_source_.get());
} else {
RemoveAllTilings();
}
@@ -865,7 +861,7 @@ void PictureLayerImpl::DoPostCommitInitialization() {
DCHECK(layer_tree_impl()->IsPendingTree());
if (!tilings_)
- tilings_ = make_scoped_ptr(new PictureLayerTilingSet(this));
+ tilings_ = PictureLayerTilingSet::Create(this);
PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
if (twin_layer) {
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698