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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 634683003: Converted LayerImpl::bounds() to return SizeF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_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 8a78bb1a8e2c9cce50a8837696e64e43a9f748aa..da20cc54b9e8d6d84ee7a6caf2fd3a50c59a57d1 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -743,7 +743,10 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
bool synced_high_res_tiling = false;
if (CanHaveTilings()) {
synced_high_res_tiling = tilings_->SyncTilings(
- *other->tilings_, bounds(), invalidation_, MinimumContentsScale());
+ *other->tilings_,
+ gfx::ToCeiledSize(bounds()),
+ invalidation_,
+ MinimumContentsScale());
} else {
RemoveAllTilings();
}
@@ -961,7 +964,8 @@ void PictureLayerImpl::DoPostCommitInitialization() {
DCHECK(layer_tree_impl()->IsPendingTree());
if (!tilings_)
- tilings_.reset(new PictureLayerTilingSet(this, bounds()));
+ tilings_.reset(new PictureLayerTilingSet(this,
+ gfx::ToCeiledSize(bounds())));
DCHECK(!twin_layer_);
twin_layer_ = static_cast<PictureLayerImpl*>(
@@ -1302,7 +1306,7 @@ float PictureLayerImpl::MinimumContentsScale() const {
// then it will end up having less than one pixel of content in that
// dimension. Bump the minimum contents scale up in this case to prevent
// this from happening.
- int min_dimension = std::min(bounds().width(), bounds().height());
+ float min_dimension = std::min(bounds().width(), bounds().height());
if (!min_dimension)
return setting_min;
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698