diff options
author | danakj <danakj@chromium.org> | 2015-05-18 13:22:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-18 20:22:35 +0000 |
commit | 92015685c3dc2ef005e58c975269f532468e68b8 (patch) | |
tree | 94d71b2784e5a7e640cba6883d8c954cbabbca3c /cc/tiles/tiling_set_raster_queue_required.h | |
parent | e3417c1e06cb80a5d1493e66a7f872297bd94e8f (diff) | |
download | chromium_src-92015685c3dc2ef005e58c975269f532468e68b8.zip chromium_src-92015685c3dc2ef005e58c975269f532468e68b8.tar.gz chromium_src-92015685c3dc2ef005e58c975269f532468e68b8.tar.bz2 |
cc: Move files out of cc/resources/.
This moves files into cc/playback/ cc/raster/ cc/tiles/ and cc/output/
and is based on the proposal found in
https://docs.google.com/spreadsheets/d/1wmPOmV9uqd9zNJ5l2TGePH7_vlSvPeXbC-Y3SeGJ_rc/edit#gid=0
R=enne, vmpstr
TBR=piman
BUG=488755
Review URL: https://codereview.chromium.org/1144693002
Cr-Commit-Position: refs/heads/master@{#330396}
Diffstat (limited to 'cc/tiles/tiling_set_raster_queue_required.h')
-rw-r--r-- | cc/tiles/tiling_set_raster_queue_required.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/cc/tiles/tiling_set_raster_queue_required.h b/cc/tiles/tiling_set_raster_queue_required.h new file mode 100644 index 0000000..4573d04 --- /dev/null +++ b/cc/tiles/tiling_set_raster_queue_required.h @@ -0,0 +1,60 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_TILES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ +#define CC_TILES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ + +#include "cc/base/cc_export.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/raster_tile_priority_queue.h" +#include "cc/tiles/tile.h" + +namespace cc { + +// This queue only returns tiles that are required for either activation or +// draw, as specified by RasterTilePriorityQueue::Type passed in the +// constructor. +class CC_EXPORT TilingSetRasterQueueRequired { + public: + TilingSetRasterQueueRequired(PictureLayerTilingSet* tiling_set, + RasterTilePriorityQueue::Type type); + ~TilingSetRasterQueueRequired(); + + const PrioritizedTile& Top() const; + void Pop(); + bool IsEmpty() const; + + private: + // This iterator will return all tiles that are in the NOW bin on the given + // tiling. The queue can then use these tiles and further filter them based on + // whether they are required or not. + class TilingIterator { + public: + TilingIterator(); + explicit TilingIterator(PictureLayerTiling* tiling, + TilingData* tiling_data, + const gfx::Rect& rect); + ~TilingIterator(); + + bool done() const { return !current_tile_.tile(); } + const PrioritizedTile& operator*() const { return current_tile_; } + TilingIterator& operator++(); + + private: + PictureLayerTiling* tiling_; + TilingData* tiling_data_; + + PrioritizedTile current_tile_; + TilingData::Iterator visible_iterator_; + }; + + bool IsTileRequired(const PrioritizedTile& prioritized_tile) const; + + TilingIterator iterator_; + RasterTilePriorityQueue::Type type_; +}; + +} // namespace cc + +#endif // CC_TILES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ |