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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void set_is_directly_composited_image(bool is_directly_composited_image) { | 103 void set_is_directly_composited_image(bool is_directly_composited_image) { |
104 is_directly_composited_image_ = is_directly_composited_image; | 104 is_directly_composited_image_ = is_directly_composited_image; |
105 } | 105 } |
106 | 106 |
107 void InvalidateRegionForImages(const ImageIdFlatSet& images_to_invalidate); | 107 void InvalidateRegionForImages(const ImageIdFlatSet& images_to_invalidate); |
108 | 108 |
109 protected: | 109 protected: |
110 PictureLayerImpl(LayerTreeImpl* tree_impl, | 110 PictureLayerImpl(LayerTreeImpl* tree_impl, |
111 int id, | 111 int id, |
112 Layer::LayerMaskType mask_type); | 112 Layer::LayerMaskType mask_type); |
113 PictureLayerTiling* AddTiling(float contents_scale); | 113 PictureLayerTiling* AddTiling(const ScaleTranslate2d& contents_transform); |
114 void RemoveAllTilings(); | 114 void RemoveAllTilings(); |
115 void AddTilingsForRasterScale(); | 115 void AddTilingsForRasterScale(); |
116 void AddLowResolutionTilingIfNeeded(); | 116 void AddLowResolutionTilingIfNeeded(); |
117 bool ShouldAdjustRasterScale() const; | 117 bool ShouldAdjustRasterScale() const; |
118 void RecalculateRasterScales(); | 118 void RecalculateRasterScales(); |
| 119 gfx::Vector2dF CalculateRasterTranslation(float raster_scale); |
119 void CleanUpTilingsOnActiveLayer( | 120 void CleanUpTilingsOnActiveLayer( |
120 const std::vector<PictureLayerTiling*>& used_tilings); | 121 const std::vector<PictureLayerTiling*>& used_tilings); |
121 float MinimumContentsScale() const; | 122 float MinimumContentsScale() const; |
122 float MaximumContentsScale() const; | 123 float MaximumContentsScale() const; |
123 void UpdateViewportRectForTilePriorityInContentSpace(); | 124 void UpdateViewportRectForTilePriorityInContentSpace(); |
124 PictureLayerImpl* GetRecycledTwinLayer() const; | 125 PictureLayerImpl* GetRecycledTwinLayer() const; |
125 | 126 |
126 void SanityCheckTilingState() const; | 127 void SanityCheckTilingState() const; |
127 | 128 |
128 void GetDebugBorderProperties(SkColor* color, float* width) const override; | 129 void GetDebugBorderProperties(SkColor* color, float* width) const override; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // of comparing pointers, since objects pointed to are not guaranteed to | 172 // of comparing pointers, since objects pointed to are not guaranteed to |
172 // exist. | 173 // exist. |
173 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 174 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
174 | 175 |
175 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 176 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
176 }; | 177 }; |
177 | 178 |
178 } // namespace cc | 179 } // namespace cc |
179 | 180 |
180 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 181 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |