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/animation.h" | 7 #include "cc/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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 layer->setDrawsContent(drawsContent()); | 636 layer->setDrawsContent(drawsContent()); |
637 layer->setFilters(filters()); | 637 layer->setFilters(filters()); |
638 layer->setFilter(filter()); | 638 layer->setFilter(filter()); |
639 layer->setBackgroundFilters(backgroundFilters()); | 639 layer->setBackgroundFilters(backgroundFilters()); |
640 layer->setMasksToBounds(m_masksToBounds); | 640 layer->setMasksToBounds(m_masksToBounds); |
641 layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread); | 641 layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread); |
642 layer->setHaveWheelEventHandlers(m_haveWheelEventHandlers); | 642 layer->setHaveWheelEventHandlers(m_haveWheelEventHandlers); |
643 layer->setNonFastScrollableRegion(m_nonFastScrollableRegion); | 643 layer->setNonFastScrollableRegion(m_nonFastScrollableRegion); |
644 layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion); | 644 layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion); |
645 layer->setContentsOpaque(m_contentsOpaque); | 645 layer->setContentsOpaque(m_contentsOpaque); |
646 if (!opacityIsAnimating()) | 646 if (!layer->opacityIsAnimatingOnImplOnly()) |
647 layer->setOpacity(m_opacity); | 647 layer->setOpacity(m_opacity); |
| 648 DCHECK(!(opacityIsAnimating() && layer->opacityIsAnimatingOnImplOnly())); |
648 layer->setPosition(m_position); | 649 layer->setPosition(m_position); |
649 layer->setIsContainerForFixedPositionLayers(m_isContainerForFixedPositionLay
ers); | 650 layer->setIsContainerForFixedPositionLayers(m_isContainerForFixedPositionLay
ers); |
650 layer->setFixedToContainerLayer(m_fixedToContainerLayer); | 651 layer->setFixedToContainerLayer(m_fixedToContainerLayer); |
651 layer->setPreserves3D(preserves3D()); | 652 layer->setPreserves3D(preserves3D()); |
652 layer->setUseParentBackfaceVisibility(m_useParentBackfaceVisibility); | 653 layer->setUseParentBackfaceVisibility(m_useParentBackfaceVisibility); |
653 layer->setSublayerTransform(m_sublayerTransform); | 654 layer->setSublayerTransform(m_sublayerTransform); |
654 if (!transformIsAnimating()) | 655 if (!layer->transformIsAnimatingOnImplOnly()) |
655 layer->setTransform(m_transform); | 656 layer->setTransform(m_transform); |
| 657 DCHECK(!(transformIsAnimating() && layer->transformIsAnimatingOnImplOnly()))
; |
656 | 658 |
657 layer->setScrollable(m_scrollable); | 659 layer->setScrollable(m_scrollable); |
658 layer->setScrollOffset(m_scrollOffset); | 660 layer->setScrollOffset(m_scrollOffset); |
659 layer->setMaxScrollOffset(m_maxScrollOffset); | 661 layer->setMaxScrollOffset(m_maxScrollOffset); |
660 | 662 |
661 // If the main thread commits multiple times before the impl thread actually
draws, then damage tracking | 663 // If the main thread commits multiple times before the impl thread actually
draws, then damage tracking |
662 // will become incorrect if we simply clobber the updateRect here. The Layer
Impl's updateRect needs to | 664 // will become incorrect if we simply clobber the updateRect here. The Layer
Impl's updateRect needs to |
663 // accumulate (i.e. union) any update changes that have occurred on the main
thread. | 665 // accumulate (i.e. union) any update changes that have occurred on the main
thread. |
664 m_updateRect.Union(layer->updateRect()); | 666 m_updateRect.Union(layer->updateRect()); |
665 layer->setUpdateRect(m_updateRect); | 667 layer->setUpdateRect(m_updateRect); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 { | 894 { |
893 return 0; | 895 return 0; |
894 } | 896 } |
895 | 897 |
896 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) | 898 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) |
897 { | 899 { |
898 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. | 900 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. |
899 } | 901 } |
900 | 902 |
901 } // namespace cc | 903 } // namespace cc |
OLD | NEW |