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

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

Issue 1196553009: Revert "cc: Make tiling interest rect calc based on viewport." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert extra bools. Created 5 years, 6 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_unittest.cc ('k') | cc/tiles/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_TILES_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_H_
6 #define CC_TILES_PICTURE_LAYER_TILING_H_ 6 #define CC_TILES_PICTURE_LAYER_TILING_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static float CalculateSoonBorderDistance( 91 static float CalculateSoonBorderDistance(
92 const gfx::Rect& visible_rect_in_content_space, 92 const gfx::Rect& visible_rect_in_content_space,
93 float content_to_screen_scale); 93 float content_to_screen_scale);
94 94
95 // Create a tiling with no tiles. CreateTile() must be called to add some. 95 // Create a tiling with no tiles. CreateTile() must be called to add some.
96 static scoped_ptr<PictureLayerTiling> Create( 96 static scoped_ptr<PictureLayerTiling> Create(
97 WhichTree tree, 97 WhichTree tree,
98 float contents_scale, 98 float contents_scale,
99 scoped_refptr<RasterSource> raster_source, 99 scoped_refptr<RasterSource> raster_source,
100 PictureLayerTilingClient* client, 100 PictureLayerTilingClient* client,
101 float tiling_interest_area_viewport_multiplier, 101 size_t max_tiles_for_interest_area,
102 float skewport_target_time_in_seconds, 102 float skewport_target_time_in_seconds,
103 int skewport_extrapolation_limit_in_content_pixels); 103 int skewport_extrapolation_limit_in_content_pixels);
104 104
105 void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source); 105 void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source);
106 void Invalidate(const Region& layer_invalidation); 106 void Invalidate(const Region& layer_invalidation);
107 void CreateMissingTilesInLiveTilesRect(); 107 void CreateMissingTilesInLiveTilesRect();
108 void TakeTilesAndPropertiesFrom(PictureLayerTiling* pending_twin, 108 void TakeTilesAndPropertiesFrom(PictureLayerTiling* pending_twin,
109 const Region& layer_invalidation); 109 const Region& layer_invalidation);
110 110
111 bool IsTileRequiredForActivation(const Tile* tile) const; 111 bool IsTileRequiredForActivation(const Tile* tile) const;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 struct FrameVisibleRect { 281 struct FrameVisibleRect {
282 gfx::Rect visible_rect_in_content_space; 282 gfx::Rect visible_rect_in_content_space;
283 double frame_time_in_seconds = 0.0; 283 double frame_time_in_seconds = 0.0;
284 }; 284 };
285 285
286 PictureLayerTiling(WhichTree tree, 286 PictureLayerTiling(WhichTree tree,
287 float contents_scale, 287 float contents_scale,
288 scoped_refptr<RasterSource> raster_source, 288 scoped_refptr<RasterSource> raster_source,
289 PictureLayerTilingClient* client, 289 PictureLayerTilingClient* client,
290 float tiling_interest_area_viewport_multiplier, 290 size_t max_tiles_for_interest_area,
291 float skewport_target_time_in_seconds, 291 float skewport_target_time_in_seconds,
292 int skewport_extrapolation_limit_in_content_pixels); 292 int skewport_extrapolation_limit_in_content_pixels);
293 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); 293 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
294 void VerifyLiveTilesRect(bool is_on_recycle_tree) const; 294 void VerifyLiveTilesRect(bool is_on_recycle_tree) const;
295 Tile* CreateTile(int i, int j); 295 Tile* CreateTile(int i, int j);
296 ScopedTilePtr TakeTileAt(int i, int j); 296 ScopedTilePtr TakeTileAt(int i, int j);
297 // Returns true if the Tile existed and was removed from the tiling. 297 // Returns true if the Tile existed and was removed from the tiling.
298 bool RemoveTileAt(int i, int j); 298 bool RemoveTileAt(int i, int j);
299 bool TilingMatchesTileIndices(const PictureLayerTiling* twin) const; 299 bool TilingMatchesTileIndices(const PictureLayerTiling* twin) const;
300 300
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 return current_soon_border_rect_; 368 return current_soon_border_rect_;
369 } 369 }
370 const gfx::Rect& current_eventually_rect() const { 370 const gfx::Rect& current_eventually_rect() const {
371 return current_eventually_rect_; 371 return current_eventually_rect_;
372 } 372 }
373 bool has_ever_been_updated() const { 373 bool has_ever_been_updated() const {
374 return visible_rect_history_[0].frame_time_in_seconds != 0.0; 374 return visible_rect_history_[0].frame_time_in_seconds != 0.0;
375 } 375 }
376 void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles); 376 void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles);
377 377
378 const float tiling_interest_area_viewport_multiplier_; 378 const size_t max_tiles_for_interest_area_;
379 const float skewport_target_time_in_seconds_; 379 const float skewport_target_time_in_seconds_;
380 const int skewport_extrapolation_limit_in_content_pixels_; 380 const int skewport_extrapolation_limit_in_content_pixels_;
381 381
382 // Given properties. 382 // Given properties.
383 const float contents_scale_; 383 const float contents_scale_;
384 PictureLayerTilingClient* const client_; 384 PictureLayerTilingClient* const client_;
385 const WhichTree tree_; 385 const WhichTree tree_;
386 scoped_refptr<RasterSource> raster_source_; 386 scoped_refptr<RasterSource> raster_source_;
387 TileResolution resolution_; 387 TileResolution resolution_;
388 388
(...skipping 25 matching lines...) Expand all
414 414
415 private: 415 private:
416 DISALLOW_ASSIGN(PictureLayerTiling); 416 DISALLOW_ASSIGN(PictureLayerTiling);
417 417
418 RectExpansionCache expansion_cache_; 418 RectExpansionCache expansion_cache_;
419 }; 419 };
420 420
421 } // namespace cc 421 } // namespace cc
422 422
423 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ 423 #endif // CC_TILES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698