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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1663963004: Blink Compositor Animation: Use PassOwnPtr in CompositorFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@curves
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 if (mainThreadScrollingReasons) 690 if (mainThreadScrollingReasons)
691 scrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReason s); 691 scrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReason s);
692 else 692 else
693 scrollLayer->clearMainThreadScrollingReasons(); 693 scrollLayer->clearMainThreadScrollingReasons();
694 } 694 }
695 } 695 }
696 696
697 void ScrollingCoordinator::layerTreeViewInitialized(WebLayerTreeView& layerTreeV iew) 697 void ScrollingCoordinator::layerTreeViewInitialized(WebLayerTreeView& layerTreeV iew)
698 { 698 {
699 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->isThreadedAnimationEnabled()) { 699 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->isThreadedAnimationEnabled()) {
700 m_programmaticScrollAnimatorTimeline = adoptPtr(CompositorFactory::curre nt().createAnimationTimeline()); 700 m_programmaticScrollAnimatorTimeline = CompositorFactory::current().crea teAnimationTimeline();
701 layerTreeView.attachCompositorAnimationTimeline(m_programmaticScrollAnim atorTimeline->animationTimeline()); 701 layerTreeView.attachCompositorAnimationTimeline(m_programmaticScrollAnim atorTimeline->animationTimeline());
702 } 702 }
703 } 703 }
704 704
705 void ScrollingCoordinator::willCloseLayerTreeView(WebLayerTreeView& layerTreeVie w) 705 void ScrollingCoordinator::willCloseLayerTreeView(WebLayerTreeView& layerTreeVie w)
706 { 706 {
707 if (m_programmaticScrollAnimatorTimeline) { 707 if (m_programmaticScrollAnimatorTimeline) {
708 layerTreeView.detachCompositorAnimationTimeline(m_programmaticScrollAnim atorTimeline->animationTimeline()); 708 layerTreeView.detachCompositorAnimationTimeline(m_programmaticScrollAnim atorTimeline->animationTimeline());
709 m_programmaticScrollAnimatorTimeline.clear(); 709 m_programmaticScrollAnimatorTimeline.clear();
710 } 710 }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 bool frameIsScrollable = frameView && frameView->isScrollable(); 1051 bool frameIsScrollable = frameView && frameView->isScrollable();
1052 if (frameIsScrollable != m_wasFrameScrollable) 1052 if (frameIsScrollable != m_wasFrameScrollable)
1053 return true; 1053 return true;
1054 1054
1055 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1055 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1056 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1056 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1057 return false; 1057 return false;
1058 } 1058 }
1059 1059
1060 } // namespace blink 1060 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698