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

Side by Side Diff: cc/picture_layer_tiling_set.cc

Issue 11516022: cc: Resize picture layer tiling set during commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/picture_layer_impl.cc ('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/picture_layer_tiling_set.h" 5 #include "cc/picture_layer_tiling_set.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 PictureLayerTilingSet::PictureLayerTilingSet( 9 PictureLayerTilingSet::PictureLayerTilingSet(
10 PictureLayerTilingClient * client) 10 PictureLayerTilingClient * client)
11 : client_(client) { 11 : client_(client) {
12 } 12 }
13 13
14 PictureLayerTilingSet::~PictureLayerTilingSet() { 14 PictureLayerTilingSet::~PictureLayerTilingSet() {
15 } 15 }
16 16
17 void PictureLayerTilingSet::CloneFrom(const PictureLayerTilingSet& other) { 17 void PictureLayerTilingSet::CloneFrom(const PictureLayerTilingSet& other) {
18 layer_bounds_ = other.layer_bounds_; 18 layer_bounds_ = other.layer_bounds_;
19 tilings_.clear(); 19 tilings_.clear();
20 tilings_.reserve(other.tilings_.size()); 20 tilings_.reserve(other.tilings_.size());
21 for (size_t i = 0; i < other.tilings_.size(); ++i) { 21 for (size_t i = 0; i < other.tilings_.size(); ++i) {
22 tilings_.append(other.tilings_[i]->Clone()); 22 tilings_.append(other.tilings_[i]->Clone());
23 } 23 }
24 } 24 }
25 25
26 void PictureLayerTilingSet::SetLayerBounds(gfx::Size layer_bounds) { 26 void PictureLayerTilingSet::SetLayerBounds(gfx::Size layer_bounds) {
27 if (layer_bounds_ == layer_bounds)
28 return;
27 layer_bounds_ = layer_bounds; 29 layer_bounds_ = layer_bounds;
28 for (size_t i = 0; i < tilings_.size(); ++i) 30 for (size_t i = 0; i < tilings_.size(); ++i)
29 tilings_[i]->SetLayerBounds(layer_bounds); 31 tilings_[i]->SetLayerBounds(layer_bounds);
30 } 32 }
31 33
32 gfx::Size PictureLayerTilingSet::LayerBounds() const { 34 gfx::Size PictureLayerTilingSet::LayerBounds() const {
33 return layer_bounds_; 35 return layer_bounds_;
34 } 36 }
35 37
36 void PictureLayerTilingSet::Invalidate(const Region& invalidation) { 38 void PictureLayerTilingSet::Invalidate(const Region& invalidation) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const gfx::Transform& current_screen_transform, 172 const gfx::Transform& current_screen_transform,
171 double time_delta) { 173 double time_delta) {
172 for (size_t i = 0; i < tilings_.size(); ++i) { 174 for (size_t i = 0; i < tilings_.size(); ++i) {
173 tilings_[i]->UpdateTilePriorities( 175 tilings_[i]->UpdateTilePriorities(
174 device_viewport, layer_content_scale_x, layer_content_scale_y, 176 device_viewport, layer_content_scale_x, layer_content_scale_y,
175 last_screen_transform, current_screen_transform, time_delta); 177 last_screen_transform, current_screen_transform, time_delta);
176 } 178 }
177 } 179 }
178 180
179 } // namespace cc 181 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698