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/stringprintf.h" | 8 #include "base/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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
553 NoteLayerPropertyChanged(); | 553 NoteLayerPropertyChanged(); |
554 NoteLayerPropertyChangedForDescendants(); | 554 NoteLayerPropertyChangedForDescendants(); |
555 } | 555 } |
556 | 556 |
557 void LayerImpl::NoteLayerPropertyChangedForDescendants() { | 557 void LayerImpl::NoteLayerPropertyChangedForDescendants() { |
558 layer_tree_impl()->set_needs_update_draw_properties(); | 558 layer_tree_impl()->set_needs_update_draw_properties(); |
559 for (size_t i = 0; i < children_.size(); ++i) | 559 for (size_t i = 0; i < children_.size(); ++i) |
560 children_[i]->NoteLayerPropertyChangedForSubtree(); | 560 children_[i]->NoteLayerPropertyChangedForSubtree(); |
561 } | 561 } |
562 | 562 |
563 bool LayerImpl::CanDrawDirectlyToBackbuffer() const { | |
danakj
2013/05/15 20:33:16
I don't like bringing a "composite draw property"
enne (OOO)
2013/05/15 22:34:38
Moved to DrawProperties. PTAL.
| |
564 return render_target() == layer_tree_impl_->root_layer() && | |
565 draw_opacity() == 1.f && !draw_opacity_is_animating(); | |
566 } | |
567 | |
563 const char* LayerImpl::LayerTypeAsString() const { | 568 const char* LayerImpl::LayerTypeAsString() const { |
564 return "Layer"; | 569 return "Layer"; |
565 } | 570 } |
566 | 571 |
567 void LayerImpl::ResetAllChangeTrackingForSubtree() { | 572 void LayerImpl::ResetAllChangeTrackingForSubtree() { |
568 layer_property_changed_ = false; | 573 layer_property_changed_ = false; |
569 layer_surface_property_changed_ = false; | 574 layer_surface_property_changed_ = false; |
570 | 575 |
571 update_rect_ = gfx::RectF(); | 576 update_rect_ = gfx::RectF(); |
572 | 577 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1027 state->Set("replica_layer", replica_layer_->AsValue().release()); | 1032 state->Set("replica_layer", replica_layer_->AsValue().release()); |
1028 } | 1033 } |
1029 | 1034 |
1030 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1035 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1031 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1036 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1032 AsValueInto(state.get()); | 1037 AsValueInto(state.get()); |
1033 return state.PassAs<base::Value>(); | 1038 return state.PassAs<base::Value>(); |
1034 } | 1039 } |
1035 | 1040 |
1036 } // namespace cc | 1041 } // namespace cc |
OLD | NEW |