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

Unified Diff: cc/test/tiled_layer_test_common.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/scrollbar_layer_unittest.cc ('k') | cc/test/tiled_layer_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/tiled_layer_test_common.h
diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h
index 19928245bc34ba30ae7bc7aaee691cb56e1a230d..169179ac6d960a147921e587ae186b5b6129fca6 100644
--- a/cc/test/tiled_layer_test_common.h
+++ b/cc/test/tiled_layer_test_common.h
@@ -99,6 +99,9 @@ public:
FakeLayerUpdater* fakeLayerUpdater() { return m_fakeUpdater.get(); }
gfx::RectF updateRect() { return m_updateRect; }
+ // Simulate calcDrawProperties.
+ void updateContentsScale(float idealContentsScale);
+
protected:
virtual cc::LayerUpdater* updater() const OVERRIDE;
virtual void createUpdaterIfNeeded() OVERRIDE { }
@@ -114,11 +117,13 @@ class FakeTiledLayerWithScaledBounds : public FakeTiledLayer {
public:
explicit FakeTiledLayerWithScaledBounds(cc::PrioritizedResourceManager*);
- void setContentBounds(const gfx::Size& contentBounds) { m_forcedContentBounds = contentBounds; }
- virtual gfx::Size contentBounds() const OVERRIDE;
- virtual float contentsScaleX() const OVERRIDE;
- virtual float contentsScaleY() const OVERRIDE;
- virtual void setContentsScale(float) OVERRIDE;
+ void setContentBounds(const gfx::Size& contentBounds);
+ virtual void calculateContentsScale(
+ float idealContentsScale,
+ float* contentsScaleX,
+ float* contentsScaleY,
+ gfx::Size* contentBounds) OVERRIDE;
+ virtual void didUpdateBounds() OVERRIDE;
protected:
virtual ~FakeTiledLayerWithScaledBounds();
« no previous file with comments | « cc/scrollbar_layer_unittest.cc ('k') | cc/test/tiled_layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698