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

Unified Diff: cc/layers/layer_impl.cc

Issue 2417783005: [Master/Overview CL] Make PageScaleFactor work for oopif subframe.
Patch Set: Created 4 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 | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 86c716946a95da937550d1af9fa08e64d7184386..3d20600ccc2bef7990cb12573b5d7c1c4195d62f 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1077,9 +1077,14 @@ bool LayerImpl::IsHidden() const {
}
float LayerImpl::GetIdealContentsScale() const {
- float page_scale = IsAffectedByPageScale()
- ? layer_tree_impl()->current_page_scale_factor()
- : 1.f;
+ // When there is no page scale layer we could be rendering a sub-frame in
+ // a separate process, so we should include the current page scale factor
+ // for creating the raster scale.
+ // TODO(wjmaclean): Re-word this comment in a more CC-like manner.
+ float page_scale =
+ (!layer_tree_impl()->PageScaleLayer() || IsAffectedByPageScale())
+ ? layer_tree_impl()->current_page_scale_factor()
+ : 1.f;
float device_scale = layer_tree_impl()->device_scale_factor();
float default_scale = page_scale * device_scale;
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698