summaryrefslogtreecommitdiffstats
path: root/ui/compositor
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2014-11-12 17:10:34 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-13 01:10:57 +0000
commitb71b07c2279f6c8b33aa65e8bf31aedcef35d750 (patch)
tree75ff5a716b78a63489d63beea1ca055a2b4e5635 /ui/compositor
parent6b6aa08ec5b565a620c75c8ecf9006a2c9c13045 (diff)
downloadchromium_src-b71b07c2279f6c8b33aa65e8bf31aedcef35d750.zip
chromium_src-b71b07c2279f6c8b33aa65e8bf31aedcef35d750.tar.gz
chromium_src-b71b07c2279f6c8b33aa65e8bf31aedcef35d750.tar.bz2
Explicitly specify contents scale for SurfaceLayer.
The RWHVA changes the bounds of the layer on window resize, but the contents shouldn't be scaled to fit in that case, so specify an explicit scale when the surface id is set. Review URL: https://codereview.chromium.org/719573003 Cr-Commit-Position: refs/heads/master@{#303950}
Diffstat (limited to 'ui/compositor')
-rw-r--r--ui/compositor/layer.cc3
-rw-r--r--ui/compositor/layer.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index e95e32d..f7871b8 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -575,12 +575,13 @@ void Layer::SetShowSurface(
const cc::SurfaceLayer::SatisfyCallback& satisfy_callback,
const cc::SurfaceLayer::RequireCallback& require_callback,
gfx::Size surface_size,
+ float scale,
gfx::Size frame_size_in_dip) {
DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
scoped_refptr<cc::SurfaceLayer> new_layer =
cc::SurfaceLayer::Create(satisfy_callback, require_callback);
- new_layer->SetSurfaceId(surface_id, surface_size);
+ new_layer->SetSurfaceId(surface_id, scale, surface_size);
SwitchToLayer(new_layer);
surface_layer_ = new_layer;
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 9b54d38..52c1f45 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -284,6 +284,7 @@ class COMPOSITOR_EXPORT Layer
const cc::SurfaceLayer::SatisfyCallback& satisfy_callback,
const cc::SurfaceLayer::RequireCallback& require_callback,
gfx::Size surface_size,
+ float scale,
gfx::Size frame_size_in_dip);
bool has_external_content() {