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_RESOURCES_TILE_MANAGER_H_ | 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_ |
6 #define CC_RESOURCES_TILE_MANAGER_H_ | 6 #define CC_RESOURCES_TILE_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() const = 0; | 45 virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() const = 0; |
46 | 46 |
47 // Called when all tiles marked as required for activation are ready to draw. | 47 // Called when all tiles marked as required for activation are ready to draw. |
48 virtual void NotifyReadyToActivate() = 0; | 48 virtual void NotifyReadyToActivate() = 0; |
49 | 49 |
50 // Called when the visible representation of a tile might have changed. Some | 50 // Called when the visible representation of a tile might have changed. Some |
51 // examples are: | 51 // examples are: |
52 // - Tile version initialized. | 52 // - Tile version initialized. |
53 // - Tile resources freed. | 53 // - Tile resources freed. |
54 // - Tile marked for on-demand raster. | 54 // - Tile marked for on-demand raster. |
55 virtual void NotifyTileStateChanged(const Tile* tile) = 0; | 55 virtual void NotifyTileStateChanged(const Tile* tile, bool visible_tile) = 0; |
enne (OOO)
2014/10/28 18:09:21
This seems redundant to pass along visible_tile.
enne (OOO)
2014/10/28 18:09:21
This seems redundant to pass along visible_tile.
danakj
2014/10/31 20:02:01
Yes, using manfred's tile->required_to_draw() now
| |
56 | 56 |
57 // Given an empty raster tile priority queue, this will build a priority queue | 57 // Given an empty raster tile priority queue, this will build a priority queue |
58 // that will return tiles in order in which they should be rasterized. | 58 // that will return tiles in order in which they should be rasterized. |
59 // Note if the queue was previous built, Reset must be called on it. | 59 // Note if the queue was previous built, Reset must be called on it. |
60 virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, | 60 virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, |
61 TreePriority tree_priority) = 0; | 61 TreePriority tree_priority) = 0; |
62 | 62 |
63 // Given an empty eviction tile priority queue, this will build a priority | 63 // Given an empty eviction tile priority queue, this will build a priority |
64 // queue that will return tiles in order in which they should be evicted. | 64 // queue that will return tiles in order in which they should be evicted. |
65 // Note if the queue was previous built, Reset must be called on it. | 65 // Note if the queue was previous built, Reset must be called on it. |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 RasterTilePriorityQueue raster_priority_queue_; | 276 RasterTilePriorityQueue raster_priority_queue_; |
277 EvictionTilePriorityQueue eviction_priority_queue_; | 277 EvictionTilePriorityQueue eviction_priority_queue_; |
278 bool eviction_priority_queue_is_up_to_date_; | 278 bool eviction_priority_queue_is_up_to_date_; |
279 | 279 |
280 DISALLOW_COPY_AND_ASSIGN(TileManager); | 280 DISALLOW_COPY_AND_ASSIGN(TileManager); |
281 }; | 281 }; |
282 | 282 |
283 } // namespace cc | 283 } // namespace cc |
284 | 284 |
285 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 285 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |