[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
danakj | 92015685 | 2015-05-18 20:22:29 | [diff] [blame] | 5 | #ifndef CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_ |
6 | #define CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_ | ||||
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 7 | |
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 8 | #include <vector> |
9 | |||||
chrishtr | ac41ff9 | 2017-03-17 05:07:30 | [diff] [blame] | 10 | #include "cc/cc_export.h" |
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 11 | #include "cc/layers/picture_layer_impl.h" |
danakj | 92015685 | 2015-05-18 20:22:29 | [diff] [blame] | 12 | #include "cc/tiles/tile_priority.h" |
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 13 | |
14 | namespace cc { | ||||
hendrikw | 8cc26dd | 2015-05-12 02:12:35 | [diff] [blame] | 15 | class PrioritizedTile; |
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 16 | |
17 | class CC_EXPORT RasterTilePriorityQueue { | ||||
18 | public: | ||||
vmpstr | fe477d5a | 2015-01-12 22:20:49 | [diff] [blame] | 19 | enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW }; |
20 | |||||
danakj | 60bc3bc | 2016-04-09 00:24:48 | [diff] [blame] | 21 | static std::unique_ptr<RasterTilePriorityQueue> Create( |
hendrikw | 0ab2fae3 | 2015-05-06 00:08:42 | [diff] [blame] | 22 | const std::vector<PictureLayerImpl*>& active_layers, |
23 | const std::vector<PictureLayerImpl*>& pending_layers, | ||||
vmpstr | b404063 | 2015-01-23 17:53:41 | [diff] [blame] | 24 | TreePriority tree_priority, |
25 | Type type); | ||||
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 26 | |
vmpstr | b404063 | 2015-01-23 17:53:41 | [diff] [blame] | 27 | virtual ~RasterTilePriorityQueue() {} |
Vladimir Levin | f06d1cd7 | 2019-03-13 18:24:10 | [diff] [blame] | 28 | RasterTilePriorityQueue(const RasterTilePriorityQueue&) = delete; |
29 | |||||
30 | RasterTilePriorityQueue& operator=(const RasterTilePriorityQueue&) = delete; | ||||
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 31 | |
vmpstr | b404063 | 2015-01-23 17:53:41 | [diff] [blame] | 32 | virtual bool IsEmpty() const = 0; |
hendrikw | 8cc26dd | 2015-05-12 02:12:35 | [diff] [blame] | 33 | virtual const PrioritizedTile& Top() const = 0; |
vmpstr | b404063 | 2015-01-23 17:53:41 | [diff] [blame] | 34 | virtual void Pop() = 0; |
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 35 | |
vmpstr | b404063 | 2015-01-23 17:53:41 | [diff] [blame] | 36 | protected: |
37 | RasterTilePriorityQueue() {} | ||||
[email protected] | bf05058 | 2014-07-24 11:10:58 | [diff] [blame] | 38 | }; |
39 | |||||
40 | } // namespace cc | ||||
41 | |||||
danakj | 92015685 | 2015-05-18 20:22:29 | [diff] [blame] | 42 | #endif // CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_ |