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

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

Issue 816453008: cc: Split tiling set raster queues into all and required. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 11 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_RASTER_QUEUE_H_ 5 #ifndef CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_
6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ 6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/resources/picture_layer_tiling_set.h" 9 #include "cc/resources/picture_layer_tiling_set.h"
10 #include "cc/resources/tile.h" 10 #include "cc/resources/tile.h"
11 #include "cc/resources/tile_priority.h" 11 #include "cc/resources/tile_priority.h"
12 #include "cc/resources/tiling_set_raster_queue.h"
12 13
13 namespace cc { 14 namespace cc {
14 15
15 class CC_EXPORT TilingSetRasterQueue { 16 // This queue returns all tiles required to be rasterized from HIGH_RESOLUTION
17 // and LOW_RESOLUTION tilings.
18 class CC_EXPORT TilingSetRasterQueueAll : public TilingSetRasterQueue {
16 public: 19 public:
17 TilingSetRasterQueue(); 20 TilingSetRasterQueueAll(PictureLayerTilingSet* tiling_set,
18 TilingSetRasterQueue(PictureLayerTilingSet* tiling_set, 21 bool prioritize_low_res);
19 bool prioritize_low_res); 22 ~TilingSetRasterQueueAll() override;
20 ~TilingSetRasterQueue();
21 23
22 Tile* Top(); 24 Tile* Top() override;
23 const Tile* Top() const; 25 const Tile* Top() const override;
24 void Pop(); 26 void Pop() override;
25 bool IsEmpty() const; 27 bool IsEmpty() const override;
26 28
27 private: 29 private:
28 class TilingIterator { 30 class TilingIterator {
29 public: 31 public:
30 TilingIterator(); 32 TilingIterator();
31 explicit TilingIterator(PictureLayerTiling* tiling, 33 explicit TilingIterator(PictureLayerTiling* tiling,
32 TilingData* tiling_data); 34 TilingData* tiling_data);
33 ~TilingIterator(); 35 ~TilingIterator();
34 36
35 operator bool() const { return !!current_tile_; } 37 bool done() const { return current_tile_ == nullptr; }
danakj 2015/01/12 18:23:13 One less operator :)
36 const Tile* operator*() const { return current_tile_; } 38 const Tile* operator*() const { return current_tile_; }
37 Tile* operator*() { return current_tile_; } 39 Tile* operator*() { return current_tile_; }
38 TilePriority::PriorityBin type() const { 40 TilePriority::PriorityBin type() const {
39 switch (phase_) { 41 switch (phase_) {
40 case VISIBLE_RECT: 42 case VISIBLE_RECT:
41 return TilePriority::NOW; 43 return TilePriority::NOW;
42 case SKEWPORT_RECT: 44 case SKEWPORT_RECT:
43 case SOON_BORDER_RECT: 45 case SOON_BORDER_RECT:
44 return TilePriority::SOON; 46 return TilePriority::SOON;
45 case EVENTUALLY_RECT: 47 case EVENTUALLY_RECT:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 89
88 size_t current_stage_; 90 size_t current_stage_;
89 91
90 // One low res stage, and three high res stages. 92 // One low res stage, and three high res stages.
91 IterationStage stages_[4]; 93 IterationStage stages_[4];
92 TilingIterator iterators_[NUM_ITERATORS]; 94 TilingIterator iterators_[NUM_ITERATORS];
93 }; 95 };
94 96
95 } // namespace cc 97 } // namespace cc
96 98
97 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ 99 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698