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

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

Issue 397303003: cc: Remove invalidated recycle tree tiles on activation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | no next file » | 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_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 PictureLayerTilingSet::~PictureLayerTilingSet() { 30 PictureLayerTilingSet::~PictureLayerTilingSet() {
31 } 31 }
32 32
33 void PictureLayerTilingSet::SetClient(PictureLayerTilingClient* client) { 33 void PictureLayerTilingSet::SetClient(PictureLayerTilingClient* client) {
34 client_ = client; 34 client_ = client;
35 for (size_t i = 0; i < tilings_.size(); ++i) 35 for (size_t i = 0; i < tilings_.size(); ++i)
36 tilings_[i]->SetClient(client_); 36 tilings_[i]->SetClient(client_);
37 } 37 }
38 38
39 void PictureLayerTilingSet::RemoveTilesInRegion(const Region& region) {
40 for (size_t i = 0; i < tilings_.size(); ++i)
41 tilings_[i]->RemoveTilesInRegion(region);
42 }
43
39 bool PictureLayerTilingSet::SyncTilings(const PictureLayerTilingSet& other, 44 bool PictureLayerTilingSet::SyncTilings(const PictureLayerTilingSet& other,
40 const gfx::Size& new_layer_bounds, 45 const gfx::Size& new_layer_bounds,
41 const Region& layer_invalidation, 46 const Region& layer_invalidation,
42 float minimum_contents_scale) { 47 float minimum_contents_scale) {
43 if (new_layer_bounds.IsEmpty()) { 48 if (new_layer_bounds.IsEmpty()) {
44 RemoveAllTilings(); 49 RemoveAllTilings();
45 layer_bounds_ = new_layer_bounds; 50 layer_bounds_ = new_layer_bounds;
46 return false; 51 return false;
47 } 52 }
48 53
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 325 }
321 326
322 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { 327 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const {
323 size_t amount = 0; 328 size_t amount = 0;
324 for (size_t i = 0; i < tilings_.size(); ++i) 329 for (size_t i = 0; i < tilings_.size(); ++i)
325 amount += tilings_[i]->GPUMemoryUsageInBytes(); 330 amount += tilings_[i]->GPUMemoryUsageInBytes();
326 return amount; 331 return amount;
327 } 332 }
328 333
329 } // namespace cc 334 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698