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

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

Issue 2317913002: cc: Change preraster/predecode split to be half of max skewport extent. (Closed)
Patch Set: compile fix Created 4 years, 3 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/test/fake_tile_manager.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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 }; 77 };
78 78
79 class CC_EXPORT PictureLayerTiling { 79 class CC_EXPORT PictureLayerTiling {
80 public: 80 public:
81 static const int kBorderTexels = 1; 81 static const int kBorderTexels = 1;
82 82
83 PictureLayerTiling(WhichTree tree, 83 PictureLayerTiling(WhichTree tree,
84 float contents_scale, 84 float contents_scale,
85 scoped_refptr<RasterSource> raster_source, 85 scoped_refptr<RasterSource> raster_source,
86 PictureLayerTilingClient* client); 86 PictureLayerTilingClient* client,
87 float min_preraster_distance,
88 float max_preraster_distance);
87 ~PictureLayerTiling(); 89 ~PictureLayerTiling();
88 90
89 PictureLayerTilingClient* client() const { return client_; } 91 PictureLayerTilingClient* client() const { return client_; }
90 92
91 void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source); 93 void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source);
92 void Invalidate(const Region& layer_invalidation); 94 void Invalidate(const Region& layer_invalidation);
93 void CreateMissingTilesInLiveTilesRect(); 95 void CreateMissingTilesInLiveTilesRect();
94 void TakeTilesAndPropertiesFrom(PictureLayerTiling* pending_twin, 96 void TakeTilesAndPropertiesFrom(PictureLayerTiling* pending_twin,
95 const Region& layer_invalidation); 97 const Region& layer_invalidation);
96 98
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 const gfx::Rect& current_eventually_rect() const { 319 const gfx::Rect& current_eventually_rect() const {
318 return current_eventually_rect_; 320 return current_eventually_rect_;
319 } 321 }
320 void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles); 322 void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles);
321 323
322 // Given properties. 324 // Given properties.
323 const float contents_scale_; 325 const float contents_scale_;
324 PictureLayerTilingClient* const client_; 326 PictureLayerTilingClient* const client_;
325 const WhichTree tree_; 327 const WhichTree tree_;
326 scoped_refptr<RasterSource> raster_source_; 328 scoped_refptr<RasterSource> raster_source_;
329 const float min_preraster_distance_;
330 const float max_preraster_distance_;
327 TileResolution resolution_; 331 TileResolution resolution_;
328 bool may_contain_low_resolution_tiles_; 332 bool may_contain_low_resolution_tiles_;
329 333
330 // Internal data. 334 // Internal data.
331 TilingData tiling_data_; 335 TilingData tiling_data_;
332 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map. 336 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
333 gfx::Rect live_tiles_rect_; 337 gfx::Rect live_tiles_rect_;
334 338
335 bool can_require_tiles_for_activation_; 339 bool can_require_tiles_for_activation_;
336 340
337 // Iteration rects in content space. 341 // Iteration rects in content space.
338 gfx::Rect current_visible_rect_; 342 gfx::Rect current_visible_rect_;
339 gfx::Rect current_skewport_rect_; 343 gfx::Rect current_skewport_rect_;
340 gfx::Rect current_soon_border_rect_; 344 gfx::Rect current_soon_border_rect_;
341 gfx::Rect current_eventually_rect_; 345 gfx::Rect current_eventually_rect_;
342 // Other properties used for tile iteration and prioritization. 346 // Other properties used for tile iteration and prioritization.
343 float current_content_to_screen_scale_; 347 float current_content_to_screen_scale_;
344 Occlusion current_occlusion_in_layer_space_; 348 Occlusion current_occlusion_in_layer_space_;
349 float max_skewport_extent_in_screen_space_;
345 350
346 bool has_visible_rect_tiles_; 351 bool has_visible_rect_tiles_;
347 bool has_skewport_rect_tiles_; 352 bool has_skewport_rect_tiles_;
348 bool has_soon_border_rect_tiles_; 353 bool has_soon_border_rect_tiles_;
349 bool has_eventually_rect_tiles_; 354 bool has_eventually_rect_tiles_;
350 bool all_tiles_done_; 355 bool all_tiles_done_;
351 356
352 private: 357 private:
353 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling); 358 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling);
354 }; 359 };
355 360
356 } // namespace cc 361 } // namespace cc
357 362
358 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ 363 #endif // CC_TILES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/test/fake_tile_manager.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698