OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 815 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
816 | 816 |
817 size_t Layer::GetApproximateUnsharedMemoryUsage() const { | 817 size_t Layer::GetApproximateUnsharedMemoryUsage() const { |
818 // Most of the "picture memory" is shared with the cc::DisplayItemList, so | 818 // Most of the "picture memory" is shared with the cc::DisplayItemList, so |
819 // there's nothing significant to report here. | 819 // there's nothing significant to report here. |
820 return 0; | 820 return 0; |
821 } | 821 } |
822 | 822 |
823 bool Layer::PrepareTextureMailbox( | 823 bool Layer::PrepareTextureMailbox( |
824 cc::TextureMailbox* mailbox, | 824 cc::TextureMailbox* mailbox, |
825 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, | 825 std::unique_ptr<cc::SingleReleaseCallback>* release_callback) { |
826 bool use_shared_memory) { | |
827 if (!mailbox_release_callback_) | 826 if (!mailbox_release_callback_) |
828 return false; | 827 return false; |
829 *mailbox = mailbox_; | 828 *mailbox = mailbox_; |
830 *release_callback = std::move(mailbox_release_callback_); | 829 *release_callback = std::move(mailbox_release_callback_); |
831 return true; | 830 return true; |
832 } | 831 } |
833 | 832 |
834 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { | 833 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { |
835 public: | 834 public: |
836 explicit LayerDebugInfo(const std::string& name) : name_(name) {} | 835 explicit LayerDebugInfo(const std::string& name) : name_(name) {} |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 if (animator_) { | 1094 if (animator_) { |
1096 animator_->ResetCompositor(compositor); | 1095 animator_->ResetCompositor(compositor); |
1097 animator_->RemoveFromCollection(collection); | 1096 animator_->RemoveFromCollection(collection); |
1098 } | 1097 } |
1099 | 1098 |
1100 for (auto* child : children_) | 1099 for (auto* child : children_) |
1101 child->ResetCompositorForAnimatorsInTree(compositor); | 1100 child->ResetCompositorForAnimatorsInTree(compositor); |
1102 } | 1101 } |
1103 | 1102 |
1104 } // namespace ui | 1103 } // namespace ui |
OLD | NEW |