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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 bool first_time = current_tiling_ < 0; | 105 bool first_time = current_tiling_ < 0; |
106 | 106 |
107 if (!*this && !first_time) | 107 if (!*this && !first_time) |
108 return *this; | 108 return *this; |
109 | 109 |
110 if (tiling_iter_) | 110 if (tiling_iter_) |
111 ++tiling_iter_; | 111 ++tiling_iter_; |
112 | 112 |
113 // Loop until we find a valid place to stop. | 113 // Loop until we find a valid place to stop. |
114 while (true) { | 114 while (true) { |
115 while (tiling_iter_ && !tiling_iter_->GetResourceId()) { | 115 while (tiling_iter_ && (!*tiling_iter_ || !tiling_iter_->GetResourceId())) { |
116 missing_region_.Union(tiling_iter_.geometry_rect()); | 116 missing_region_.Union(tiling_iter_.geometry_rect()); |
117 ++tiling_iter_; | 117 ++tiling_iter_; |
118 } | 118 } |
119 if (tiling_iter_) | 119 if (tiling_iter_) |
120 return *this; | 120 return *this; |
121 | 121 |
122 // If the set of current rects for this tiling is done, go to the next | 122 // If the set of current rects for this tiling is done, go to the next |
123 // tiling and set up to iterate through all of the remaining holes. | 123 // tiling and set up to iterate through all of the remaining holes. |
124 // This will also happen the first time through the loop. | 124 // This will also happen the first time through the loop. |
125 if (!region_iter_.has_rect()) { | 125 if (!region_iter_.has_rect()) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 const gfx::Transform& current_screen_transform, | 172 const gfx::Transform& current_screen_transform, |
173 double time_delta) { | 173 double time_delta) { |
174 for (size_t i = 0; i < tilings_.size(); ++i) { | 174 for (size_t i = 0; i < tilings_.size(); ++i) { |
175 tilings_[i]->UpdateTilePriorities( | 175 tilings_[i]->UpdateTilePriorities( |
176 device_viewport, layer_content_scale_x, layer_content_scale_y, | 176 device_viewport, layer_content_scale_x, layer_content_scale_y, |
177 last_screen_transform, current_screen_transform, time_delta); | 177 last_screen_transform, current_screen_transform, time_delta); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 } // namespace cc | 181 } // namespace cc |
OLD | NEW |