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

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

Issue 235753002: cc: Give TilingData a Rect instead of a Size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Git cl format Created 6 years, 8 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.cc ('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_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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // These two calls must come before updating the pile, because they may 71 // These two calls must come before updating the pile, because they may
72 // destroy tiles that the new pile cannot raster. 72 // destroy tiles that the new pile cannot raster.
73 this_tiling->SetLayerBounds(new_layer_bounds); 73 this_tiling->SetLayerBounds(new_layer_bounds);
74 this_tiling->Invalidate(layer_invalidation); 74 this_tiling->Invalidate(layer_invalidation);
75 75
76 this_tiling->UpdateTilesToCurrentPile(); 76 this_tiling->UpdateTilesToCurrentPile();
77 this_tiling->CreateMissingTilesInLiveTilesRect(); 77 this_tiling->CreateMissingTilesInLiveTilesRect();
78 78
79 DCHECK(this_tiling->tile_size() == 79 DCHECK(this_tiling->tile_size() ==
80 client_->CalculateTileSize(this_tiling->ContentRect().size())); 80 client_->CalculateTileSize(this_tiling->TilingRect().size()));
81 continue; 81 continue;
82 } 82 }
83 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create( 83 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create(
84 contents_scale, 84 contents_scale,
85 new_layer_bounds, 85 new_layer_bounds,
86 client_); 86 client_);
87 new_tiling->set_resolution(other.tilings_[i]->resolution()); 87 new_tiling->set_resolution(other.tilings_[i]->resolution());
88 tilings_.push_back(new_tiling.Pass()); 88 tilings_.push_back(new_tiling.Pass());
89 } 89 }
90 tilings_.sort(LargestToSmallestScaleFunctor()); 90 tilings_.sort(LargestToSmallestScaleFunctor());
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 344 }
345 345
346 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { 346 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const {
347 size_t amount = 0; 347 size_t amount = 0;
348 for (size_t i = 0; i < tilings_.size(); ++i) 348 for (size_t i = 0; i < tilings_.size(); ++i)
349 amount += tilings_[i]->GPUMemoryUsageInBytes(); 349 amount += tilings_[i]->GPUMemoryUsageInBytes();
350 return amount; 350 return amount;
351 } 351 }
352 352
353 } // namespace cc 353 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_layer_tiling_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698