summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer_impl.h
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2014-12-08 10:38:14 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-08 18:39:02 +0000
commitbc22bb72cbb3fdef0216fb7eba164954cdfdd313 (patch)
tree6ae86a1b4644c57c4ad29adc5063576d86edba4d /cc/layers/picture_layer_impl.h
parentea7bdf5268e4d2be507aea24f985bd6a3f3421f5 (diff)
downloadchromium_src-bc22bb72cbb3fdef0216fb7eba164954cdfdd313.zip
chromium_src-bc22bb72cbb3fdef0216fb7eba164954cdfdd313.tar.gz
chromium_src-bc22bb72cbb3fdef0216fb7eba164954cdfdd313.tar.bz2
cc: Move LayerRasterTileIterator to a separate file and make it a queue
This patch removes PictureLayerImpl::LayerRasterTileIterator, moves it to a separate file, renames it to TilingSetRasterQueue, and makes its functionality be more queue-like instead of iterator-like. Also, this patch adds a PLI::CreateRasterQueue to get a raster queue for the layer. This hides a bit more details of PLTS from PLI and allows us in the future to optimize or create other types of TilingSetRasterQueues. BUG=433048 R=reveman, enne Review URL: https://codereview.chromium.org/742343002 Cr-Commit-Position: refs/heads/master@{#307287}
Diffstat (limited to 'cc/layers/picture_layer_impl.h')
-rw-r--r--cc/layers/picture_layer_impl.h32
1 files changed, 2 insertions, 30 deletions
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 52d8433..ddf928b 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -16,6 +16,7 @@
#include "cc/resources/picture_layer_tiling_set.h"
#include "cc/resources/picture_pile_impl.h"
#include "cc/resources/tiling_set_eviction_queue.h"
+#include "cc/resources/tiling_set_raster_queue.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkPicture.h"
@@ -38,36 +39,6 @@ class CC_EXPORT PictureLayerImpl
PictureLayerImpl* pending;
};
- class CC_EXPORT LayerRasterTileIterator {
- public:
- LayerRasterTileIterator();
- LayerRasterTileIterator(PictureLayerImpl* layer, bool prioritize_low_res);
- ~LayerRasterTileIterator();
-
- Tile* operator*();
- const Tile* operator*() const;
- LayerRasterTileIterator& operator++();
- operator bool() const;
-
- private:
- enum IteratorType { LOW_RES, HIGH_RES, NUM_ITERATORS };
-
- void AdvanceToNextStage();
-
- PictureLayerImpl* layer_;
-
- struct IterationStage {
- IteratorType iterator_type;
- TilePriority::PriorityBin tile_type;
- };
-
- size_t current_stage_;
-
- // One low res stage, and three high res stages.
- IterationStage stages_[4];
- PictureLayerTiling::TilingRasterTileIterator iterators_[NUM_ITERATORS];
- };
-
static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new PictureLayerImpl(tree_impl, id));
}
@@ -75,6 +46,7 @@ class CC_EXPORT PictureLayerImpl
scoped_ptr<TilingSetEvictionQueue> CreateEvictionQueue(
TreePriority tree_priority);
+ scoped_ptr<TilingSetRasterQueue> CreateRasterQueue(bool prioritize_low_res);
// LayerImpl overrides.
const char* LayerTypeAsString() const override;