OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
10 #include "cc/animation/scrollbar_animation_controller.h" | 10 #include "cc/animation/scrollbar_animation_controller.h" |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 if (replica_layer_) | 587 if (replica_layer_) |
588 replica_layer_->set_parent(this); | 588 replica_layer_->set_parent(this); |
589 NoteLayerPropertyChangedForSubtree(); | 589 NoteLayerPropertyChangedForSubtree(); |
590 } | 590 } |
591 | 591 |
592 scoped_ptr<LayerImpl> LayerImpl::TakeReplicaLayer() { | 592 scoped_ptr<LayerImpl> LayerImpl::TakeReplicaLayer() { |
593 replica_layer_id_ = -1; | 593 replica_layer_id_ = -1; |
594 return replica_layer_.Pass(); | 594 return replica_layer_.Pass(); |
595 } | 595 } |
596 | 596 |
597 ScrollbarLayerImpl* LayerImpl::ToScrollbarLayer() { | 597 ScrollbarLayerImplBase* LayerImpl::ToScrollbarLayerBase() { |
598 return NULL; | 598 return NULL; |
599 } | 599 } |
600 | 600 |
601 void LayerImpl::SetDrawsContent(bool draws_content) { | 601 void LayerImpl::SetDrawsContent(bool draws_content) { |
602 if (draws_content_ == draws_content) | 602 if (draws_content_ == draws_content) |
603 return; | 603 return; |
604 | 604 |
605 draws_content_ = draws_content; | 605 draws_content_ = draws_content; |
606 NoteLayerPropertyChanged(); | 606 NoteLayerPropertyChanged(); |
607 } | 607 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 scrollbar_animation_controller_ = | 945 scrollbar_animation_controller_ = |
946 ScrollbarAnimationControllerLinearFade::Create( | 946 ScrollbarAnimationControllerLinearFade::Create( |
947 this, fadeout_delay, fadeout_length) | 947 this, fadeout_delay, fadeout_length) |
948 .PassAs<ScrollbarAnimationController>(); | 948 .PassAs<ScrollbarAnimationController>(); |
949 } | 949 } |
950 } else { | 950 } else { |
951 scrollbar_animation_controller_.reset(); | 951 scrollbar_animation_controller_.reset(); |
952 } | 952 } |
953 } | 953 } |
954 void LayerImpl::SetHorizontalScrollbarLayer( | 954 void LayerImpl::SetHorizontalScrollbarLayer( |
955 ScrollbarLayerImpl* scrollbar_layer) { | 955 ScrollbarLayerImplBase* scrollbar_layer) { |
956 horizontal_scrollbar_layer_ = scrollbar_layer; | 956 horizontal_scrollbar_layer_ = scrollbar_layer; |
957 if (horizontal_scrollbar_layer_) | 957 if (horizontal_scrollbar_layer_) |
958 horizontal_scrollbar_layer_->set_scroll_layer_id(id()); | 958 horizontal_scrollbar_layer_->set_scroll_layer_id(id()); |
959 } | 959 } |
960 | 960 |
961 void LayerImpl::SetVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbar_layer) { | 961 void LayerImpl::SetVerticalScrollbarLayer( |
| 962 ScrollbarLayerImplBase* scrollbar_layer) { |
962 vertical_scrollbar_layer_ = scrollbar_layer; | 963 vertical_scrollbar_layer_ = scrollbar_layer; |
963 if (vertical_scrollbar_layer_) | 964 if (vertical_scrollbar_layer_) |
964 vertical_scrollbar_layer_->set_scroll_layer_id(id()); | 965 vertical_scrollbar_layer_->set_scroll_layer_id(id()); |
965 } | 966 } |
966 | 967 |
967 static scoped_ptr<base::Value> | 968 static scoped_ptr<base::Value> |
968 CompositingReasonsAsValue(CompositingReasons reasons) { | 969 CompositingReasonsAsValue(CompositingReasons reasons) { |
969 scoped_ptr<base::ListValue> reason_list(new base::ListValue()); | 970 scoped_ptr<base::ListValue> reason_list(new base::ListValue()); |
970 | 971 |
971 if (reasons == kCompositingReasonUnknown) { | 972 if (reasons == kCompositingReasonUnknown) { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 | 1114 |
1114 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } | 1115 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } |
1115 | 1116 |
1116 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1117 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1117 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1118 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1118 AsValueInto(state.get()); | 1119 AsValueInto(state.get()); |
1119 return state.PassAs<base::Value>(); | 1120 return state.PassAs<base::Value>(); |
1120 } | 1121 } |
1121 | 1122 |
1122 } // namespace cc | 1123 } // namespace cc |
OLD | NEW |