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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 865973007: cc: Remove if checks for PictureLayerImpl::tilings_. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | 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 3dbce3cb6dab0bb1327dfb34bb0811fbccc7b8b6..9f5c14c80aaa744928ea3cad1590451dadf54d4d 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -589,9 +589,8 @@ void PictureLayerImpl::DidBeginTracing() {
void PictureLayerImpl::ReleaseResources() {
// Recreate tilings with new settings, since some of those might change when
- // we release resources. If tilings_ is null, then leave it as null.
- if (tilings_)
- tilings_ = CreatePictureLayerTilingSet();
+ // we release resources.
+ tilings_ = CreatePictureLayerTilingSet();
ResetRasterScale();
// To avoid an edge case after lost context where the tree is up to date but
@@ -784,8 +783,7 @@ PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) {
}
void PictureLayerImpl::RemoveAllTilings() {
- if (tilings_)
- tilings_->RemoveAllTilings();
+ tilings_->RemoveAllTilings();
// If there are no tilings, then raster scales are no longer meaningful.
ResetRasterScale();
}
« 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