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

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

Issue 924613002: cc: Switch eviction iterators to consider combined priority. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/eviction_tile_priority_queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_EVICTION_TILE_PRIORITY_QUEUE_H_ 5 #ifndef CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_
6 #define CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ 6 #define CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "cc/layers/picture_layer_impl.h" 13 #include "cc/layers/picture_layer_impl.h"
14 #include "cc/resources/tile_priority.h" 14 #include "cc/resources/tile_priority.h"
15 #include "cc/resources/tiling_set_eviction_queue.h" 15 #include "cc/resources/tiling_set_eviction_queue.h"
16 16
17 namespace cc { 17 namespace cc {
18 18
19 class CC_EXPORT EvictionTilePriorityQueue { 19 class CC_EXPORT EvictionTilePriorityQueue {
20 public: 20 public:
21 struct PairedTilingSetQueue { 21 struct PairedTilingSetQueue {
22 PairedTilingSetQueue(); 22 PairedTilingSetQueue();
23 PairedTilingSetQueue(const PictureLayerImpl::Pair& layer_pair, 23 PairedTilingSetQueue(const PictureLayerImpl::Pair& layer_pair,
24 TreePriority tree_priority); 24 TreePriority tree_priority);
25 ~PairedTilingSetQueue(); 25 ~PairedTilingSetQueue();
26 26
27 bool IsEmpty() const; 27 bool IsEmpty() const;
28 Tile* Top(TreePriority tree_priority); 28 Tile* Top();
29 void Pop(TreePriority tree_priority); 29 void Pop();
30 30
31 WhichTree NextTileIteratorTree(TreePriority tree_priority) const; 31 WhichTree NextTileIteratorTree() const;
32 32
33 scoped_ptr<TilingSetEvictionQueue> active_queue; 33 scoped_ptr<TilingSetEvictionQueue> active_queue;
34 scoped_ptr<TilingSetEvictionQueue> pending_queue; 34 scoped_ptr<TilingSetEvictionQueue> pending_queue;
35 35
36 // Set of returned tiles (excluding the current one) for DCHECKing. 36 // Set of returned tiles (excluding the current one) for DCHECKing.
37 std::set<const Tile*> returned_tiles_for_debug; 37 std::set<const Tile*> returned_tiles_for_debug;
38 }; 38 };
39 39
40 EvictionTilePriorityQueue(); 40 EvictionTilePriorityQueue();
41 ~EvictionTilePriorityQueue(); 41 ~EvictionTilePriorityQueue();
(...skipping 11 matching lines...) Expand all
53 // objects directly (ie std::vector<PairedTilingSetQueue>). 53 // objects directly (ie std::vector<PairedTilingSetQueue>).
54 ScopedPtrVector<PairedTilingSetQueue> paired_queues_; 54 ScopedPtrVector<PairedTilingSetQueue> paired_queues_;
55 TreePriority tree_priority_; 55 TreePriority tree_priority_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue); 57 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue);
58 }; 58 };
59 59
60 } // namespace cc 60 } // namespace cc
61 61
62 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ 62 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/eviction_tile_priority_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698