OLD | NEW |
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) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 return; | 44 return; |
45 layer_bounds_ = layer_bounds; | 45 layer_bounds_ = layer_bounds; |
46 for (size_t i = 0; i < tilings_.size(); ++i) | 46 for (size_t i = 0; i < tilings_.size(); ++i) |
47 tilings_[i]->SetLayerBounds(layer_bounds); | 47 tilings_[i]->SetLayerBounds(layer_bounds); |
48 } | 48 } |
49 | 49 |
50 gfx::Size PictureLayerTilingSet::LayerBounds() const { | 50 gfx::Size PictureLayerTilingSet::LayerBounds() const { |
51 return layer_bounds_; | 51 return layer_bounds_; |
52 } | 52 } |
53 | 53 |
54 void PictureLayerTilingSet::Invalidate(const Region& invalidation) { | |
55 if (invalidation.IsEmpty()) | |
56 return; | |
57 | |
58 for (size_t i = 0; i < tilings_.size(); ++i) | |
59 tilings_[i]->Invalidate(invalidation); | |
60 } | |
61 | |
62 const PictureLayerTiling* PictureLayerTilingSet::AddTiling( | 54 const PictureLayerTiling* PictureLayerTilingSet::AddTiling( |
63 float contents_scale, | 55 float contents_scale, |
64 gfx::Size tile_size) { | 56 gfx::Size tile_size) { |
65 tilings_.append(PictureLayerTiling::Create(contents_scale, tile_size)); | 57 tilings_.append(PictureLayerTiling::Create(contents_scale, tile_size)); |
66 tilings_.last()->SetClient(client_); | 58 tilings_.last()->SetClient(client_); |
67 tilings_.last()->SetLayerBounds(layer_bounds_); | 59 tilings_.last()->SetLayerBounds(layer_bounds_); |
68 return tilings_.last(); | 60 return tilings_.last(); |
69 } | 61 } |
70 | 62 |
71 void PictureLayerTilingSet::Reset() { | 63 void PictureLayerTilingSet::Reset() { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 device_viewport, | 188 device_viewport, |
197 layer_content_scale_x, | 189 layer_content_scale_x, |
198 layer_content_scale_y, | 190 layer_content_scale_y, |
199 last_screen_transform, | 191 last_screen_transform, |
200 current_screen_transform, | 192 current_screen_transform, |
201 time_delta); | 193 time_delta); |
202 } | 194 } |
203 } | 195 } |
204 | 196 |
205 } // namespace cc | 197 } // namespace cc |
OLD | NEW |