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

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

Issue 682843005: cc: Consider visible rect for update tile priority early out. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171
Patch Set: Created 6 years, 1 month 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 <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // also updates the pile on each tile to be the current client's pile. 247 // also updates the pile on each tile to be the current client's pile.
248 void DidBecomeActive(); 248 void DidBecomeActive();
249 249
250 // Resets the active priority for all tiles in a tiling, when an active 250 // Resets the active priority for all tiles in a tiling, when an active
251 // tiling is becoming recycled. This may include some tiles which are 251 // tiling is becoming recycled. This may include some tiles which are
252 // not in the the pending tiling (due to invalidations). This must 252 // not in the the pending tiling (due to invalidations). This must
253 // be called before DidBecomeActive, as it resets the active priority 253 // be called before DidBecomeActive, as it resets the active priority
254 // while DidBecomeActive promotes pending priority on a similar set of tiles. 254 // while DidBecomeActive promotes pending priority on a similar set of tiles.
255 void DidBecomeRecycled(); 255 void DidBecomeRecycled();
256 256
257 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) { 257 bool NeedsUpdateForFrameAtTimeAndViewport(
258 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; 258 double frame_time_in_seconds,
259 const gfx::Rect& viewport_in_layer_space) {
260 return frame_time_in_seconds != last_impl_frame_time_in_seconds_ ||
261 viewport_in_layer_space != last_viewport_in_layer_space_;
259 } 262 }
260 263
261 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; 264 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
262 void AsValueInto(base::debug::TracedValue* array) const; 265 void AsValueInto(base::debug::TracedValue* array) const;
263 size_t GPUMemoryUsageInBytes() const; 266 size_t GPUMemoryUsageInBytes() const;
264 267
265 struct RectExpansionCache { 268 struct RectExpansionCache {
266 RectExpansionCache(); 269 RectExpansionCache();
267 270
268 gfx::Rect previous_start; 271 gfx::Rect previous_start;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 TileResolution resolution_; 325 TileResolution resolution_;
323 PictureLayerTilingClient* client_; 326 PictureLayerTilingClient* client_;
324 327
325 // Internal data. 328 // Internal data.
326 TilingData tiling_data_; 329 TilingData tiling_data_;
327 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map. 330 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
328 gfx::Rect live_tiles_rect_; 331 gfx::Rect live_tiles_rect_;
329 332
330 // State saved for computing velocities based upon finite differences. 333 // State saved for computing velocities based upon finite differences.
331 double last_impl_frame_time_in_seconds_; 334 double last_impl_frame_time_in_seconds_;
335 gfx::Rect last_viewport_in_layer_space_;
332 gfx::Rect last_visible_rect_in_content_space_; 336 gfx::Rect last_visible_rect_in_content_space_;
333 337
334 // Iteration rects in content space 338 // Iteration rects in content space
335 gfx::Rect current_visible_rect_; 339 gfx::Rect current_visible_rect_;
336 gfx::Rect current_skewport_rect_; 340 gfx::Rect current_skewport_rect_;
337 gfx::Rect current_soon_border_rect_; 341 gfx::Rect current_soon_border_rect_;
338 gfx::Rect current_eventually_rect_; 342 gfx::Rect current_eventually_rect_;
339 343
340 bool has_visible_rect_tiles_; 344 bool has_visible_rect_tiles_;
341 bool has_skewport_rect_tiles_; 345 bool has_skewport_rect_tiles_;
(...skipping 15 matching lines...) Expand all
357 361
358 private: 362 private:
359 DISALLOW_ASSIGN(PictureLayerTiling); 363 DISALLOW_ASSIGN(PictureLayerTiling);
360 364
361 RectExpansionCache expansion_cache_; 365 RectExpansionCache expansion_cache_;
362 }; 366 };
363 367
364 } // namespace cc 368 } // namespace cc
365 369
366 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 370 #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