| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 bool is_mask() const { return is_mask_; } | 39 bool is_mask() const { return is_mask_; } |
| 40 | 40 |
| 41 // LayerImpl overrides. | 41 // LayerImpl overrides. |
| 42 const char* LayerTypeAsString() const override; | 42 const char* LayerTypeAsString() const override; |
| 43 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 43 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 44 void PushPropertiesTo(LayerImpl* layer) override; | 44 void PushPropertiesTo(LayerImpl* layer) override; |
| 45 void AppendQuads(RenderPass* render_pass, | 45 void AppendQuads(RenderPass* render_pass, |
| 46 AppendQuadsData* append_quads_data) override; | 46 AppendQuadsData* append_quads_data) override; |
| 47 void NotifyTileStateChanged(const Tile* tile) override; | 47 void NotifyTileStateChanged(const Tile* tile) override; |
| 48 void ResetRasterScale(); |
| 48 void DidBeginTracing() override; | 49 void DidBeginTracing() override; |
| 49 void ReleaseResources() override; | 50 void ReleaseResources() override; |
| 50 void RecreateResources() override; | 51 void RecreateResources() override; |
| 51 Region GetInvalidationRegionForDebugging() override; | 52 Region GetInvalidationRegionForDebugging() override; |
| 52 | 53 |
| 53 // PictureLayerTilingClient overrides. | 54 // PictureLayerTilingClient overrides. |
| 54 ScopedTilePtr CreateTile(const Tile::CreateInfo& info) override; | 55 ScopedTilePtr CreateTile(const Tile::CreateInfo& info) override; |
| 55 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; | 56 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; |
| 56 const Region* GetPendingInvalidation() override; | 57 const Region* GetPendingInvalidation() override; |
| 57 const PictureLayerTiling* GetPendingOrActiveTwinTiling( | 58 const PictureLayerTiling* GetPendingOrActiveTwinTiling( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 PictureLayerTiling* AddTiling(float contents_scale); | 102 PictureLayerTiling* AddTiling(float contents_scale); |
| 102 void RemoveAllTilings(); | 103 void RemoveAllTilings(); |
| 103 void AddTilingsForRasterScale(); | 104 void AddTilingsForRasterScale(); |
| 104 void AddLowResolutionTilingIfNeeded(); | 105 void AddLowResolutionTilingIfNeeded(); |
| 105 bool ShouldAdjustRasterScale() const; | 106 bool ShouldAdjustRasterScale() const; |
| 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 UpdateViewportRectForTilePriorityInContentSpace(); | 112 void UpdateViewportRectForTilePriorityInContentSpace(); |
| 113 PictureLayerImpl* GetRecycledTwinLayer() const; | 113 PictureLayerImpl* GetRecycledTwinLayer() const; |
| 114 | 114 |
| 115 void SanityCheckTilingState() const; | 115 void SanityCheckTilingState() const; |
| 116 | 116 |
| 117 void GetDebugBorderProperties(SkColor* color, float* width) const override; | 117 void GetDebugBorderProperties(SkColor* color, float* width) const override; |
| 118 void GetAllPrioritizedTilesForTracing( | 118 void GetAllPrioritizedTilesForTracing( |
| 119 std::vector<PrioritizedTile>* prioritized_tiles) const override; | 119 std::vector<PrioritizedTile>* prioritized_tiles) const override; |
| 120 void AsValueInto(base::trace_event::TracedValue* dict) const override; | 120 void AsValueInto(base::trace_event::TracedValue* dict) const override; |
| 121 | 121 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // of comparing pointers, since objects pointed to are not guaranteed to | 159 // of comparing pointers, since objects pointed to are not guaranteed to |
| 160 // exist. | 160 // exist. |
| 161 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 161 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
| 162 | 162 |
| 163 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 163 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 } // namespace cc | 166 } // namespace cc |
| 167 | 167 |
| 168 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 168 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |