summaryrefslogtreecommitdiffstats
path: root/ash/display/mirror_window_controller.cc
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 21:54:52 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 21:54:52 +0000
commitd24adc83e7de8b042739c96f37588dee5ba091b3 (patch)
treee82cf26051eb22ce33a61a3f2816c39e6135675f /ash/display/mirror_window_controller.cc
parentfc28c977a4969a3ff4c4e8dee98fe67ce111ed86 (diff)
downloadchromium_src-d24adc83e7de8b042739c96f37588dee5ba091b3.zip
chromium_src-d24adc83e7de8b042739c96f37588dee5ba091b3.tar.gz
chromium_src-d24adc83e7de8b042739c96f37588dee5ba091b3.tar.bz2
Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx"
> Remove dependency on ui::ScaleFactor from ui/gfx > > As part of the work to removed dependencies on ui/base from ui/gfx I have > changed the public api to Canvas, ImageSkia, ImageSkiaRep and ImagePNGRep > to take float scale values instead of ui::ScaleFactor. > > The notion of supported scale factors has been broken into 2 parts. > ui::SetSupportedScaleFactors remains and calls the > new ImageSkia::SetSupportedScales(). > > The initialization of the supported scale factors has been moved from layout.h > into ResourceBundle, and is done explicitly in tests that don't use > ResourceBundle. > > BUG=103304 > R=ben@chromium.org, oshima@chromium.org, sky@chromium.org > > Review URL: https://codereview.chromium.org/24175004 TBR=davemoore@chromium.org Review URL: https://codereview.chromium.org/24262008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display/mirror_window_controller.cc')
-rw-r--r--ash/display/mirror_window_controller.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
index d7cd6f0..2de135a 100644
--- a/ash/display/mirror_window_controller.cc
+++ b/ash/display/mirror_window_controller.cc
@@ -127,8 +127,10 @@ class CursorWindowDelegate : public aura::WindowDelegate {
// take 2x's image and paint as if it's 1x image.
void SetCursorImage(const gfx::ImageSkia& image,
const gfx::Display& display) {
+ device_scale_factor_ =
+ ui::GetScaleFactorFromScale(display.device_scale_factor());
const gfx::ImageSkiaRep& image_rep =
- image.GetRepresentation(display.device_scale_factor());
+ image.GetRepresentation(device_scale_factor_);
size_ = image_rep.pixel_size();
cursor_image_ = gfx::ImageSkia::CreateFrom1xBitmap(image_rep.sk_bitmap());
}
@@ -137,6 +139,7 @@ class CursorWindowDelegate : public aura::WindowDelegate {
private:
gfx::ImageSkia cursor_image_;
+ ui::ScaleFactor device_scale_factor_;
gfx::Size size_;
DISALLOW_COPY_AND_ASSIGN(CursorWindowDelegate);