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

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

Issue 667053003: cc: Consider visible rect for update tile priority early out. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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 <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 }; 255 };
256 256
257 void Reset(); 257 void Reset();
258 258
259 void ComputeTilePriorityRects(WhichTree tree, 259 void ComputeTilePriorityRects(WhichTree tree,
260 const gfx::Rect& viewport_in_layer_space, 260 const gfx::Rect& viewport_in_layer_space,
261 float ideal_contents_scale, 261 float ideal_contents_scale,
262 double current_frame_time_in_seconds, 262 double current_frame_time_in_seconds,
263 const Occlusion& occlusion_in_layer_space); 263 const Occlusion& occlusion_in_layer_space);
264 264
265 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) { 265 bool NeedsUpdateForFrameAtTimeAndViewport(
266 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; 266 double frame_time_in_seconds,
267 const gfx::Rect& viewport_in_layer_space) {
268 return frame_time_in_seconds != last_impl_frame_time_in_seconds_ ||
269 viewport_in_layer_space != last_viewport_in_layer_space_;
267 } 270 }
268 271
269 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; 272 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
270 void AsValueInto(base::debug::TracedValue* array) const; 273 void AsValueInto(base::debug::TracedValue* array) const;
271 size_t GPUMemoryUsageInBytes() const; 274 size_t GPUMemoryUsageInBytes() const;
272 275
273 struct RectExpansionCache { 276 struct RectExpansionCache {
274 RectExpansionCache(); 277 RectExpansionCache();
275 278
276 gfx::Rect previous_start; 279 gfx::Rect previous_start;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 TileResolution resolution_; 336 TileResolution resolution_;
334 PictureLayerTilingClient* client_; 337 PictureLayerTilingClient* client_;
335 338
336 // Internal data. 339 // Internal data.
337 TilingData tiling_data_; 340 TilingData tiling_data_;
338 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map. 341 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
339 gfx::Rect live_tiles_rect_; 342 gfx::Rect live_tiles_rect_;
340 343
341 // State saved for computing velocities based upon finite differences. 344 // State saved for computing velocities based upon finite differences.
342 double last_impl_frame_time_in_seconds_; 345 double last_impl_frame_time_in_seconds_;
346 gfx::Rect last_viewport_in_layer_space_;
343 gfx::Rect last_visible_rect_in_content_space_; 347 gfx::Rect last_visible_rect_in_content_space_;
344 float content_to_screen_scale_; 348 float content_to_screen_scale_;
345 349
346 bool can_require_tiles_for_activation_; 350 bool can_require_tiles_for_activation_;
347 351
348 // Iteration rects in content space 352 // Iteration rects in content space
349 gfx::Rect current_visible_rect_; 353 gfx::Rect current_visible_rect_;
350 gfx::Rect current_skewport_rect_; 354 gfx::Rect current_skewport_rect_;
351 gfx::Rect current_soon_border_rect_; 355 gfx::Rect current_soon_border_rect_;
352 gfx::Rect current_eventually_rect_; 356 gfx::Rect current_eventually_rect_;
(...skipping 20 matching lines...) Expand all
373 377
374 private: 378 private:
375 DISALLOW_ASSIGN(PictureLayerTiling); 379 DISALLOW_ASSIGN(PictureLayerTiling);
376 380
377 RectExpansionCache expansion_cache_; 381 RectExpansionCache expansion_cache_;
378 }; 382 };
379 383
380 } // namespace cc 384 } // namespace cc
381 385
382 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 386 #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