| OLD | NEW |
| 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/cc_export.h" |
| 8 #include "cc/layer.h" | 9 #include "cc/layer.h" |
| 9 | 10 |
| 10 namespace cc { | 11 namespace cc { |
| 11 | 12 |
| 12 // Base class for layers that need contents scale. | 13 // Base class for layers that need contents scale. |
| 13 // The content bounds are determined by bounds and scale of the contents. | 14 // The content bounds are determined by bounds and scale of the contents. |
| 14 class ContentsScalingLayer : public Layer { | 15 class CC_EXPORT ContentsScalingLayer : public Layer { |
| 15 public: | 16 public: |
| 16 virtual gfx::Size contentBounds() const OVERRIDE; | 17 virtual gfx::Size contentBounds() const OVERRIDE; |
| 17 virtual float contentsScaleX() const OVERRIDE; | 18 virtual float contentsScaleX() const OVERRIDE; |
| 18 virtual float contentsScaleY() const OVERRIDE; | 19 virtual float contentsScaleY() const OVERRIDE; |
| 19 virtual void setContentsScale(float contentsScale) OVERRIDE; | 20 virtual void setContentsScale(float contentsScale) OVERRIDE; |
| 20 | 21 |
| 21 protected: | 22 protected: |
| 22 ContentsScalingLayer(); | 23 ContentsScalingLayer(); |
| 23 virtual ~ContentsScalingLayer(); | 24 virtual ~ContentsScalingLayer(); |
| 24 | 25 |
| 25 private: | 26 private: |
| 26 float m_contentsScale; | 27 float m_contentsScale; |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 } // namespace cc | 30 } // namespace cc |
| 30 | 31 |
| 31 #endif // CC_CONTENTS_SCALING_LAYER_H | 32 #endif // CC_CONTENTS_SCALING_LAYER_H |
| OLD | NEW |