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

Unified Diff: cc/layer.h

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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
Index: cc/layer.h
diff --git a/cc/layer.h b/cc/layer.h
index 38a32dd845ff9cbf02315518e9d18434ac1d8866..aa791689b5357d899da44d2cfb84c6dfc999a4bf 100644
--- a/cc/layer.h
+++ b/cc/layer.h
@@ -189,7 +189,6 @@ public:
virtual bool needMoreUpdates();
virtual void setIsMask(bool) { }
virtual void bindContentsTexture() { }
- virtual bool needsContentsScale() const;
void setDebugBorderColor(SkColor);
void setDebugBorderWidth(float);
@@ -229,8 +228,10 @@ public:
// The contentsScale converts from logical, non-page-scaled pixels to target pixels.
// The contentsScale is 1 for the root layer as it is already in physical pixels.
- float contentsScale() const { return m_contentsScale; }
- void setContentsScale(float);
+ // By default contentsScale is forced to be 1 except for subclasses of ContentsScalingLayer.
+ virtual float contentsScaleX() const { return 1.0; }
+ virtual float contentsScaleY() const { return 1.0; }
+ virtual void setContentsScale(float contentsScale) { }
// The scale at which contents should be rastered, to match the scale at
// which they will drawn to the screen. This scale is a component of the
@@ -390,7 +391,6 @@ private:
// Uses target surface space.
IntRect m_drawableContentRect;
- float m_contentsScale;
float m_rasterScale;
bool m_automaticallyComputeRasterScale;
bool m_boundsContainPageScale;

Powered by Google App Engine
This is Rietveld 408576698