diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-08 00:00:19 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-08 00:00:19 +0000 |
commit | e0eb7c401b51dc1761e5926c0e8e9c7872c6abdd (patch) | |
tree | 9e0d4323e0df867411df7ee85903bb71f46d0a9a /cc/layer_impl.h | |
parent | 96036b5cda2f5802f11823de205287c7f0a43834 (diff) | |
download | chromium_src-e0eb7c401b51dc1761e5926c0e8e9c7872c6abdd.zip chromium_src-e0eb7c401b51dc1761e5926c0e8e9c7872c6abdd.tar.gz chromium_src-e0eb7c401b51dc1761e5926c0e8e9c7872c6abdd.tar.bz2 |
cc: Use maximum tiling contents scales for picture layer scale
Due to the way the math works out for calculating which tiles to use for a
given content rect, the content scale for a picture layer has to be the maximum
of all the tilings on a layer.
Currently, each layer only has one tiling, but this change also creates the
infrastructure for adding different tilings over time and clamping contents
scales to a minimum.
NOTRY=true
R=danakj@chromium.org
BUG=155209
Review URL: https://chromiumcodereview.appspot.com/11777008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_impl.h')
-rw-r--r-- | cc/layer_impl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/layer_impl.h b/cc/layer_impl.h index 4320446..2219cf7 100644 --- a/cc/layer_impl.h +++ b/cc/layer_impl.h @@ -199,6 +199,12 @@ public: float contentsScaleY() const { return m_drawProperties.contents_scale_y; } void setContentsScale(float contentsScaleX, float contentsScaleY); + virtual void calculateContentsScale( + float idealContentsScale, + float* contentsScaleX, + float* contentsScaleY, + gfx::Size* contentBounds); + gfx::Vector2d scrollOffset() const { return m_scrollOffset; } void setScrollOffset(gfx::Vector2d); |