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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <set> | 10 #include <set> |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 width); | 259 width); |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 // Keep track of the tilings that were used so that tilings that are | 263 // Keep track of the tilings that were used so that tilings that are |
264 // unused can be considered for removal. | 264 // unused can be considered for removal. |
265 last_append_quads_tilings_.clear(); | 265 last_append_quads_tilings_.clear(); |
266 | 266 |
267 // Ignore missing tiles outside of viewport for tile priority. This is | 267 // Ignore missing tiles outside of viewport for tile priority. This is |
268 // normally the same as draw viewport but can be independently overridden by | 268 // normally the same as draw viewport but can be independently overridden by |
269 // embedders like Android WebView with SetExternalDrawConstraints. | 269 // embedders like Android WebView with SetExternalTilePriorityConstraints. |
270 gfx::Rect scaled_viewport_for_tile_priority = gfx::ScaleToEnclosingRect( | 270 gfx::Rect scaled_viewport_for_tile_priority = gfx::ScaleToEnclosingRect( |
271 viewport_rect_for_tile_priority_in_content_space_, max_contents_scale); | 271 viewport_rect_for_tile_priority_in_content_space_, max_contents_scale); |
272 | 272 |
273 size_t missing_tile_count = 0u; | 273 size_t missing_tile_count = 0u; |
274 size_t on_demand_missing_tile_count = 0u; | 274 size_t on_demand_missing_tile_count = 0u; |
275 only_used_low_res_last_append_quads_ = true; | 275 only_used_low_res_last_append_quads_ = true; |
276 gfx::Rect scaled_recorded_viewport = gfx::ScaleToEnclosingRect( | 276 gfx::Rect scaled_recorded_viewport = gfx::ScaleToEnclosingRect( |
277 raster_source_->RecordedViewport(), max_contents_scale); | 277 raster_source_->RecordedViewport(), max_contents_scale); |
278 for (PictureLayerTilingSet::CoverageIterator iter( | 278 for (PictureLayerTilingSet::CoverageIterator iter( |
279 tilings_.get(), max_contents_scale, | 279 tilings_.get(), max_contents_scale, |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 | 1249 |
1250 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1250 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1251 return !layer_tree_impl()->IsRecycleTree(); | 1251 return !layer_tree_impl()->IsRecycleTree(); |
1252 } | 1252 } |
1253 | 1253 |
1254 bool PictureLayerImpl::HasValidTilePriorities() const { | 1254 bool PictureLayerImpl::HasValidTilePriorities() const { |
1255 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1255 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
1256 } | 1256 } |
1257 | 1257 |
1258 } // namespace cc | 1258 } // namespace cc |
OLD | NEW |