| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const PictureLayerTiling* tiling) const override; | 72 const PictureLayerTiling* tiling) const override; |
| 73 PictureLayerTiling* GetRecycledTwinTiling( | 73 PictureLayerTiling* GetRecycledTwinTiling( |
| 74 const PictureLayerTiling* tiling) override; | 74 const PictureLayerTiling* tiling) override; |
| 75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; | 75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; |
| 76 WhichTree GetTree() const override; | 76 WhichTree GetTree() const override; |
| 77 bool RequiresHighResToDraw() const override; | 77 bool RequiresHighResToDraw() const override; |
| 78 | 78 |
| 79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, | 79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, |
| 80 Region* new_invalidation, | 80 Region* new_invalidation, |
| 81 const PictureLayerTilingSet* pending_set); | 81 const PictureLayerTilingSet* pending_set); |
| 82 bool UpdateTiles(const Occlusion& occlusion_in_content_space, | 82 bool UpdateTiles(bool resourceless_software_draw); |
| 83 bool resourceless_software_draw); | |
| 84 | 83 |
| 85 // Mask-related functions. | 84 // Mask-related functions. |
| 86 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, | 85 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, |
| 87 gfx::Size* resource_size) const override; | 86 gfx::Size* resource_size) const override; |
| 88 | 87 |
| 89 void SetNearestNeighbor(bool nearest_neighbor); | 88 void SetNearestNeighbor(bool nearest_neighbor); |
| 90 | 89 |
| 91 size_t GPUMemoryUsageInBytes() const override; | 90 size_t GPUMemoryUsageInBytes() const override; |
| 92 | 91 |
| 93 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; | 92 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 109 friend class LayerRasterTileIterator; | 108 friend class LayerRasterTileIterator; |
| 110 using TileRequirementCheck = bool (PictureLayerTiling::*)(const Tile*) const; | 109 using TileRequirementCheck = bool (PictureLayerTiling::*)(const Tile*) const; |
| 111 | 110 |
| 112 PictureLayerImpl(LayerTreeImpl* tree_impl, | 111 PictureLayerImpl(LayerTreeImpl* tree_impl, |
| 113 int id, | 112 int id, |
| 114 bool is_mask, | 113 bool is_mask, |
| 115 scoped_refptr<SyncedScrollOffset> scroll_offset); | 114 scoped_refptr<SyncedScrollOffset> scroll_offset); |
| 116 PictureLayerTiling* AddTiling(float contents_scale); | 115 PictureLayerTiling* AddTiling(float contents_scale); |
| 117 void RemoveAllTilings(); | 116 void RemoveAllTilings(); |
| 118 void AddTilingsForRasterScale(); | 117 void AddTilingsForRasterScale(); |
| 119 bool UpdateTilePriorities(const Occlusion& occlusion_in_content_space); | |
| 120 virtual bool ShouldAdjustRasterScale() const; | 118 virtual bool ShouldAdjustRasterScale() const; |
| 121 virtual void RecalculateRasterScales(); | 119 virtual void RecalculateRasterScales(); |
| 122 void CleanUpTilingsOnActiveLayer( | 120 void CleanUpTilingsOnActiveLayer( |
| 123 const std::vector<PictureLayerTiling*>& used_tilings); | 121 const std::vector<PictureLayerTiling*>& used_tilings); |
| 124 float MinimumContentsScale() const; | 122 float MinimumContentsScale() const; |
| 125 float MaximumContentsScale() const; | 123 float MaximumContentsScale() const; |
| 126 void ResetRasterScale(); | 124 void ResetRasterScale(); |
| 127 void UpdateViewportRectForTilePriorityInContentSpace(); | 125 void UpdateViewportRectForTilePriorityInContentSpace(); |
| 128 PictureLayerImpl* GetRecycledTwinLayer() const; | 126 PictureLayerImpl* GetRecycledTwinLayer() const; |
| 129 | 127 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // of comparing pointers, since objects pointed to are not guaranteed to | 175 // of comparing pointers, since objects pointed to are not guaranteed to |
| 178 // exist. | 176 // exist. |
| 179 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 177 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
| 180 | 178 |
| 181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 179 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 182 }; | 180 }; |
| 183 | 181 |
| 184 } // namespace cc | 182 } // namespace cc |
| 185 | 183 |
| 186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 184 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |