diff options
author | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 21:59:03 +0000 |
---|---|---|
committer | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 21:59:03 +0000 |
commit | 0fd5a9547f78b5a88b4fbd9b399a2acd1fbcc892 (patch) | |
tree | 6aaa6154b07399a50baca620a766014e460527cb | |
parent | f28fb3fe35e3ccf5f3f09e52497723830c209093 (diff) | |
download | chromium_src-0fd5a9547f78b5a88b4fbd9b399a2acd1fbcc892.zip chromium_src-0fd5a9547f78b5a88b4fbd9b399a2acd1fbcc892.tar.gz chromium_src-0fd5a9547f78b5a88b4fbd9b399a2acd1fbcc892.tar.bz2 |
aura: Drag image must not apply device scale to an already scaled image.
BUG=128820
TEST=manual
Review URL: https://chromiumcodereview.appspot.com/10559058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143060 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ash/drag_drop/drag_image_view.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ash/drag_drop/drag_image_view.cc b/ash/drag_drop/drag_image_view.cc index cdde40a..3320c8a 100644 --- a/ash/drag_drop/drag_image_view.cc +++ b/ash/drag_drop/drag_image_view.cc @@ -5,6 +5,7 @@ #include "ash/drag_drop/drag_image_view.h" #include "ash/wm/shadow_types.h" +#include "ui/aura/window.h" #include "ui/views/widget/widget.h" namespace ash { @@ -35,6 +36,12 @@ DragImageView::DragImageView() : views::ImageView() { // We are owned by the DragDropController. set_owned_by_client(); + + // The drag image we receive is already drawn scaled to device scale factor. + // Hence we do not need our layer to apply device scale again. + aura::Window* window = widget_->GetNativeView(); + if (window && window->layer()) + window->layer()->set_scale_content(false); } DragImageView::~DragImageView() { |