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