Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 508 // - This layer produced a high-res or non-ideal-res tile last frame. | 508 // - This layer produced a high-res or non-ideal-res tile last frame. |
| 509 // - We're in requires high res to draw mode. | 509 // - We're in requires high res to draw mode. |
| 510 // - We're not in smoothness takes priority mode. | 510 // - We're not in smoothness takes priority mode. |
| 511 // To put different, the tiling set can't require tiles for activation if | 511 // To put different, the tiling set can't require tiles for activation if |
| 512 // we're in smoothness mode and only used low-res or checkerboard to draw last | 512 // we're in smoothness mode and only used low-res or checkerboard to draw last |
| 513 // frame and we don't need high res to draw. | 513 // frame and we don't need high res to draw. |
| 514 // | 514 // |
| 515 // The reason for this is that we should be able to activate sooner and get a | 515 // The reason for this is that we should be able to activate sooner and get a |
| 516 // more up to date recording, so we don't run out of recording on the active | 516 // more up to date recording, so we don't run out of recording on the active |
| 517 // tree. | 517 // tree. |
| 518 bool can_require_tiles_for_activation = | 518 // A layer must be a drawing layer for it to require tiles for activation. |
| 519 bool can_require_tiles_for_activation = contributes_to_drawn_render_surface(); | |
|
Khushal
2017/05/24 21:57:06
Should this be done for requiring tiles for draw a
| |
| 520 can_require_tiles_for_activation &= | |
| 519 !only_used_low_res_last_append_quads_ || RequiresHighResToDraw() || | 521 !only_used_low_res_last_append_quads_ || RequiresHighResToDraw() || |
| 520 !layer_tree_impl()->SmoothnessTakesPriority(); | 522 !layer_tree_impl()->SmoothnessTakesPriority(); |
| 521 | 523 |
| 522 static const Occlusion kEmptyOcclusion; | 524 static const Occlusion kEmptyOcclusion; |
| 523 const Occlusion& occlusion_in_content_space = | 525 const Occlusion& occlusion_in_content_space = |
| 524 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization | 526 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization |
| 525 ? draw_properties().occlusion_in_content_space | 527 ? draw_properties().occlusion_in_content_space |
| 526 : kEmptyOcclusion; | 528 : kEmptyOcclusion; |
| 527 | 529 |
| 528 // Pass |occlusion_in_content_space| for |occlusion_in_layer_space| since | 530 // Pass |occlusion_in_content_space| for |occlusion_in_layer_space| since |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1479 } | 1481 } |
| 1480 | 1482 |
| 1481 invalidation_.Union(invalidation); | 1483 invalidation_.Union(invalidation); |
| 1482 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); | 1484 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); |
| 1483 SetNeedsPushProperties(); | 1485 SetNeedsPushProperties(); |
| 1484 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", | 1486 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", |
| 1485 "Invalidation", invalidation.ToString()); | 1487 "Invalidation", invalidation.ToString()); |
| 1486 } | 1488 } |
| 1487 | 1489 |
| 1488 } // namespace cc | 1490 } // namespace cc |
| OLD | NEW |