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

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

Issue 736753002: cc: Implement geometry-based tile eviction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up Created 6 years 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ 5 #ifndef CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
6 #define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ 6 #define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
7 7
8 #include <vector>
9
8 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
9 #include "cc/resources/picture_layer_tiling_set.h" 11 #include "cc/resources/picture_layer_tiling_set.h"
10 12
11 namespace cc { 13 namespace cc {
12 14
13 class CC_EXPORT TilingSetEvictionQueue { 15 class CC_EXPORT TilingSetEvictionQueue {
14 public: 16 public:
15 TilingSetEvictionQueue(); 17 TilingSetEvictionQueue();
16 TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set, 18 TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set,
17 TreePriority tree_priority); 19 TreePriority tree_priority,
20 bool skip_shared_out_of_order_tiles);
18 ~TilingSetEvictionQueue(); 21 ~TilingSetEvictionQueue();
19 22
20 Tile* Top(); 23 Tile* Top();
21 const Tile* Top() const; 24 const Tile* Top() const;
22 void Pop(); 25 void Pop();
23 bool IsEmpty() const; 26 bool IsEmpty() const;
24 27
25 private: 28 private:
26 bool AdvanceToNextCategory();
27 bool AdvanceToNextEvictionTile(); 29 bool AdvanceToNextEvictionTile();
30 bool AdvanceToNextPriorityBin();
28 bool AdvanceToNextTilingRangeType(); 31 bool AdvanceToNextTilingRangeType();
29 bool AdvanceToNextValidTiling(); 32 bool AdvanceToNextValidTiling();
33 bool AdvanceToSkewport();
30 34
31 PictureLayerTilingSet::TilingRange CurrentTilingRange() const; 35 PictureLayerTilingSet::TilingRange CurrentTilingRange() const;
32 size_t CurrentTilingIndex() const; 36 size_t CurrentTilingIndex() const;
37 bool IsSharedOutOfOrderTile(const Tile* tile) const;
38
39 void SetCurrentRequiredForActivationTilingIndex(size_t index);
33 40
34 PictureLayerTilingSet* tiling_set_; 41 PictureLayerTilingSet* tiling_set_;
35 TreePriority tree_priority_; 42 TreePriority tree_priority_;
43 bool skip_shared_out_of_order_tiles_;
44 bool processing_required_for_activation_tiling_;
vmpstr 2014/12/09 02:10:59 I'm not sure what this means.. tilings aren't typi
USE eero AT chromium.org 2014/12/09 18:44:15 Yes. But it is also true if we are processing the
vmpstr 2014/12/09 19:47:55 I see. I think the second name is better, since it
USE eero AT chromium.org 2014/12/10 12:35:45 Done.
45 bool processing_soon_border_rect_;
36 46
37 PictureLayerTiling::EvictionCategory current_category_; 47 TilePriority::PriorityBin current_priority_bin_;
48 PictureLayerTiling* current_tiling_;
38 size_t current_tiling_index_; 49 size_t current_tiling_index_;
50 size_t current_required_for_activation_tiling_index_;
39 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; 51 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_;
40 Tile* current_eviction_tile_; 52 Tile* current_eviction_tile_;
41 53
42 const std::vector<Tile*>* eviction_tiles_; 54 TilingData::ReverseSpiralDifferenceIterator spiral_iterator_;
43 size_t next_eviction_tile_index_; 55 TilingData::Iterator visible_iterator_;
56 std::vector<Tile*> unoccluded_now_tiles_;
57 size_t next_unoccluded_now_tile_index_;
44 }; 58 };
45 59
46 } // namespace cc 60 } // namespace cc
47 61
48 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ 62 #endif // CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698