Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include "cc/layers/picture_layer_impl.h" | 8 #include "cc/layers/picture_layer_impl.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 | 11 |
| 12 class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl { | 12 class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl { |
| 13 public: | 13 public: |
| 14 static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl, | 14 static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl, |
| 15 int id) { | 15 int id) { |
| 16 return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id)); | 16 return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id)); |
| 17 } | 17 } |
| 18 virtual ~PictureImageLayerImpl(); | 18 virtual ~PictureImageLayerImpl(); |
| 19 | 19 |
| 20 // LayerImpl overrides. | 20 // LayerImpl overrides. |
| 21 virtual const char* LayerTypeAsString() const OVERRIDE; | 21 virtual const char* LayerTypeAsString() const OVERRIDE; |
| 22 virtual scoped_ptr<LayerImpl> CreateLayerImpl( | 22 virtual scoped_ptr<LayerImpl> CreateLayerImpl( |
| 23 LayerTreeImpl* tree_impl) OVERRIDE; | 23 LayerTreeImpl* tree_impl) OVERRIDE; |
| 24 virtual void CalculateContentsScale(float ideal_contents_scale, | |
| 25 float device_scale_factor, | |
| 26 float page_scale_factor, | |
| 27 float maximum_animation_contents_scale, | |
| 28 bool animating_transform_to_screen, | |
| 29 float* contents_scale_x, | |
| 30 float* contents_scale_y, | |
| 31 gfx::Size* content_bounds) OVERRIDE; | |
| 32 | 24 |
| 33 protected: | 25 protected: |
| 34 PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id); | 26 PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 35 | 27 |
| 36 virtual bool ShouldAdjustRasterScale( | 28 virtual bool ShouldAdjustRasterScale( |
| 37 bool animating_transform_to_screen) const OVERRIDE; | 29 bool animating_transform_to_screen) const OVERRIDE; |
| 38 virtual void RecalculateRasterScales(bool animating_transform_to_screen, | 30 virtual void RecalculateRasterScales(bool animating_transform_to_screen, |
| 39 float maximum_animation_contents_scale) | 31 float maximum_animation_contents_scale) |
| 40 OVERRIDE; | 32 OVERRIDE; |
| 41 virtual void GetDebugBorderProperties( | 33 virtual void GetDebugBorderProperties( |
| 42 SkColor* color, float* width) const OVERRIDE; | 34 SkColor* color, float* width) const OVERRIDE; |
| 43 | 35 |
| 36 virtual void UpdateIdealScales(); | |
|
danakj
2014/05/23 17:07:34
OVERRIDE
| |
| 37 | |
| 44 private: | 38 private: |
| 45 DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl); | 39 DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl); |
| 46 }; | 40 }; |
| 47 | 41 |
| 48 } // namespace cc | 42 } // namespace cc |
| 49 | 43 |
| 50 #endif // CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ | 44 #endif // CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ |
| OLD | NEW |