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

Side by Side Diff: cc/contents_scaling_layer.h

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector Created 8 years, 1 month 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/contents_scaling_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CONTENTS_SCALING_LAYER_H 5 #ifndef CC_CONTENTS_SCALING_LAYER_H
6 #define CC_CONTENTS_SCALING_LAYER_H 6 #define CC_CONTENTS_SCALING_LAYER_H
7 7
8 #include "cc/layer.h" 8 #include "cc/layer.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 // Base class for layers that need contents scale. 12 // Base class for layers that need contents scale.
13 // The content bounds are determined by bounds and scale of the contents. 13 // The content bounds are determined by bounds and scale of the contents.
14 class ContentsScalingLayer : public Layer { 14 class ContentsScalingLayer : public Layer {
15 public: 15 public:
16 virtual IntSize contentBounds() const OVERRIDE; 16 virtual gfx::Size contentBounds() const OVERRIDE;
17 virtual float contentsScaleX() const OVERRIDE; 17 virtual float contentsScaleX() const OVERRIDE;
18 virtual float contentsScaleY() const OVERRIDE; 18 virtual float contentsScaleY() const OVERRIDE;
19 virtual void setContentsScale(float contentsScale) OVERRIDE; 19 virtual void setContentsScale(float contentsScale) OVERRIDE;
20 20
21 protected: 21 protected:
22 ContentsScalingLayer(); 22 ContentsScalingLayer();
23 virtual ~ContentsScalingLayer(); 23 virtual ~ContentsScalingLayer();
24 24
25 private: 25 private:
26 float m_contentsScale; 26 float m_contentsScale;
27 }; 27 };
28 28
29 } // namespace cc 29 } // namespace cc
30 30
31 #endif // CC_CONTENTS_SCALING_LAYER_H 31 #endif // CC_CONTENTS_SCALING_LAYER_H
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/contents_scaling_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698