OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_RASTER_TILE_PRIORITY_QUEUE_H_ | 5 #ifndef CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ |
6 #define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ | 6 #define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "base/containers/hash_tables.h" |
10 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
11 #include "cc/layers/picture_layer_impl.h" | 12 #include "cc/layers/picture_layer_impl.h" |
12 #include "cc/resources/tile_priority.h" | 13 #include "cc/resources/tile_priority.h" |
13 | 14 |
14 namespace cc { | 15 namespace cc { |
15 class Tile; | 16 class Tile; |
16 | 17 |
17 class CC_EXPORT RasterTilePriorityQueue { | 18 class CC_EXPORT RasterTilePriorityQueue { |
18 public: | 19 public: |
19 enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW }; | 20 enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW }; |
20 | 21 |
21 // TODO(vmpstr): Make this work with PictureLayerTilingSet pairs instead. | |
22 static scoped_ptr<RasterTilePriorityQueue> Create( | 22 static scoped_ptr<RasterTilePriorityQueue> Create( |
23 const std::vector<PictureLayerImpl::Pair>& paired_layers, | 23 const base::hash_map<int, PictureLayerTilingSet::Pair>& |
| 24 paired_picture_layer_tiling_sets, |
| 25 bool has_pending_tree, |
24 TreePriority tree_priority, | 26 TreePriority tree_priority, |
25 Type type); | 27 Type type); |
26 | 28 |
27 virtual ~RasterTilePriorityQueue() {} | 29 virtual ~RasterTilePriorityQueue() {} |
28 | 30 |
29 virtual bool IsEmpty() const = 0; | 31 virtual bool IsEmpty() const = 0; |
30 virtual Tile* Top() = 0; | 32 virtual Tile* Top() = 0; |
31 virtual void Pop() = 0; | 33 virtual void Pop() = 0; |
32 | 34 |
33 protected: | 35 protected: |
34 RasterTilePriorityQueue() {} | 36 RasterTilePriorityQueue() {} |
35 | 37 |
36 private: | 38 private: |
37 DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueue); | 39 DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueue); |
38 }; | 40 }; |
39 | 41 |
40 } // namespace cc | 42 } // namespace cc |
41 | 43 |
42 #endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ | 44 #endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ |
OLD | NEW |