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

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

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.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
(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
13 namespace cc {
14
15 // This queue only returns tiles that are required for either activation or
16 // draw, as specified by RasterTilePriorityQueue::Type passed in the
17 // constructor.
18 class CC_EXPORT TilingSetRasterQueueRequired {
19 public:
20 TilingSetRasterQueueRequired(PictureLayerTilingSet* tiling_set,
21 RasterTilePriorityQueue::Type type);
22 ~TilingSetRasterQueueRequired();
23
24 Tile* Top();
25 const Tile* Top() const;
26 void Pop();
27 bool IsEmpty() const;
28
29 private:
30 // This iterator will return all tiles that are in the NOW bin on the given
31 // tiling. The queue can then use these tiles and further filter them based on
32 // whether they are required or not.
33 class TilingIterator {
34 public:
35 TilingIterator();
36 explicit TilingIterator(PictureLayerTiling* tiling,
37 TilingData* tiling_data);
38 ~TilingIterator();
39
40 bool done() const { return current_tile_ == nullptr; }
41 const Tile* operator*() const { return current_tile_; }
42 Tile* operator*() { return current_tile_; }
43 TilingIterator& operator++();
44
45 private:
46 PictureLayerTiling* tiling_;
47 TilingData* tiling_data_;
48
49 Tile* current_tile_;
50 TilingData::Iterator visible_iterator_;
51 };
52
53 bool IsTileRequired(const Tile* tile) const;
54
55 TilingIterator iterator_;
56 RasterTilePriorityQueue::Type type_;
57 };
58
59 } // namespace cc
60
61 #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