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

Unified Diff: ui/compositor/layer.cc

Issue 719573003: Explicitly specify contents scale for SurfaceLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/surface_layer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 5f8800dc79f5d32accaea34f6c09c3a42230d608..d3d56348ebe49afbe39166534b08bb2323d1b13b 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -579,7 +579,11 @@ void Layer::SetShowSurface(
scoped_refptr<cc::SurfaceLayer> new_layer =
cc::SurfaceLayer::Create(satisfy_callback, require_callback);
- new_layer->SetSurfaceId(surface_id, surface_size);
+ float scale =
+ frame_size_in_dip.width() > 0
+ ? static_cast<float>(surface_size.width()) / frame_size_in_dip.width()
+ : 1.f;
piman 2014/11/12 02:36:57 Any reason we're not passing the renderer's DSF in
+ new_layer->SetSurfaceId(surface_id, scale, surface_size);
SwitchToLayer(new_layer);
surface_layer_ = new_layer;
« no previous file with comments | « cc/layers/surface_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698