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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_ 5 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_
6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_ 6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_
7 7
8 #include "cc/layer_updater.h" 8 #include "cc/layer_updater.h"
9 #include "cc/prioritized_resource.h" 9 #include "cc/prioritized_resource.h"
10 #include "cc/region.h" 10 #include "cc/region.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 private: 107 private:
108 scoped_refptr<FakeLayerUpdater> m_fakeUpdater; 108 scoped_refptr<FakeLayerUpdater> m_fakeUpdater;
109 cc::PrioritizedResourceManager* m_resourceManager; 109 cc::PrioritizedResourceManager* m_resourceManager;
110 gfx::RectF m_lastNeedsDisplayRect; 110 gfx::RectF m_lastNeedsDisplayRect;
111 }; 111 };
112 112
113 class FakeTiledLayerWithScaledBounds : public FakeTiledLayer { 113 class FakeTiledLayerWithScaledBounds : public FakeTiledLayer {
114 public: 114 public:
115 explicit FakeTiledLayerWithScaledBounds(cc::PrioritizedResourceManager*); 115 explicit FakeTiledLayerWithScaledBounds(cc::PrioritizedResourceManager*);
116 116
117 void setContentBounds(const gfx::Size& contentBounds) { m_forcedContentBound s = contentBounds; } 117 void setContentBounds(const gfx::Size& contentBounds);
118 virtual gfx::Size contentBounds() const OVERRIDE; 118 virtual void setIdealContentsScale(float) OVERRIDE;
119 virtual float contentsScaleX() const OVERRIDE; 119 virtual void didUpdateBounds() OVERRIDE;
120 virtual float contentsScaleY() const OVERRIDE;
121 virtual void setContentsScale(float) OVERRIDE;
122 120
123 protected: 121 protected:
124 virtual ~FakeTiledLayerWithScaledBounds(); 122 virtual ~FakeTiledLayerWithScaledBounds();
125 gfx::Size m_forcedContentBounds; 123 gfx::Size m_forcedContentBounds;
126 }; 124 };
127 125
128 } 126 }
129 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ 127 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698