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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 return; | 660 return; |
661 | 661 |
662 force_render_surface_ = force; | 662 force_render_surface_ = force; |
663 cc_layer_->SetForceRenderSurface(force_render_surface_); | 663 cc_layer_->SetForceRenderSurface(force_render_surface_); |
664 } | 664 } |
665 | 665 |
666 std::string Layer::DebugName() { | 666 std::string Layer::DebugName() { |
667 return name_; | 667 return name_; |
668 } | 668 } |
669 | 669 |
| 670 scoped_refptr<base::debug::ConvertableToTraceFormat> Layer::TakeDebugInfo() { |
| 671 // TODO: return something useful here. |
| 672 return NULL; |
| 673 } |
| 674 |
670 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { | 675 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { |
671 if (animator_.get()) | 676 if (animator_.get()) |
672 animator_->OnThreadedAnimationStarted(event); | 677 animator_->OnThreadedAnimationStarted(event); |
673 } | 678 } |
674 | 679 |
675 void Layer::StackRelativeTo(Layer* child, Layer* other, bool above) { | 680 void Layer::StackRelativeTo(Layer* child, Layer* other, bool above) { |
676 DCHECK_NE(child, other); | 681 DCHECK_NE(child, other); |
677 DCHECK_EQ(this, child->parent()); | 682 DCHECK_EQ(this, child->parent()); |
678 DCHECK_EQ(this, other->parent()); | 683 DCHECK_EQ(this, other->parent()); |
679 | 684 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 962 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
958 } | 963 } |
959 | 964 |
960 void Layer::RecomputePosition() { | 965 void Layer::RecomputePosition() { |
961 cc_layer_->SetPosition(gfx::ScalePoint( | 966 cc_layer_->SetPosition(gfx::ScalePoint( |
962 gfx::PointF(bounds_.x(), bounds_.y()), | 967 gfx::PointF(bounds_.x(), bounds_.y()), |
963 device_scale_factor_)); | 968 device_scale_factor_)); |
964 } | 969 } |
965 | 970 |
966 } // namespace ui | 971 } // namespace ui |
OLD | NEW |