| 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 692 |
| 693 // We don't handle solid color masks, so we shouldn't bother analyzing those. | 693 // We don't handle solid color masks, so we shouldn't bother analyzing those. |
| 694 // Otherwise, always analyze to maximize memory savings. | 694 // Otherwise, always analyze to maximize memory savings. |
| 695 if (!is_mask_) | 695 if (!is_mask_) |
| 696 flags = Tile::USE_PICTURE_ANALYSIS; | 696 flags = Tile::USE_PICTURE_ANALYSIS; |
| 697 | 697 |
| 698 if (contents_opaque()) | 698 if (contents_opaque()) |
| 699 flags |= Tile::IS_OPAQUE; | 699 flags |= Tile::IS_OPAQUE; |
| 700 | 700 |
| 701 return layer_tree_impl()->tile_manager()->CreateTile( | 701 return layer_tree_impl()->tile_manager()->CreateTile( |
| 702 info, id(), layer_tree_impl()->source_frame_number(), flags); | 702 info, layer_tree_impl()->device_color_space(), id(), |
| 703 layer_tree_impl()->source_frame_number(), flags); |
| 703 } | 704 } |
| 704 | 705 |
| 705 const Region* PictureLayerImpl::GetPendingInvalidation() { | 706 const Region* PictureLayerImpl::GetPendingInvalidation() { |
| 706 if (layer_tree_impl()->IsPendingTree()) | 707 if (layer_tree_impl()->IsPendingTree()) |
| 707 return &invalidation_; | 708 return &invalidation_; |
| 708 if (layer_tree_impl()->IsRecycleTree()) | 709 if (layer_tree_impl()->IsRecycleTree()) |
| 709 return nullptr; | 710 return nullptr; |
| 710 DCHECK(layer_tree_impl()->IsActiveTree()); | 711 DCHECK(layer_tree_impl()->IsActiveTree()); |
| 711 if (PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer()) | 712 if (PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer()) |
| 712 return &twin_layer->invalidation_; | 713 return &twin_layer->invalidation_; |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1334 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1334 return !layer_tree_impl()->IsRecycleTree(); | 1335 return !layer_tree_impl()->IsRecycleTree(); |
| 1335 } | 1336 } |
| 1336 | 1337 |
| 1337 bool PictureLayerImpl::HasValidTilePriorities() const { | 1338 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1338 return IsOnActiveOrPendingTree() && | 1339 return IsOnActiveOrPendingTree() && |
| 1339 is_drawn_render_surface_layer_list_member(); | 1340 is_drawn_render_surface_layer_list_member(); |
| 1340 } | 1341 } |
| 1341 | 1342 |
| 1342 } // namespace cc | 1343 } // namespace cc |
| OLD | NEW |