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

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

Issue 1027563003: cc: Send updated tile priority with tiles into tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_
7 7
8 #include <set> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "cc/base/cc_export.h" 15 #include "cc/base/cc_export.h"
16 #include "cc/base/region.h" 16 #include "cc/base/region.h"
17 #include "cc/base/tiling_data.h" 17 #include "cc/base/tiling_data.h"
18 #include "cc/resources/tile.h" 18 #include "cc/resources/tile.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 const gfx::Rect& GetCurrentVisibleRectForTesting() const { 134 const gfx::Rect& GetCurrentVisibleRectForTesting() const {
135 return current_visible_rect_; 135 return current_visible_rect_;
136 } 136 }
137 137
138 bool IsTileOccluded(const Tile* tile) const; 138 bool IsTileOccluded(const Tile* tile) const;
139 bool IsTileRequiredForActivationIfVisible(const Tile* tile) const; 139 bool IsTileRequiredForActivationIfVisible(const Tile* tile) const;
140 bool IsTileRequiredForDrawIfVisible(const Tile* tile) const; 140 bool IsTileRequiredForDrawIfVisible(const Tile* tile) const;
141 141
142 void UpdateTileAndTwinPriority(Tile* tile) const; 142 void UpdateTileAndTwinPriority(Tile* tile) const;
143 TilePriority ComputePriorityForTile(const Tile* tile) const;
144 void UpdateRequiredStateForTile(Tile* tile, WhichTree tree) const;
143 bool has_visible_rect_tiles() const { return has_visible_rect_tiles_; } 145 bool has_visible_rect_tiles() const { return has_visible_rect_tiles_; }
144 bool has_skewport_rect_tiles() const { return has_skewport_rect_tiles_; } 146 bool has_skewport_rect_tiles() const { return has_skewport_rect_tiles_; }
145 bool has_soon_border_rect_tiles() const { 147 bool has_soon_border_rect_tiles() const {
146 return has_soon_border_rect_tiles_; 148 return has_soon_border_rect_tiles_;
147 } 149 }
148 bool has_eventually_rect_tiles() const { return has_eventually_rect_tiles_; } 150 bool has_eventually_rect_tiles() const { return has_eventually_rect_tiles_; }
149 151
150 const gfx::Rect& current_visible_rect() const { 152 const gfx::Rect& current_visible_rect() const {
151 return current_visible_rect_; 153 return current_visible_rect_;
152 } 154 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 friend class PictureLayerTiling; 206 friend class PictureLayerTiling;
205 }; 207 };
206 208
207 void Reset(); 209 void Reset();
208 210
209 bool ComputeTilePriorityRects(const gfx::Rect& viewport_in_layer_space, 211 bool ComputeTilePriorityRects(const gfx::Rect& viewport_in_layer_space,
210 float ideal_contents_scale, 212 float ideal_contents_scale,
211 double current_frame_time_in_seconds, 213 double current_frame_time_in_seconds,
212 const Occlusion& occlusion_in_layer_space); 214 const Occlusion& occlusion_in_layer_space);
213 215
214 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; 216 void GetAllTilesAndPrioritiesForTracing(
217 std::map<const Tile*, TilePriority>* tile_map) const;
215 void AsValueInto(base::trace_event::TracedValue* array) const; 218 void AsValueInto(base::trace_event::TracedValue* array) const;
216 size_t GPUMemoryUsageInBytes() const; 219 size_t GPUMemoryUsageInBytes() const;
217 220
218 struct RectExpansionCache { 221 struct RectExpansionCache {
219 RectExpansionCache(); 222 RectExpansionCache();
220 223
221 gfx::Rect previous_start; 224 gfx::Rect previous_start;
222 gfx::Rect previous_bounds; 225 gfx::Rect previous_bounds;
223 gfx::Rect previous_result; 226 gfx::Rect previous_result;
224 int64 previous_target; 227 int64 previous_target;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 340
338 private: 341 private:
339 DISALLOW_ASSIGN(PictureLayerTiling); 342 DISALLOW_ASSIGN(PictureLayerTiling);
340 343
341 RectExpansionCache expansion_cache_; 344 RectExpansionCache expansion_cache_;
342 }; 345 };
343 346
344 } // namespace cc 347 } // namespace cc
345 348
346 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 349 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698