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

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

Issue 1274693004: cc: Declare high res tilings to not have low res content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: waseverlowres: . Created 5 years, 4 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
112 bool IsTileRequiredForDraw(const Tile* tile) const; 112 bool IsTileRequiredForDraw(const Tile* tile) const;
113 113
114 void set_resolution(TileResolution resolution) { 114 void set_resolution(TileResolution resolution) {
115 resolution_ = resolution; 115 resolution_ = resolution;
116 was_ever_low_resolution_ |= resolution == LOW_RESOLUTION; 116 may_contain_low_resolution_tiles_ |= resolution == LOW_RESOLUTION;
117 } 117 }
118 TileResolution resolution() const { return resolution_; } 118 TileResolution resolution() const { return resolution_; }
119 bool was_ever_low_resolution() const { return was_ever_low_resolution_; } 119 bool may_contain_low_resolution_tiles() const {
120 return may_contain_low_resolution_tiles_;
121 }
122 void reset_may_contain_low_resolution_tiles() {
123 may_contain_low_resolution_tiles_ = false;
124 }
120 void set_can_require_tiles_for_activation(bool can_require_tiles) { 125 void set_can_require_tiles_for_activation(bool can_require_tiles) {
121 can_require_tiles_for_activation_ = can_require_tiles; 126 can_require_tiles_for_activation_ = can_require_tiles;
122 } 127 }
123 128
124 RasterSource* raster_source() const { return raster_source_.get(); } 129 RasterSource* raster_source() const { return raster_source_.get(); }
125 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); } 130 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); }
126 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } 131 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; }
127 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); } 132 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); }
128 float contents_scale() const { return contents_scale_; } 133 float contents_scale() const { return contents_scale_; }
129 const TilingData* tiling_data() const { return &tiling_data_; } 134 const TilingData* tiling_data() const { return &tiling_data_; }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 const size_t tiling_interest_area_padding_; 371 const size_t tiling_interest_area_padding_;
367 const float skewport_target_time_in_seconds_; 372 const float skewport_target_time_in_seconds_;
368 const int skewport_extrapolation_limit_in_content_pixels_; 373 const int skewport_extrapolation_limit_in_content_pixels_;
369 374
370 // Given properties. 375 // Given properties.
371 const float contents_scale_; 376 const float contents_scale_;
372 PictureLayerTilingClient* const client_; 377 PictureLayerTilingClient* const client_;
373 const WhichTree tree_; 378 const WhichTree tree_;
374 scoped_refptr<RasterSource> raster_source_; 379 scoped_refptr<RasterSource> raster_source_;
375 TileResolution resolution_; 380 TileResolution resolution_;
376 bool was_ever_low_resolution_; 381 bool may_contain_low_resolution_tiles_;
377 382
378 // Internal data. 383 // Internal data.
379 TilingData tiling_data_; 384 TilingData tiling_data_;
380 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map. 385 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
381 gfx::Rect live_tiles_rect_; 386 gfx::Rect live_tiles_rect_;
382 387
383 gfx::Rect last_viewport_in_layer_space_; 388 gfx::Rect last_viewport_in_layer_space_;
384 // State saved for computing velocities based upon finite differences. 389 // State saved for computing velocities based upon finite differences.
385 FrameVisibleRect visible_rect_history_[2]; 390 FrameVisibleRect visible_rect_history_[2];
386 391
(...skipping 14 matching lines...) Expand all
401 bool has_eventually_rect_tiles_; 406 bool has_eventually_rect_tiles_;
402 bool all_tiles_done_; 407 bool all_tiles_done_;
403 408
404 private: 409 private:
405 DISALLOW_ASSIGN(PictureLayerTiling); 410 DISALLOW_ASSIGN(PictureLayerTiling);
406 }; 411 };
407 412
408 } // namespace cc 413 } // namespace cc
409 414
410 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ 415 #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