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

Side by Side Diff: cc/resources/tiling_set_raster_queue_required.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: rebase 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_
6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/resources/picture_layer_tiling_set.h"
10 #include "cc/resources/raster_tile_priority_queue.h"
11 #include "cc/resources/tile.h"
12 #include "cc/resources/tiling_set_raster_queue.h"
13
14 namespace cc {
15
16 // This queue only returns tiles that are required for either activation or
17 // draw, as specified by RasterTilePriorityQueue::Type passed in the
18 // constructor.
19 class CC_EXPORT TilingSetRasterQueueRequired
20 : public NON_EXPORTED_BASE(TilingSetRasterQueue) {
21 public:
22 TilingSetRasterQueueRequired(PictureLayerTilingSet* tiling_set,
23 RasterTilePriorityQueue::Type type);
24 ~TilingSetRasterQueueRequired() override;
25
26 Tile* Top() override;
27 const Tile* Top() const override;
28 void Pop() override;
29 bool IsEmpty() const override;
30
31 private:
32 // This iterator will return all tiles that are in the NOW bin on the given
33 // tiling. The queue can then use these tiles and further filter them based on
34 // whether they are required or not.
35 class TilingIterator {
36 public:
37 TilingIterator();
38 explicit TilingIterator(PictureLayerTiling* tiling,
39 TilingData* tiling_data);
40 ~TilingIterator();
41
42 bool done() const { return current_tile_ == nullptr; }
43 const Tile* operator*() const { return current_tile_; }
44 Tile* operator*() { return current_tile_; }
45 TilingIterator& operator++();
46
47 private:
48 PictureLayerTiling* tiling_;
49 TilingData* tiling_data_;
50
51 Tile* current_tile_;
52 TilingData::Iterator visible_iterator_;
53 };
54
55 bool IsTileRequired(const Tile* tile) const;
56
57 TilingIterator iterator_;
58 RasterTilePriorityQueue::Type type_;
59 };
60
61 } // namespace cc
62
63 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_
OLDNEW
« no previous file with comments | « cc/resources/tiling_set_raster_queue_all.cc ('k') | cc/resources/tiling_set_raster_queue_required.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698