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

Unified Diff: cc/layer.h

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « cc/image_layer.cc ('k') | cc/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer.h
diff --git a/cc/layer.h b/cc/layer.h
index 38a32dd845ff9cbf02315518e9d18434ac1d8866..dda77d821b3c872963abede6e21e736c2638fcb5 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;
+ virtual float contentsScaleY() const;
+ 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
@@ -280,6 +281,8 @@ public:
virtual ScrollbarLayer* toScrollbarLayer();
+ IntRect layerRectToContentRect(const FloatRect& layerRect) const;
+
protected:
friend class LayerImpl;
friend class TreeSynchronizer;
@@ -289,8 +292,6 @@ protected:
void setNeedsCommit();
- IntRect layerRectToContentRect(const WebKit::WebRect& layerRect);
-
// This flag is set when layer need repainting/updating.
bool m_needsDisplay;
@@ -390,7 +391,6 @@ private:
// Uses target surface space.
IntRect m_drawableContentRect;
- float m_contentsScale;
float m_rasterScale;
bool m_automaticallyComputeRasterScale;
bool m_boundsContainPageScale;
« no previous file with comments | « cc/image_layer.cc ('k') | cc/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698