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

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: reviews 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
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 if (tile_size != tiling_data_.max_texture_size()) { 241 if (tile_size != tiling_data_.max_texture_size()) {
242 tiling_data_.SetMaxTextureSize(tile_size); 242 tiling_data_.SetMaxTextureSize(tile_size);
243 // When the tile size changes, the TilingData positions no longer work 243 // When the tile size changes, the TilingData positions no longer work
244 // as valid keys to the TileMap, so just drop all tiles. 244 // as valid keys to the TileMap, so just drop all tiles.
245 Reset(); 245 Reset();
246 } else { 246 } else {
247 Invalidate(layer_invalidation); 247 Invalidate(layer_invalidation);
248 } 248 }
249 249
250 PicturePileImpl* pile = client_->GetPile(); 250 RasterSource* raster_source = client_->GetRasterSource();
251 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 251 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
252 it->second->set_picture_pile(pile); 252 it->second->set_raster_source(raster_source);
253 VerifyLiveTilesRect(); 253 VerifyLiveTilesRect();
254 } 254 }
255 255
256 void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_region) { 256 void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_region) {
257 bool recreate_invalidated_tiles = false; 257 bool recreate_invalidated_tiles = false;
258 DoInvalidate(layer_region, recreate_invalidated_tiles); 258 DoInvalidate(layer_region, recreate_invalidated_tiles);
259 } 259 }
260 260
261 void PictureLayerTiling::Invalidate(const Region& layer_region) { 261 void PictureLayerTiling::Invalidate(const Region& layer_region) {
262 bool recreate_invalidated_tiles = true; 262 bool recreate_invalidated_tiles = true;
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 DCHECK(*this); 1226 DCHECK(*this);
1227 do { 1227 do {
1228 ++current_eviction_tiles_index_; 1228 ++current_eviction_tiles_index_;
1229 } while (current_eviction_tiles_index_ != eviction_tiles_->size() && 1229 } while (current_eviction_tiles_index_ != eviction_tiles_->size() &&
1230 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources()); 1230 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources());
1231 1231
1232 return *this; 1232 return *this;
1233 } 1233 }
1234 1234
1235 } // namespace cc 1235 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698