diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-21 22:33:25 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-21 22:33:25 +0000 |
commit | d3407cdbb58dc92c9647837e67eaf523c286ece2 (patch) | |
tree | 316ee933dabcf190c6ac42eac2a2b28921a9e95c /ui/compositor/compositor.h | |
parent | bc2078352e4c69b1ac28d3c63bd39f5e6b38c776 (diff) | |
download | chromium_src-d3407cdbb58dc92c9647837e67eaf523c286ece2.zip chromium_src-d3407cdbb58dc92c9647837e67eaf523c286ece2.tar.gz chromium_src-d3407cdbb58dc92c9647837e67eaf523c286ece2.tar.bz2 |
Change the scale factor of texture_size from the layer's one to an estimation.
The phantom window appearing in a different DPI device could be wrongly scaled
without doing this, since the original texture is calculated in the original
DPI but rendered in another display.
BUG=145968
TEST=run chromeos-chrome with --aura-host-window-size='0+0-500x500,600+0-500x500*2' --force-compositing-mode on linux, open a web page, and drag the window across the screens.
Review URL: https://chromiumcodereview.appspot.com/10941017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/compositor/compositor.h')
-rw-r--r-- | ui/compositor/compositor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index 8baada9..0f62979 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -94,12 +94,13 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory { // to a layer. class COMPOSITOR_EXPORT Texture : public base::RefCounted<Texture> { public: - Texture(bool flipped, const gfx::Size& size); + Texture(bool flipped, const gfx::Size& size, float device_scale_factor); unsigned int texture_id() const { return texture_id_; } void set_texture_id(unsigned int id) { texture_id_ = id; } bool flipped() const { return flipped_; } gfx::Size size() const { return size_; } + float device_scale_factor() const { return device_scale_factor_; } virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; protected: @@ -111,6 +112,7 @@ class COMPOSITOR_EXPORT Texture : public base::RefCounted<Texture> { unsigned int texture_id_; bool flipped_; gfx::Size size_; // in pixel + float device_scale_factor_; DISALLOW_COPY_AND_ASSIGN(Texture); }; |