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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 color, | 344 color, |
345 false); | 345 false); |
346 } | 346 } |
347 | 347 |
348 if (geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { | 348 if (geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { |
349 append_quads_data->num_missing_tiles++; | 349 append_quads_data->num_missing_tiles++; |
350 ++missing_tile_count; | 350 ++missing_tile_count; |
351 } | 351 } |
352 append_quads_data->approximated_visible_content_area += | 352 append_quads_data->approximated_visible_content_area += |
353 visible_geometry_rect.width() * visible_geometry_rect.height(); | 353 visible_geometry_rect.width() * visible_geometry_rect.height(); |
| 354 append_quads_data->checkerboarded_visible_content_area += |
| 355 visible_geometry_rect.width() * visible_geometry_rect.height(); |
354 continue; | 356 continue; |
355 } | 357 } |
356 | 358 |
357 if (iter.resolution() != HIGH_RESOLUTION) { | 359 if (iter.resolution() != HIGH_RESOLUTION) { |
358 append_quads_data->approximated_visible_content_area += | 360 append_quads_data->approximated_visible_content_area += |
359 visible_geometry_rect.width() * visible_geometry_rect.height(); | 361 visible_geometry_rect.width() * visible_geometry_rect.height(); |
360 } | 362 } |
361 | 363 |
362 // If we have a draw quad, but it's not low resolution, then | 364 // If we have a draw quad, but it's not low resolution, then |
363 // mark that we've used something other than low res to draw. | 365 // mark that we've used something other than low res to draw. |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 | 1235 |
1234 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1236 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1235 return !layer_tree_impl()->IsRecycleTree(); | 1237 return !layer_tree_impl()->IsRecycleTree(); |
1236 } | 1238 } |
1237 | 1239 |
1238 bool PictureLayerImpl::HasValidTilePriorities() const { | 1240 bool PictureLayerImpl::HasValidTilePriorities() const { |
1239 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1241 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
1240 } | 1242 } |
1241 | 1243 |
1242 } // namespace cc | 1244 } // namespace cc |
OLD | NEW |