| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 void Layer::PaintContents(SkCanvas* sk_canvas, | 717 void Layer::PaintContents(SkCanvas* sk_canvas, |
| 718 const gfx::Rect& clip, | 718 const gfx::Rect& clip, |
| 719 ContentLayerClient::GraphicsContextStatus gc_status) { | 719 ContentLayerClient::GraphicsContextStatus gc_status) { |
| 720 TRACE_EVENT0("ui", "Layer::PaintContents"); | 720 TRACE_EVENT0("ui", "Layer::PaintContents"); |
| 721 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( | 721 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( |
| 722 sk_canvas, device_scale_factor_)); | 722 sk_canvas, device_scale_factor_)); |
| 723 if (delegate_) | 723 if (delegate_) |
| 724 delegate_->OnPaintLayer(canvas.get()); | 724 delegate_->OnPaintLayer(canvas.get()); |
| 725 } | 725 } |
| 726 | 726 |
| 727 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
| 728 const gfx::Rect& clip, |
| 729 ContentLayerClient::GraphicsContextStatus gc_status) { |
| 730 NOTIMPLEMENTED(); |
| 731 return cc::DisplayItemList::Create(); |
| 732 } |
| 733 |
| 727 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 734 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 728 | 735 |
| 729 bool Layer::PrepareTextureMailbox( | 736 bool Layer::PrepareTextureMailbox( |
| 730 cc::TextureMailbox* mailbox, | 737 cc::TextureMailbox* mailbox, |
| 731 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 738 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 732 bool use_shared_memory) { | 739 bool use_shared_memory) { |
| 733 if (!mailbox_release_callback_) | 740 if (!mailbox_release_callback_) |
| 734 return false; | 741 return false; |
| 735 *mailbox = mailbox_; | 742 *mailbox = mailbox_; |
| 736 *release_callback = mailbox_release_callback_.Pass(); | 743 *release_callback = mailbox_release_callback_.Pass(); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 children_.end(), | 1054 children_.end(), |
| 1048 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1055 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
| 1049 collection)); | 1056 collection)); |
| 1050 } | 1057 } |
| 1051 | 1058 |
| 1052 bool Layer::IsAnimating() const { | 1059 bool Layer::IsAnimating() const { |
| 1053 return animator_.get() && animator_->is_animating(); | 1060 return animator_.get() && animator_->is_animating(); |
| 1054 } | 1061 } |
| 1055 | 1062 |
| 1056 } // namespace ui | 1063 } // namespace ui |
| OLD | NEW |