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

Unified Diff: cc/layers/layer_impl.cc

Issue 271533011: cc: Move tiling management out of draw properties calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP - use properly scaled content_bounds Created 6 years, 7 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
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index a6738cc5d956ef2082da23c2bea30a0b450ed1cc..9895ef65c542855e51ba2e00581f474db7e0e23a 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1064,13 +1064,18 @@ void LayerImpl::CalculateContentsScale(float ideal_contents_scale,
float* contents_scale_x,
float* contents_scale_y,
gfx::Size* content_bounds) {
- // Base LayerImpl has all of its content scales and content bounds pushed
- // from its Layer during commit and just reuses those values as-is.
- *contents_scale_x = this->contents_scale_x();
- *contents_scale_y = this->contents_scale_y();
- *content_bounds = this->content_bounds();
+ if (layer_tree_impl()->settings().impl_side_painting) {
danakj 2014/05/15 15:15:31 Why did you need this? The bounds == content_bound
+ *contents_scale_x = 1.f;
+ *contents_scale_y = 1.f;
+ *content_bounds = bounds();
+ } else {
+ // Base LayerImpl has all of its content scales and content bounds pushed
+ // from its Layer during commit and just reuses those values as-is.
+ *contents_scale_x = this->contents_scale_x();
+ *contents_scale_y = this->contents_scale_y();
+ *content_bounds = this->content_bounds();
+ }
}
-
void LayerImpl::SetScrollOffsetDelegate(
LayerScrollOffsetDelegate* scroll_offset_delegate) {
// Having both a scroll parent and a scroll offset delegate is unsupported.

Powered by Google App Engine
This is Rietveld 408576698