| 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/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 DCHECK(delegated_renderer_layer_.get() || surface_layer_.get()); | 719 DCHECK(delegated_renderer_layer_.get() || surface_layer_.get()); |
| 720 if (!delegate_) | 720 if (!delegate_) |
| 721 return; | 721 return; |
| 722 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); | 722 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); |
| 723 } | 723 } |
| 724 | 724 |
| 725 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { | 725 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { |
| 726 cc_layer_->RequestCopyOfOutput(request.Pass()); | 726 cc_layer_->RequestCopyOfOutput(request.Pass()); |
| 727 } | 727 } |
| 728 | 728 |
| 729 void Layer::PaintContents(SkCanvas* sk_canvas, | 729 void Layer::PaintContents( |
| 730 const gfx::Rect& clip, | 730 SkCanvas* sk_canvas, |
| 731 ContentLayerClient::GraphicsContextStatus gc_status) { | 731 const gfx::Rect& clip, |
| 732 ContentLayerClient::PaintingControlSetting painting_control) { |
| 732 TRACE_EVENT1("ui", "Layer::PaintContents", "name", name_); | 733 TRACE_EVENT1("ui", "Layer::PaintContents", "name", name_); |
| 733 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( | 734 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( |
| 734 sk_canvas, device_scale_factor_)); | 735 sk_canvas, device_scale_factor_)); |
| 735 if (delegate_) | 736 if (delegate_) |
| 736 delegate_->OnPaintLayer(canvas.get()); | 737 delegate_->OnPaintLayer(canvas.get()); |
| 737 } | 738 } |
| 738 | 739 |
| 739 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( | 740 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
| 740 const gfx::Rect& clip, | 741 const gfx::Rect& clip, |
| 741 ContentLayerClient::GraphicsContextStatus gc_status) { | 742 ContentLayerClient::PaintingControlSetting painting_control) { |
| 742 NOTIMPLEMENTED(); | 743 NOTIMPLEMENTED(); |
| 743 return cc::DisplayItemList::Create(); | 744 return cc::DisplayItemList::Create(); |
| 744 } | 745 } |
| 745 | 746 |
| 746 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 747 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 747 | 748 |
| 748 bool Layer::PrepareTextureMailbox( | 749 bool Layer::PrepareTextureMailbox( |
| 749 cc::TextureMailbox* mailbox, | 750 cc::TextureMailbox* mailbox, |
| 750 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 751 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 751 bool use_shared_memory) { | 752 bool use_shared_memory) { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 children_.end(), | 1067 children_.end(), |
| 1067 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1068 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
| 1068 collection)); | 1069 collection)); |
| 1069 } | 1070 } |
| 1070 | 1071 |
| 1071 bool Layer::IsAnimating() const { | 1072 bool Layer::IsAnimating() const { |
| 1072 return animator_.get() && animator_->is_animating(); | 1073 return animator_.get() && animator_->is_animating(); |
| 1073 } | 1074 } |
| 1074 | 1075 |
| 1075 } // namespace ui | 1076 } // namespace ui |
| OLD | NEW |