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

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

Issue 1051473002: cc: Switch tiling set eviction queue to consider combined priority. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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_TILING_SET_EVICTION_QUEUE_H_ 5 #ifndef CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
6 #define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ 6 #define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // occlusion is not taken into account as occlusion is meaningful only for 54 // occlusion is not taken into account as occlusion is meaningful only for
55 // NOW tiles. 55 // NOW tiles.
56 // 56 //
57 // Within each tiling and tile priority rect, tiles are returned in reverse 57 // Within each tiling and tile priority rect, tiles are returned in reverse
58 // spiral order i.e. in (mostly) decreasing distance-to-visible order. 58 // spiral order i.e. in (mostly) decreasing distance-to-visible order.
59 // 59 //
60 // If the skip_shared_out_of_order_tiles value passed to the constructor is 60 // If the skip_shared_out_of_order_tiles value passed to the constructor is
61 // true (like it should be when there is a twin layer with a twin tiling set), 61 // true (like it should be when there is a twin layer with a twin tiling set),
62 // eviction queue does not return shared which are out of order because their 62 // eviction queue does not return shared which are out of order because their
63 // priority for tree priority is lowered or raised by a twin layer. 63 // priority for tree priority is lowered or raised by a twin layer.
64 // * If tree_priority is SAME_PRIORITY_FOR_BOTH_TREES, this happens for 64 // This happens for a tile specific lower priority tree eviction queue
65 // a tile specific lower priority tree eviction queue (because priority for 65 // (because eviction priority the combined priority).
66 // tree priority is a merged priority).
67 // * If tree priority is NEW_CONTENT_TAKES_PRIORITY, this happens for
68 // an active tree eviction queue (because priority for tree priority is
69 // the pending priority).
70 // * If tree_priority is SMOOTHNESS_TAKES_PRIORITY, this happens for a pending
71 // tree eviction queue (because priority for tree priority is the active
72 // priority).
73 // Those skipped shared out of order tiles are when returned only by the twin 66 // Those skipped shared out of order tiles are when returned only by the twin
74 // eviction queue. 67 // eviction queue.
75 class CC_EXPORT TilingSetEvictionQueue { 68 class CC_EXPORT TilingSetEvictionQueue {
76 public: 69 public:
77 TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set, 70 TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set,
78 TreePriority tree_priority,
79 bool skip_shared_out_of_order_tiles); 71 bool skip_shared_out_of_order_tiles);
80 ~TilingSetEvictionQueue(); 72 ~TilingSetEvictionQueue();
81 73
82 Tile* Top(); 74 Tile* Top();
83 const Tile* Top() const; 75 const Tile* Top() const;
84 void Pop(); 76 void Pop();
85 bool IsEmpty() const; 77 bool IsEmpty() const;
86 78
87 private: 79 private:
88 bool AdvanceToNextEvictionTile(); 80 bool AdvanceToNextEvictionTile();
89 bool AdvanceToNextPriorityBin(); 81 bool AdvanceToNextPriorityBin();
90 bool AdvanceToNextTilingRangeType(); 82 bool AdvanceToNextTilingRangeType();
91 bool AdvanceToNextValidTiling(); 83 bool AdvanceToNextValidTiling();
92 84
93 PictureLayerTilingSet::TilingRange CurrentTilingRange() const; 85 PictureLayerTilingSet::TilingRange CurrentTilingRange() const;
94 size_t CurrentTilingIndex() const; 86 size_t CurrentTilingIndex() const;
95 bool IsSharedOutOfOrderTile(const Tile* tile) const;
96 size_t TilingIndexWithRequiredForActivationTiles() const;
97 87
98 PictureLayerTilingSet* tiling_set_; 88 PictureLayerTilingSet* tiling_set_;
99 WhichTree tree_; 89 WhichTree tree_;
100 TreePriority tree_priority_;
101 bool skip_all_shared_tiles_;
102 bool skip_shared_out_of_order_tiles_; 90 bool skip_shared_out_of_order_tiles_;
103 bool processing_soon_border_rect_; 91 bool processing_soon_border_rect_;
104 bool processing_tiling_with_required_for_activation_tiles_; 92 bool processing_required_for_activation_tiles_;
105 size_t tiling_index_with_required_for_activation_tiles_;
106 93
107 TilePriority::PriorityBin current_priority_bin_; 94 TilePriority::PriorityBin current_priority_bin_;
108 PictureLayerTiling* current_tiling_; 95 PictureLayerTiling* current_tiling_;
109 size_t current_tiling_index_; 96 size_t current_tiling_index_;
110 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; 97 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_;
111 Tile* current_eviction_tile_; 98 Tile* current_eviction_tile_;
112 99
113 TilingData::ReverseSpiralDifferenceIterator spiral_iterator_; 100 TilingData::ReverseSpiralDifferenceIterator spiral_iterator_;
114 TilingData::Iterator visible_iterator_; 101 TilingData::Iterator visible_iterator_;
115 std::vector<Tile*> unoccluded_now_tiles_; 102 std::vector<Tile*> unoccluded_now_tiles_;
116 }; 103 };
117 104
118 } // namespace cc 105 } // namespace cc
119 106
120 #endif // CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ 107 #endif // CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698