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

Unified Diff: cc/layer.h

Issue 10915313: cc: Apply the layer's initial CSS scale to the contentsScale to render text at the right resolution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/damage_tracker_unittest.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 7d1e484ed138aae8a6ce4c771dc0a133366af96b..4ae4ed4525faa39a9bad6a89acd6baf1fe39de56 100644
--- a/cc/layer.h
+++ b/cc/layer.h
@@ -222,10 +222,15 @@ public:
void setScreenSpaceTransform(const WebKit::WebTransformationMatrix& matrix) { m_screenSpaceTransform = matrix; }
const IntRect& drawableContentRect() const { return m_drawableContentRect; }
void setDrawableContentRect(const IntRect& rect) { m_drawableContentRect = rect; }
+
// 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);
+ // The scale from the initial CSS transform of the layer, including its ancestors, but
+ // not including the deviceScaleFactor or pageScaleFactor.
+ float initialCssScale() const { return m_initialCssScale; }
+ void setInitialCssScale(float scale) { m_initialCssScale = scale; }
// When true, the layer's contents are not scaled by the current page scale factor.
// setBoundsContainPageScale recursively sets the value on all child layers.
@@ -372,6 +377,7 @@ private:
// Uses target surface space.
IntRect m_drawableContentRect;
float m_contentsScale;
+ float m_initialCssScale;
bool m_boundsContainPageScale;
WebKit::WebTransformationMatrix m_implTransform;
« no previous file with comments | « cc/damage_tracker_unittest.cc ('k') | cc/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698