OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 "cc/layer.h" | 5 #include "cc/layer.h" |
6 | 6 |
7 #include "cc/active_animation.h" | 7 #include "cc/active_animation.h" |
8 #include "cc/animation_events.h" | 8 #include "cc/animation_events.h" |
9 #include "cc/layer_animation_controller.h" | 9 #include "cc/layer_animation_controller.h" |
10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 setNeedsDisplay(); | 692 setNeedsDisplay(); |
693 } | 693 } |
694 | 694 |
695 void Layer::createRenderSurface() | 695 void Layer::createRenderSurface() |
696 { | 696 { |
697 DCHECK(!m_renderSurface); | 697 DCHECK(!m_renderSurface); |
698 m_renderSurface = make_scoped_ptr(new RenderSurface(this)); | 698 m_renderSurface = make_scoped_ptr(new RenderSurface(this)); |
699 setRenderTarget(this); | 699 setRenderTarget(this); |
700 } | 700 } |
701 | 701 |
702 bool Layer::descendantDrawsContent() | |
703 { | |
704 for (size_t i = 0; i < m_children.size(); ++i) { | |
705 if (m_children[i]->drawsContent() || m_children[i]->descendantDrawsConte
nt()) | |
706 return true; | |
707 } | |
708 return false; | |
709 } | |
710 | |
711 int Layer::id() const | 702 int Layer::id() const |
712 { | 703 { |
713 return m_layerId; | 704 return m_layerId; |
714 } | 705 } |
715 | 706 |
716 float Layer::opacity() const | 707 float Layer::opacity() const |
717 { | 708 { |
718 return m_opacity; | 709 return m_opacity; |
719 } | 710 } |
720 | 711 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 { | 826 { |
836 return 0; | 827 return 0; |
837 } | 828 } |
838 | 829 |
839 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) | 830 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) |
840 { | 831 { |
841 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. | 832 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. |
842 } | 833 } |
843 | 834 |
844 } // namespace cc | 835 } // namespace cc |
OLD | NEW |