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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 // the best the layer can promise in the future, consider those as | 298 // the best the layer can promise in the future, consider those as |
299 // complete. But if a tile is ideal scale, we don't want to consider | 299 // complete. But if a tile is ideal scale, we don't want to consider |
300 // it incomplete and trying to replace it with a tile at a worse | 300 // it incomplete and trying to replace it with a tile at a worse |
301 // scale. | 301 // scale. |
302 if (iter->contents_scale() != raster_contents_scale_ && | 302 if (iter->contents_scale() != raster_contents_scale_ && |
303 iter->contents_scale() != ideal_contents_scale_ && | 303 iter->contents_scale() != ideal_contents_scale_ && |
304 geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { | 304 geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { |
305 append_quads_data->num_incomplete_tiles++; | 305 append_quads_data->num_incomplete_tiles++; |
306 } | 306 } |
307 | 307 |
| 308 // TODO(danakj): crbug.com/455931 |
| 309 layer_tree_impl()->resource_provider()->ValidateResource( |
| 310 draw_info.resource_id()); |
308 TileDrawQuad* quad = | 311 TileDrawQuad* quad = |
309 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); | 312 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); |
310 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect, | 313 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect, |
311 visible_geometry_rect, draw_info.resource_id(), | 314 visible_geometry_rect, draw_info.resource_id(), |
312 texture_rect, draw_info.resource_size(), | 315 texture_rect, draw_info.resource_size(), |
313 draw_info.contents_swizzled(), nearest_neighbor_); | 316 draw_info.contents_swizzled(), nearest_neighbor_); |
314 has_draw_quad = true; | 317 has_draw_quad = true; |
315 break; | 318 break; |
316 } | 319 } |
317 case TileDrawInfo::SOLID_COLOR_MODE: { | 320 case TileDrawInfo::SOLID_COLOR_MODE: { |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 | 1246 |
1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1247 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1245 return !layer_tree_impl()->IsRecycleTree(); | 1248 return !layer_tree_impl()->IsRecycleTree(); |
1246 } | 1249 } |
1247 | 1250 |
1248 bool PictureLayerImpl::HasValidTilePriorities() const { | 1251 bool PictureLayerImpl::HasValidTilePriorities() const { |
1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1252 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
1250 } | 1253 } |
1251 | 1254 |
1252 } // namespace cc | 1255 } // namespace cc |
OLD | NEW |