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 <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 PictureLayerImpl::~PictureLayerImpl() { | 82 PictureLayerImpl::~PictureLayerImpl() { |
83 layer_tree_impl()->UnregisterPictureLayerImpl(this); | 83 layer_tree_impl()->UnregisterPictureLayerImpl(this); |
84 } | 84 } |
85 | 85 |
86 const char* PictureLayerImpl::LayerTypeAsString() const { | 86 const char* PictureLayerImpl::LayerTypeAsString() const { |
87 return "cc::PictureLayerImpl"; | 87 return "cc::PictureLayerImpl"; |
88 } | 88 } |
89 | 89 |
90 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( | 90 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( |
91 LayerTreeImpl* tree_impl) { | 91 LayerTreeImpl* tree_impl) { |
92 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); | 92 return PictureLayerImpl::Create(tree_impl, id()); |
93 } | 93 } |
94 | 94 |
95 void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) { | 95 void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) { |
96 // It's possible this layer was never drawn or updated (e.g. because it was | 96 // It's possible this layer was never drawn or updated (e.g. because it was |
97 // a descendant of an opacity 0 layer). | 97 // a descendant of an opacity 0 layer). |
98 DoPostCommitInitializationIfNeeded(); | 98 DoPostCommitInitializationIfNeeded(); |
99 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); | 99 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); |
100 | 100 |
101 // We have already synced the important bits from the the active layer, and | 101 // We have already synced the important bits from the the active layer, and |
102 // we will soon swap out its tilings and use them for recycling. However, | 102 // we will soon swap out its tilings and use them for recycling. However, |
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1787 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
1788 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1788 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
1789 return tiling_range.end - 1 - current_tiling_range_offset; | 1789 return tiling_range.end - 1 - current_tiling_range_offset; |
1790 } | 1790 } |
1791 } | 1791 } |
1792 NOTREACHED(); | 1792 NOTREACHED(); |
1793 return 0; | 1793 return 0; |
1794 } | 1794 } |
1795 | 1795 |
1796 } // namespace cc | 1796 } // namespace cc |
OLD | NEW |