| 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_LAYERS_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // Used for benchmarking | 98 // Used for benchmarking |
| 99 RasterSource* GetRasterSource() const { return raster_source_.get(); } | 99 RasterSource* GetRasterSource() const { return raster_source_.get(); } |
| 100 | 100 |
| 101 void set_is_directly_composited_image(bool is_directly_composited_image) { | 101 void set_is_directly_composited_image(bool is_directly_composited_image) { |
| 102 is_directly_composited_image_ = is_directly_composited_image; | 102 is_directly_composited_image_ = is_directly_composited_image; |
| 103 } | 103 } |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 PictureLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask); | 106 PictureLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask); |
| 107 PictureLayerTiling* AddTiling(float contents_scale); | 107 PictureLayerTiling* AddTiling(const ScaleTranslate2d& contents_transform); |
| 108 void RemoveAllTilings(); | 108 void RemoveAllTilings(); |
| 109 void AddTilingsForRasterScale(); | 109 void AddTilingsForRasterScale(); |
| 110 void AddLowResolutionTilingIfNeeded(); | 110 void AddLowResolutionTilingIfNeeded(); |
| 111 bool ShouldAdjustRasterScale() const; | 111 bool ShouldAdjustRasterScale() const; |
| 112 void RecalculateRasterScales(); | 112 void RecalculateRasterScales(); |
| 113 gfx::Vector2dF CalculateRasterTranslation(float raster_scale); |
| 113 void CleanUpTilingsOnActiveLayer( | 114 void CleanUpTilingsOnActiveLayer( |
| 114 const std::vector<PictureLayerTiling*>& used_tilings); | 115 const std::vector<PictureLayerTiling*>& used_tilings); |
| 115 float MinimumContentsScale() const; | 116 float MinimumContentsScale() const; |
| 116 float MaximumContentsScale() const; | 117 float MaximumContentsScale() const; |
| 117 void UpdateViewportRectForTilePriorityInContentSpace(); | 118 void UpdateViewportRectForTilePriorityInContentSpace(); |
| 118 PictureLayerImpl* GetRecycledTwinLayer() const; | 119 PictureLayerImpl* GetRecycledTwinLayer() const; |
| 119 | 120 |
| 120 void SanityCheckTilingState() const; | 121 void SanityCheckTilingState() const; |
| 121 | 122 |
| 122 void GetDebugBorderProperties(SkColor* color, float* width) const override; | 123 void GetDebugBorderProperties(SkColor* color, float* width) const override; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // of comparing pointers, since objects pointed to are not guaranteed to | 166 // of comparing pointers, since objects pointed to are not guaranteed to |
| 166 // exist. | 167 // exist. |
| 167 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 168 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
| 168 | 169 |
| 169 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 170 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 } // namespace cc | 173 } // namespace cc |
| 173 | 174 |
| 174 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 175 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |