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

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

Issue 1126813002: cc: Pass priority rect information from iterators to tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase fix Created 5 years, 7 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/resources/picture_layer_tiling.cc ('k') | cc/resources/tiling_set_eviction_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_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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 VISIBLE_RECT_REQUIRED_FOR_ACTIVATION_OCCLUDED, 84 VISIBLE_RECT_REQUIRED_FOR_ACTIVATION_OCCLUDED,
85 VISIBLE_RECT_REQUIRED_FOR_ACTIVATION_UNOCCLUDED 85 VISIBLE_RECT_REQUIRED_FOR_ACTIVATION_UNOCCLUDED
86 }; 86 };
87 87
88 void GenerateTilingOrder(PictureLayerTilingSet* tiling_set); 88 void GenerateTilingOrder(PictureLayerTilingSet* tiling_set);
89 89
90 // Helper base class for individual region iterators. 90 // Helper base class for individual region iterators.
91 class EvictionRectIterator { 91 class EvictionRectIterator {
92 public: 92 public:
93 EvictionRectIterator(); 93 EvictionRectIterator();
94 EvictionRectIterator(std::vector<PictureLayerTiling*>* tilings, 94 EvictionRectIterator(
95 WhichTree tree, 95 std::vector<PictureLayerTiling*>* tilings,
96 bool skip_pending_visible_rect); 96 WhichTree tree,
97 PictureLayerTiling::PriorityRectType priority_rect_type);
97 98
98 bool done() const { return !prioritized_tile_.tile(); } 99 bool done() const { return !prioritized_tile_.tile(); }
99 const PrioritizedTile& operator*() const { return prioritized_tile_; } 100 const PrioritizedTile& operator*() const { return prioritized_tile_; }
100 101
101 protected: 102 protected:
102 ~EvictionRectIterator() = default; 103 ~EvictionRectIterator() = default;
103 104
104 template <typename TilingIteratorType> 105 template <typename TilingIteratorType>
105 bool AdvanceToNextTile(TilingIteratorType* iterator); 106 bool AdvanceToNextTile(TilingIteratorType* iterator);
106 template <typename TilingIteratorType> 107 template <typename TilingIteratorType>
107 bool GetFirstTileAndCheckIfValid(TilingIteratorType* iterator); 108 bool GetFirstTileAndCheckIfValid(TilingIteratorType* iterator);
108 109
109 PrioritizedTile prioritized_tile_; 110 PrioritizedTile prioritized_tile_;
110 std::vector<PictureLayerTiling*>* tilings_; 111 std::vector<PictureLayerTiling*>* tilings_;
111 WhichTree tree_; 112 WhichTree tree_;
112 bool skip_pending_visible_rect_; 113 PictureLayerTiling::PriorityRectType priority_rect_type_;
113 size_t tiling_index_; 114 size_t tiling_index_;
114 }; 115 };
115 116
116 class PendingVisibleTilingIterator : public EvictionRectIterator { 117 class PendingVisibleTilingIterator : public EvictionRectIterator {
117 public: 118 public:
118 PendingVisibleTilingIterator() = default; 119 PendingVisibleTilingIterator() = default;
119 PendingVisibleTilingIterator(std::vector<PictureLayerTiling*>* tilings, 120 PendingVisibleTilingIterator(std::vector<PictureLayerTiling*>* tilings,
120 WhichTree tree, 121 WhichTree tree,
121 bool return_required_for_activation_tiles); 122 bool return_required_for_activation_tiles);
122 123
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 EventuallyTilingIterator eventually_iterator_; 194 EventuallyTilingIterator eventually_iterator_;
194 SoonBorderTilingIterator soon_iterator_; 195 SoonBorderTilingIterator soon_iterator_;
195 SkewportTilingIterator skewport_iterator_; 196 SkewportTilingIterator skewport_iterator_;
196 PendingVisibleTilingIterator pending_visible_iterator_; 197 PendingVisibleTilingIterator pending_visible_iterator_;
197 VisibleTilingIterator visible_iterator_; 198 VisibleTilingIterator visible_iterator_;
198 }; 199 };
199 200
200 } // namespace cc 201 } // namespace cc
201 202
202 #endif // CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ 203 #endif // CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/tiling_set_eviction_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698