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