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

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

Issue 666273002: cc: Added raster source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set_unittest.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 #include "cc/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 if (tile_size != tiling_data_.max_texture_size()) { 244 if (tile_size != tiling_data_.max_texture_size()) {
245 tiling_data_.SetMaxTextureSize(tile_size); 245 tiling_data_.SetMaxTextureSize(tile_size);
246 // When the tile size changes, the TilingData positions no longer work 246 // When the tile size changes, the TilingData positions no longer work
247 // as valid keys to the TileMap, so just drop all tiles. 247 // as valid keys to the TileMap, so just drop all tiles.
248 Reset(); 248 Reset();
249 } else { 249 } else {
250 Invalidate(layer_invalidation); 250 Invalidate(layer_invalidation);
251 } 251 }
252 252
253 PicturePileImpl* pile = client_->GetPile(); 253 RasterSource* raster_source = client_->GetRasterSource();
254 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 254 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
255 it->second->set_picture_pile(pile); 255 it->second->set_raster_source(raster_source);
256 VerifyLiveTilesRect(); 256 VerifyLiveTilesRect();
257 } 257 }
258 258
259 void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_region) { 259 void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_region) {
260 bool recreate_invalidated_tiles = false; 260 bool recreate_invalidated_tiles = false;
261 DoInvalidate(layer_region, recreate_invalidated_tiles); 261 DoInvalidate(layer_region, recreate_invalidated_tiles);
262 } 262 }
263 263
264 void PictureLayerTiling::Invalidate(const Region& layer_region) { 264 void PictureLayerTiling::Invalidate(const Region& layer_region) {
265 bool recreate_invalidated_tiles = true; 265 bool recreate_invalidated_tiles = true;
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 DCHECK(*this); 1232 DCHECK(*this);
1233 do { 1233 do {
1234 ++current_eviction_tiles_index_; 1234 ++current_eviction_tiles_index_;
1235 } while (current_eviction_tiles_index_ != eviction_tiles_->size() && 1235 } while (current_eviction_tiles_index_ != eviction_tiles_->size() &&
1236 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources()); 1236 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources());
1237 1237
1238 return *this; 1238 return *this;
1239 } 1239 }
1240 1240
1241 } // namespace cc 1241 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698