Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: ui/compositor/layer.cc

Issue 61883006: Compositor thread plumbing for layout rectangle debug info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO, fixed nits. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/layer.h ('k') | webkit/renderer/compositor_bindings/web_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/compositor/layer.h ('k') | webkit/renderer/compositor_bindings/web_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698