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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // LayerImpl overrides. | 104 // LayerImpl overrides. |
105 virtual const char* LayerTypeAsString() const OVERRIDE; | 105 virtual const char* LayerTypeAsString() const OVERRIDE; |
106 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 106 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
107 OVERRIDE; | 107 OVERRIDE; |
108 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 108 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
109 virtual void AppendQuads(RenderPass* render_pass, | 109 virtual void AppendQuads(RenderPass* render_pass, |
110 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 110 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
111 AppendQuadsData* append_quads_data) OVERRIDE; | 111 AppendQuadsData* append_quads_data) OVERRIDE; |
112 virtual void UpdateTiles( | 112 virtual void UpdateTiles( |
113 const OcclusionTracker<LayerImpl>* occlusion_tracker) OVERRIDE; | 113 const Occlusion& occlusion_in_content_space) OVERRIDE; |
114 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; | 114 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; |
115 virtual void DidBecomeActive() OVERRIDE; | 115 virtual void DidBecomeActive() OVERRIDE; |
116 virtual void DidBeginTracing() OVERRIDE; | 116 virtual void DidBeginTracing() OVERRIDE; |
117 virtual void ReleaseResources() OVERRIDE; | 117 virtual void ReleaseResources() OVERRIDE; |
118 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; | 118 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; |
119 | 119 |
120 // PictureLayerTilingClient overrides. | 120 // PictureLayerTilingClient overrides. |
121 virtual scoped_refptr<Tile> CreateTile( | 121 virtual scoped_refptr<Tile> CreateTile( |
122 PictureLayerTiling* tiling, | 122 PictureLayerTiling* tiling, |
123 const gfx::Rect& content_rect) OVERRIDE; | 123 const gfx::Rect& content_rect) OVERRIDE; |
(...skipping 29 matching lines...) Expand all Loading... |
153 | 153 |
154 protected: | 154 protected: |
155 friend class LayerRasterTileIterator; | 155 friend class LayerRasterTileIterator; |
156 | 156 |
157 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 157 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
158 PictureLayerTiling* AddTiling(float contents_scale); | 158 PictureLayerTiling* AddTiling(float contents_scale); |
159 void RemoveTiling(float contents_scale); | 159 void RemoveTiling(float contents_scale); |
160 void RemoveAllTilings(); | 160 void RemoveAllTilings(); |
161 void SyncFromActiveLayer(const PictureLayerImpl* other); | 161 void SyncFromActiveLayer(const PictureLayerImpl* other); |
162 void AddTilingsForRasterScale(); | 162 void AddTilingsForRasterScale(); |
163 void UpdateTilePriorities( | 163 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space); |
164 const OcclusionTracker<LayerImpl>* occlusion_tracker); | |
165 virtual bool ShouldAdjustRasterScale() const; | 164 virtual bool ShouldAdjustRasterScale() const; |
166 virtual void RecalculateRasterScales(); | 165 virtual void RecalculateRasterScales(); |
167 void CleanUpTilingsOnActiveLayer( | 166 void CleanUpTilingsOnActiveLayer( |
168 std::vector<PictureLayerTiling*> used_tilings); | 167 std::vector<PictureLayerTiling*> used_tilings); |
169 float MinimumContentsScale() const; | 168 float MinimumContentsScale() const; |
170 float SnappedContentsScale(float new_contents_scale); | 169 float SnappedContentsScale(float new_contents_scale); |
171 void ResetRasterScale(); | 170 void ResetRasterScale(); |
172 void MarkVisibleResourcesAsRequired() const; | 171 void MarkVisibleResourcesAsRequired() const; |
173 bool MarkVisibleTilesAsRequired( | 172 bool MarkVisibleTilesAsRequired( |
174 PictureLayerTiling* tiling, | 173 PictureLayerTiling* tiling, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 gfx::Rect viewport_rect_for_tile_priority_; | 229 gfx::Rect viewport_rect_for_tile_priority_; |
231 gfx::Transform screen_space_transform_for_tile_priority_; | 230 gfx::Transform screen_space_transform_for_tile_priority_; |
232 | 231 |
233 friend class PictureLayer; | 232 friend class PictureLayer; |
234 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 233 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
235 }; | 234 }; |
236 | 235 |
237 } // namespace cc | 236 } // namespace cc |
238 | 237 |
239 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 238 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |