OLD | NEW |
(Empty) | |
| 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 |
| 5 #ifndef CC_RESOURCES_TILE_PRIORITY_QUEUE_H_ |
| 6 #define CC_RESOURCES_TILE_PRIORITY_QUEUE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 namespace cc { |
| 11 |
| 12 class PictureLayerImpl; |
| 13 class Tile; |
| 14 |
| 15 class TilePriorityQueue { |
| 16 public: |
| 17 virtual void Pop() = 0; |
| 18 virtual bool IsEmpty() = 0; |
| 19 virtual Tile* Top() = 0; |
| 20 |
| 21 protected: |
| 22 struct PairedPictureLayer { |
| 23 PairedPictureLayer(); |
| 24 ~PairedPictureLayer(); |
| 25 |
| 26 PictureLayerImpl* active_layer; |
| 27 PictureLayerImpl* pending_layer; |
| 28 }; |
| 29 |
| 30 virtual ~TilePriorityQueue(); |
| 31 |
| 32 // Given a set of layers and an empty paired_layers output vector, this will |
| 33 // construct pairs out of layers so that twin layers will appear in the same |
| 34 // picture pair. |
| 35 void GetPairedPictureLayers( |
| 36 const std::vector<PictureLayerImpl*>& layers, |
| 37 std::vector<PairedPictureLayer>* paired_layers) const; |
| 38 }; |
| 39 |
| 40 } // namespace cc |
| 41 |
| 42 #endif // CC_RESOURCES_TILE_PRIORITY_QUEUE_H_ |
OLD | NEW |