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