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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 return; | 700 return; |
701 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); | 701 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); |
702 } | 702 } |
703 | 703 |
704 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { | 704 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { |
705 cc_layer_->RequestCopyOfOutput(request.Pass()); | 705 cc_layer_->RequestCopyOfOutput(request.Pass()); |
706 } | 706 } |
707 | 707 |
708 void Layer::PaintContents(SkCanvas* sk_canvas, | 708 void Layer::PaintContents(SkCanvas* sk_canvas, |
709 const gfx::Rect& clip, | 709 const gfx::Rect& clip, |
710 gfx::RectF* opaque, | |
711 ContentLayerClient::GraphicsContextStatus gc_status) { | 710 ContentLayerClient::GraphicsContextStatus gc_status) { |
712 TRACE_EVENT0("ui", "Layer::PaintContents"); | 711 TRACE_EVENT0("ui", "Layer::PaintContents"); |
713 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( | 712 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( |
714 sk_canvas, device_scale_factor_)); | 713 sk_canvas, device_scale_factor_)); |
715 if (delegate_) | 714 if (delegate_) |
716 delegate_->OnPaintLayer(canvas.get()); | 715 delegate_->OnPaintLayer(canvas.get()); |
717 } | 716 } |
718 | 717 |
719 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 718 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
720 | 719 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 children_.end(), | 1038 children_.end(), |
1040 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1039 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
1041 collection)); | 1040 collection)); |
1042 } | 1041 } |
1043 | 1042 |
1044 bool Layer::IsAnimating() const { | 1043 bool Layer::IsAnimating() const { |
1045 return animator_.get() && animator_->is_animating(); | 1044 return animator_.get() && animator_->is_animating(); |
1046 } | 1045 } |
1047 | 1046 |
1048 } // namespace ui | 1047 } // namespace ui |
OLD | NEW |