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

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

Issue 900073003: cc: Rework how picture layer tiling set gets into raster queues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unrelated changes Created 5 years, 10 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_PICTURE_LAYER_TILING_SET_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 BETWEEN_HIGH_AND_LOW_RES, 35 BETWEEN_HIGH_AND_LOW_RES,
36 LOW_RES, 36 LOW_RES,
37 LOWER_THAN_LOW_RES 37 LOWER_THAN_LOW_RES
38 }; 38 };
39 struct TilingRange { 39 struct TilingRange {
40 TilingRange(size_t start, size_t end) : start(start), end(end) {} 40 TilingRange(size_t start, size_t end) : start(start), end(end) {}
41 41
42 size_t start; 42 size_t start;
43 size_t end; 43 size_t end;
44 }; 44 };
45 struct Pair {
46 PictureLayerTilingSet* active = nullptr;
47 PictureLayerTilingSet* pending = nullptr;
48 };
45 49
46 static scoped_ptr<PictureLayerTilingSet> Create( 50 static scoped_ptr<PictureLayerTilingSet> Create(
47 PictureLayerTilingClient* client, 51 PictureLayerTilingClient* client,
48 size_t max_tiles_for_interest_area, 52 size_t max_tiles_for_interest_area,
49 float skewport_target_time_in_seconds, 53 float skewport_target_time_in_seconds,
50 int skewport_extrapolation_limit_in_content); 54 int skewport_extrapolation_limit_in_content);
51 55
52 ~PictureLayerTilingSet(); 56 ~PictureLayerTilingSet();
53 57
54 const PictureLayerTilingClient* client() const { return client_; } 58 const PictureLayerTilingClient* client() const { return client_; }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 111
108 // Update the rects and priorities for tiles based on the given information. 112 // Update the rects and priorities for tiles based on the given information.
109 bool UpdateTilePriorities(const gfx::Rect& required_rect_in_layer_space, 113 bool UpdateTilePriorities(const gfx::Rect& required_rect_in_layer_space,
110 float ideal_contents_scale, 114 float ideal_contents_scale,
111 double current_frame_time_in_seconds, 115 double current_frame_time_in_seconds,
112 const Occlusion& occlusion_in_layer_space, 116 const Occlusion& occlusion_in_layer_space,
113 bool can_require_tiles_for_activation); 117 bool can_require_tiles_for_activation);
114 118
115 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; 119 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
116 120
121 bool HasValidTilePriorities() const;
122
117 // For a given rect, iterates through tiles that can fill it. If no 123 // For a given rect, iterates through tiles that can fill it. If no
118 // set of tiles with resources can fill the rect, then it will iterate 124 // set of tiles with resources can fill the rect, then it will iterate
119 // through null tiles with valid geometry_rect() until the rect is full. 125 // through null tiles with valid geometry_rect() until the rect is full.
120 // If all tiles have resources, the union of all geometry_rects will 126 // If all tiles have resources, the union of all geometry_rects will
121 // exactly fill rect with no overlap. 127 // exactly fill rect with no overlap.
122 class CC_EXPORT CoverageIterator { 128 class CC_EXPORT CoverageIterator {
123 public: 129 public:
124 CoverageIterator(const PictureLayerTilingSet* set, 130 CoverageIterator(const PictureLayerTilingSet* set,
125 float contents_scale, 131 float contents_scale,
126 const gfx::Rect& content_rect, 132 const gfx::Rect& content_rect,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 const int skewport_extrapolation_limit_in_content_pixels_; 185 const int skewport_extrapolation_limit_in_content_pixels_;
180 PictureLayerTilingClient* client_; 186 PictureLayerTilingClient* client_;
181 187
182 friend class Iterator; 188 friend class Iterator;
183 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 189 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
184 }; 190 };
185 191
186 } // namespace cc 192 } // namespace cc
187 193
188 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 194 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698