Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: cc/layer.cc

Issue 12413020: Do not push properties that are animated on impl only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/layer_impl.h » ('j') | cc/layer_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/layer_impl.h » ('j') | cc/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698