Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: cc/resources/eviction_tile_priority_queue.h

Issue 406543003: cc: Change TileManager iterators to be queues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_EVICTION_TILE_PRIORITY_QUEUE_H_
6 #define CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_
7
8 #include <utility>
9 #include <vector>
10
11 #include "cc/base/cc_export.h"
12 #include "cc/layers/picture_layer_impl.h"
13 #include "cc/resources/tile_priority.h"
14
15 namespace cc {
16
17 class CC_EXPORT EvictionTilePriorityQueue {
18 public:
19 struct PairedPictureLayerQueue {
20 PairedPictureLayerQueue();
reveman 2014/07/19 00:45:50 How about we pass a PictureLayerImpl::Pair ref and
vmpstr 2014/07/20 01:15:04 Done.
21 ~PairedPictureLayerQueue();
22
23 Tile* Top(TreePriority tree_priority);
24 bool IsEmpty() const;
25 void Pop(TreePriority tree_priority);
reveman 2014/07/19 00:45:50 Please reorder these based on typical usage (IsEmp
vmpstr 2014/07/20 01:15:04 Done.
26
27 PictureLayerImpl::LayerEvictionTileIterator* NextTileIterator(
28 TreePriority tree_priority);
29
30 PictureLayerImpl::LayerEvictionTileIterator active_iterator;
31 PictureLayerImpl::LayerEvictionTileIterator pending_iterator;
32
33 // TODO(vmpstr): Investigate removing this.
34 std::vector<Tile*> returned_shared_tiles;
35 };
36
37 EvictionTilePriorityQueue();
38 ~EvictionTilePriorityQueue();
39
40 void Build(const std::vector<PictureLayerImpl::Pair>& paired_layers,
41 TreePriority tree_priority);
42 void Reset();
43
44 void Pop();
45 bool IsEmpty() const;
46 Tile* Top();
reveman 2014/07/19 00:45:50 reorder
vmpstr 2014/07/20 01:15:04 Done.
47
48 private:
49 std::vector<PairedPictureLayerQueue> paired_queues_;
50 TreePriority tree_priority_;
51
52 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue);
53 };
54
55 } // namespace cc
56
57 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698