| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 // Used for benchmarking | 92 // Used for benchmarking |
| 93 RasterSource* GetRasterSource() const { return raster_source_.get(); } | 93 RasterSource* GetRasterSource() const { return raster_source_.get(); } |
| 94 | 94 |
| 95 void set_is_directly_composited_image(bool is_directly_composited_image) { | 95 void set_is_directly_composited_image(bool is_directly_composited_image) { |
| 96 is_directly_composited_image_ = is_directly_composited_image; | 96 is_directly_composited_image_ = is_directly_composited_image; |
| 97 } | 97 } |
| 98 | 98 |
| 99 protected: | 99 protected: |
| 100 PictureLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask); | 100 PictureLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask); |
| 101 PictureLayerTiling* AddTiling(float contents_scale); | 101 PictureLayerTiling* AddTiling(const ScaleTranslate2d& contents_transform); |
| 102 void RemoveAllTilings(); | 102 void RemoveAllTilings(); |
| 103 void AddTilingsForRasterScale(); | 103 void AddTilingsForRasterScale(); |
| 104 void AddLowResolutionTilingIfNeeded(); | 104 void AddLowResolutionTilingIfNeeded(); |
| 105 bool ShouldAdjustRasterScale() const; | 105 bool ShouldAdjustRasterScale() const; |
| 106 gfx::Vector2dF CalculateRasterTranslation(float raster_scale); |
| 106 void RecalculateRasterScales(); | 107 void RecalculateRasterScales(); |
| 107 void CleanUpTilingsOnActiveLayer( | 108 void CleanUpTilingsOnActiveLayer( |
| 108 const std::vector<PictureLayerTiling*>& used_tilings); | 109 const std::vector<PictureLayerTiling*>& used_tilings); |
| 109 float MinimumContentsScale() const; | 110 float MinimumContentsScale() const; |
| 110 float MaximumContentsScale() const; | 111 float MaximumContentsScale() const; |
| 111 void ResetRasterScale(); | 112 void ResetRasterScale(); |
| 112 void UpdateViewportRectForTilePriorityInContentSpace(); | 113 void UpdateViewportRectForTilePriorityInContentSpace(); |
| 113 PictureLayerImpl* GetRecycledTwinLayer() const; | 114 PictureLayerImpl* GetRecycledTwinLayer() const; |
| 114 | 115 |
| 115 void SanityCheckTilingState() const; | 116 void SanityCheckTilingState() const; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // of comparing pointers, since objects pointed to are not guaranteed to | 161 // of comparing pointers, since objects pointed to are not guaranteed to |
| 161 // exist. | 162 // exist. |
| 162 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 163 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
| 163 | 164 |
| 164 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 165 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 165 }; | 166 }; |
| 166 | 167 |
| 167 } // namespace cc | 168 } // namespace cc |
| 168 | 169 |
| 169 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 170 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |