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

Unified Diff: cc/layers/picture_layer_impl.h

Issue 428533008: cc: Remove vectors from tiling eviction tile iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.h
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index d49205137510bd9d5f3bc57e89a785d42de65616..d91c3859340e7fb27420a4922c7892c1b0dbae5c 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -77,15 +77,44 @@ class CC_EXPORT PictureLayerImpl
operator bool() const;
private:
+ enum RangeType {
+ HIGHER_THAN_HIGH_RES,
+ LOWER_THAN_LOW_RES,
+ BETWEEN_HIGH_AND_LOW_RES,
+ LOW_RES,
+ HIGH_RES,
+ NUM_RANGE_TYPES
+ };
+ struct TilingIterationRange {
+ int tiling_offset;
+ int count;
+ };
+ struct IterationStage {
+ IterationStage(TilePriority::PriorityBin type, bool is_required)
reveman 2014/07/31 15:32:48 style nit: use the same name for ctor arguments an
vmpstr 2014/08/01 06:04:48 This is gone now.
+ : tile_type(type), required_for_activation(is_required) {}
+
+ TilePriority::PriorityBin tile_type;
+ bool required_for_activation;
+ };
+
+ void SetEmptyRange(RangeType type);
+ void SetRange(RangeType type, int start_index, int end_index);
+
+ int GetCurrentTilingIndex();
+ void ConstructRanges();
+ bool CurrentTilingIndexInRange();
void AdvanceToNextIterator();
- bool IsCorrectType(
- PictureLayerTiling::TilingEvictionTileIterator* it) const;
+ bool AdvanceTiling();
+ bool AdvanceRange();
+ bool AdvanceStage();
- std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_;
- size_t iterator_index_;
- TilePriority::PriorityBin iteration_stage_;
- bool required_for_activation_;
+ PictureLayerTiling::TilingEvictionTileIterator iterator_;
+ int current_range_offset_;
+ RangeType current_range_type_;
+ IterationStage current_stage_;
+ TilingIterationRange ranges_[NUM_RANGE_TYPES];
+ TreePriority tree_priority_;
PictureLayerImpl* layer_;
};
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698