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