Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1717)

Unified Diff: cc/layer_impl.h

Issue 11503005: cc: Refactor content scale/bounds into draw properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.h
diff --git a/cc/layer_impl.h b/cc/layer_impl.h
index 4d6e0cd2d11034f943918116a49379b4aac2d498..3d7ab85095edf5aa9f9e8e5413222405ae7ac75c 100644
--- a/cc/layer_impl.h
+++ b/cc/layer_impl.h
@@ -190,13 +190,11 @@ public:
void setBounds(const gfx::Size&);
const gfx::Size& bounds() const { return m_bounds; }
- // ContentBounds may be [0, 1) pixels larger than bounds * contentsScale.
- // Don't calculate scale from it. Use contentsScale instead for accuracy.
void setContentBounds(const gfx::Size&);
- gfx::Size contentBounds() const { return m_contentBounds; }
+ gfx::Size contentBounds() const { return m_drawProperties.content_bounds; }
- float contentsScaleX() const { return m_contentsScaleX; }
- float contentsScaleY() const { return m_contentsScaleY; }
+ float contentsScaleX() const { return m_drawProperties.contents_scale_x; }
+ float contentsScaleY() const { return m_drawProperties.contents_scale_y; }
void setContentsScale(float contentsScaleX, float contentsScaleY);
gfx::Vector2d scrollOffset() const { return m_scrollOffset; }
@@ -326,9 +324,6 @@ private:
gfx::PointF m_anchorPoint;
float m_anchorPointZ;
gfx::Size m_bounds;
- gfx::Size m_contentBounds;
- float m_contentsScaleX;
- float m_contentsScaleY;
gfx::Vector2d m_scrollOffset;
bool m_scrollable;
bool m_shouldScrollOnMainThread;
« no previous file with comments | « cc/layer.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698