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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 , m_isDrawable(false) | 47 , m_isDrawable(false) |
48 , m_masksToBounds(false) | 48 , m_masksToBounds(false) |
49 , m_contentsOpaque(false) | 49 , m_contentsOpaque(false) |
50 , m_doubleSided(true) | 50 , m_doubleSided(true) |
51 , m_useLCDText(false) | 51 , m_useLCDText(false) |
52 , m_preserves3D(false) | 52 , m_preserves3D(false) |
53 , m_useParentBackfaceVisibility(false) | 53 , m_useParentBackfaceVisibility(false) |
54 , m_drawCheckerboardForMissingTiles(false) | 54 , m_drawCheckerboardForMissingTiles(false) |
55 , m_forceRenderSurface(false) | 55 , m_forceRenderSurface(false) |
56 , m_replicaLayer(0) | 56 , m_replicaLayer(0) |
57 , m_drawOpacity(0) | |
58 , m_drawOpacityIsAnimating(false) | |
59 , m_renderTarget(0) | |
60 , m_drawTransformIsAnimating(false) | |
61 , m_screenSpaceTransformIsAnimating(false) | |
62 , m_isClipped(false) | |
63 , m_rasterScale(1.0) | 57 , m_rasterScale(1.0) |
64 , m_automaticallyComputeRasterScale(false) | 58 , m_automaticallyComputeRasterScale(false) |
65 , m_boundsContainPageScale(false) | 59 , m_boundsContainPageScale(false) |
66 , m_layerAnimationDelegate(0) | 60 , m_layerAnimationDelegate(0) |
67 , m_layerScrollClient(0) | 61 , m_layerScrollClient(0) |
68 { | 62 { |
69 if (m_layerId < 0) { | 63 if (m_layerId < 0) { |
70 s_nextLayerId = 1; | 64 s_nextLayerId = 1; |
71 m_layerId = s_nextLayerId++; | 65 m_layerId = s_nextLayerId++; |
72 } | 66 } |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 683 |
690 if (boundsContainPageScale == m_boundsContainPageScale) | 684 if (boundsContainPageScale == m_boundsContainPageScale) |
691 return; | 685 return; |
692 | 686 |
693 m_boundsContainPageScale = boundsContainPageScale; | 687 m_boundsContainPageScale = boundsContainPageScale; |
694 setNeedsDisplay(); | 688 setNeedsDisplay(); |
695 } | 689 } |
696 | 690 |
697 void Layer::createRenderSurface() | 691 void Layer::createRenderSurface() |
698 { | 692 { |
699 DCHECK(!m_renderSurface); | 693 DCHECK(!m_drawProperties.render_surface); |
700 m_renderSurface = make_scoped_ptr(new RenderSurface(this)); | 694 m_drawProperties.render_surface = make_scoped_ptr(new RenderSurface(this)); |
701 setRenderTarget(this); | 695 m_drawProperties.render_target = this; |
702 } | 696 } |
703 | 697 |
704 int Layer::descendantsDrawContent() | 698 int Layer::descendantsDrawContent() |
705 { | 699 { |
706 int result = 0; | 700 int result = 0; |
707 for (size_t i = 0; i < m_children.size(); ++i) { | 701 for (size_t i = 0; i < m_children.size(); ++i) { |
708 if (m_children[i]->drawsContent()) | 702 if (m_children[i]->drawsContent()) |
709 ++result; | 703 ++result; |
710 result += m_children[i]->descendantsDrawContent(); | 704 result += m_children[i]->descendantsDrawContent(); |
711 if (result > 1) | 705 if (result > 1) |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 { | 835 { |
842 return 0; | 836 return 0; |
843 } | 837 } |
844 | 838 |
845 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) | 839 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) |
846 { | 840 { |
847 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. | 841 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. |
848 } | 842 } |
849 | 843 |
850 } // namespace cc | 844 } // namespace cc |
OLD | NEW |