Chromium Code Reviews| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 if (layer_mask_) | 647 if (layer_mask_) |
| 648 layer_mask_->OnDeviceScaleFactorChanged(device_scale_factor); | 648 layer_mask_->OnDeviceScaleFactorChanged(device_scale_factor); |
| 649 } | 649 } |
| 650 | 650 |
| 651 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { | 651 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { |
| 652 cc_layer_->RequestCopyOfOutput(request.Pass()); | 652 cc_layer_->RequestCopyOfOutput(request.Pass()); |
| 653 } | 653 } |
| 654 | 654 |
| 655 void Layer::PaintContents(SkCanvas* sk_canvas, | 655 void Layer::PaintContents(SkCanvas* sk_canvas, |
| 656 const gfx::Rect& clip, | 656 const gfx::Rect& clip, |
| 657 bool can_paint_lcd_text, | |
| 657 gfx::RectF* opaque, | 658 gfx::RectF* opaque, |
| 658 ContentLayerClient::GraphicsContextStatus gc_status) { | 659 ContentLayerClient::GraphicsContextStatus gc_status) { |
| 659 TRACE_EVENT0("ui", "Layer::PaintContents"); | 660 TRACE_EVENT0("ui", "Layer::PaintContents"); |
| 660 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( | 661 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( |
| 661 sk_canvas, device_scale_factor_)); | 662 sk_canvas, device_scale_factor_)); |
| 662 if (delegate_) | 663 if (delegate_) |
| 663 delegate_->OnPaintLayer(canvas.get()); | 664 delegate_->OnPaintLayer(canvas.get()); |
| 664 } | 665 } |
| 665 | 666 |
| 667 bool Layer::PaintsLCDText() const { | |
| 668 return false; | |
|
alokp
2014/06/10 20:54:43
ui::Layer::PaintsLCDText returns false. If it retu
piman
2014/06/10 23:48:31
I'm pretty sure the UI paints LCD text today. Is i
alokp
2014/06/10 23:59:41
Irrespective of cc::Layer::can_paint_lcd_text? If
piman
2014/06/11 00:02:27
Yes. I'm pretty sure that when that was added to c
alokp
2014/06/11 01:01:36
Hmm. In that case I agree that it is better to kee
| |
| 669 } | |
| 670 | |
| 666 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 671 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 667 | 672 |
| 668 bool Layer::PrepareTextureMailbox( | 673 bool Layer::PrepareTextureMailbox( |
| 669 cc::TextureMailbox* mailbox, | 674 cc::TextureMailbox* mailbox, |
| 670 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 675 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 671 bool use_shared_memory) { | 676 bool use_shared_memory) { |
| 672 if (!mailbox_release_callback_) | 677 if (!mailbox_release_callback_) |
| 673 return false; | 678 return false; |
| 674 *mailbox = mailbox_; | 679 *mailbox = mailbox_; |
| 675 *release_callback = mailbox_release_callback_.Pass(); | 680 *release_callback = mailbox_release_callback_.Pass(); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 984 children_.end(), | 989 children_.end(), |
| 985 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 990 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
| 986 collection)); | 991 collection)); |
| 987 } | 992 } |
| 988 | 993 |
| 989 bool Layer::IsAnimating() const { | 994 bool Layer::IsAnimating() const { |
| 990 return animator_ && animator_->is_animating(); | 995 return animator_ && animator_->is_animating(); |
| 991 } | 996 } |
| 992 | 997 |
| 993 } // namespace ui | 998 } // namespace ui |
| OLD | NEW |