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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 809433003: cc: Make the PictureLayerImpl raster source null until commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullrastersource: . Created 6 years 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/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 a6792aa42aea393a77081062663194124817020b..a04549a19b340095349aacdda6eaa3e8b459669a 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -69,8 +69,6 @@ PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl,
: LayerImpl(tree_impl, id),
twin_layer_(nullptr),
tilings_(CreatePictureLayerTilingSet()),
- // TODO(danakj): Can this be null to start?
- raster_source_(PicturePileImpl::Create()),
ideal_page_scale_(0.f),
ideal_device_scale_(0.f),
ideal_source_scale_(0.f),
@@ -580,7 +578,9 @@ void PictureLayerImpl::UpdateRasterSource(
<< " bounds " << bounds().ToString() << " pile "
<< raster_source->GetSize().ToString();
- bool could_have_tilings = CanHaveTilings();
+ // The |raster_source_| is initially null, so have to check for that for the
+ // first frame.
+ bool could_have_tilings = raster_source_.get() && CanHaveTilings();
vmpstr 2014/12/15 22:16:25 nit: It would be cleaner, albeit slower, if this c
danakj 2014/12/15 22:22:31 I think I prefer it here, I want to be clear that
raster_source_.swap(raster_source);
// The |new_invalidation| must be cleared before updating tilings since they
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698