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

Side by Side Diff: cc/tiles/tiling_set_raster_queue_all.h

Issue 2899403003: cc: Give non-drawing layers that are rasterized a lower priority. (Closed)
Patch Set: type Created 3 years, 6 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/tiles/tile_manager_unittest.cc ('k') | cc/tiles/tiling_set_raster_queue_all.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_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ 5 #ifndef CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_
6 #define CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ 6 #define CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/containers/stack_container.h" 10 #include "base/containers/stack_container.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "cc/cc_export.h" 12 #include "cc/cc_export.h"
13 #include "cc/tiles/picture_layer_tiling_set.h" 13 #include "cc/tiles/picture_layer_tiling_set.h"
14 #include "cc/tiles/prioritized_tile.h" 14 #include "cc/tiles/prioritized_tile.h"
15 #include "cc/tiles/tile.h" 15 #include "cc/tiles/tile.h"
16 #include "cc/tiles/tile_priority.h" 16 #include "cc/tiles/tile_priority.h"
17 17
18 namespace cc { 18 namespace cc {
19 19
20 // This queue returns all tiles required to be rasterized from HIGH_RESOLUTION 20 // This queue returns all tiles required to be rasterized from HIGH_RESOLUTION
21 // and LOW_RESOLUTION tilings. 21 // and LOW_RESOLUTION tilings.
22 class CC_EXPORT TilingSetRasterQueueAll { 22 class CC_EXPORT TilingSetRasterQueueAll {
23 public: 23 public:
24 TilingSetRasterQueueAll(PictureLayerTilingSet* tiling_set, 24 TilingSetRasterQueueAll(PictureLayerTilingSet* tiling_set,
25 bool prioritize_low_res); 25 bool prioritize_low_res,
26 bool is_drawing_layer);
26 ~TilingSetRasterQueueAll(); 27 ~TilingSetRasterQueueAll();
27 28
28 const PrioritizedTile& Top() const; 29 const PrioritizedTile& Top() const;
29 void Pop(); 30 void Pop();
30 bool IsEmpty() const; 31 bool IsEmpty() const;
32 bool is_drawing_layer() const { return is_drawing_layer_; }
31 33
32 private: 34 private:
33 // Helper base class for individual region iterators. 35 // Helper base class for individual region iterators.
34 class OnePriorityRectIterator { 36 class OnePriorityRectIterator {
35 public: 37 public:
36 OnePriorityRectIterator(); 38 OnePriorityRectIterator();
37 OnePriorityRectIterator( 39 OnePriorityRectIterator(
38 PictureLayerTiling* tiling, 40 PictureLayerTiling* tiling,
39 TilingData* tiling_data, 41 TilingData* tiling_data,
40 PictureLayerTiling::PriorityRectType priority_rect_type); 42 PictureLayerTiling::PriorityRectType priority_rect_type);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 IteratorType iterator_type; 185 IteratorType iterator_type;
184 TilePriority::PriorityBin tile_type; 186 TilePriority::PriorityBin tile_type;
185 }; 187 };
186 188
187 size_t current_stage_; 189 size_t current_stage_;
188 190
189 // The max number of stages is 6: 1 low res, 3 high res, and 2 active non 191 // The max number of stages is 6: 1 low res, 3 high res, and 2 active non
190 // ideal pending high res. 192 // ideal pending high res.
191 base::StackVector<IterationStage, 6> stages_; 193 base::StackVector<IterationStage, 6> stages_;
192 TilingIterator iterators_[NUM_ITERATORS]; 194 TilingIterator iterators_[NUM_ITERATORS];
195 bool is_drawing_layer_ = false;
193 196
194 DISALLOW_COPY_AND_ASSIGN(TilingSetRasterQueueAll); 197 DISALLOW_COPY_AND_ASSIGN(TilingSetRasterQueueAll);
195 }; 198 };
196 199
197 } // namespace cc 200 } // namespace cc
198 201
199 #endif // CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ 202 #endif // CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/tiles/tiling_set_raster_queue_all.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698