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

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

Issue 1323913002: Composited Animations: Support --disable-threaded-animation in new animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 ScrollingCoordinator::ScrollingCoordinator(Page* page) 89 ScrollingCoordinator::ScrollingCoordinator(Page* page)
90 : m_page(page) 90 : m_page(page)
91 , m_scrollGestureRegionIsDirty(false) 91 , m_scrollGestureRegionIsDirty(false)
92 , m_touchEventTargetRectsAreDirty(false) 92 , m_touchEventTargetRectsAreDirty(false)
93 , m_shouldScrollOnMainThreadDirty(false) 93 , m_shouldScrollOnMainThreadDirty(false)
94 , m_wasFrameScrollable(false) 94 , m_wasFrameScrollable(false)
95 , m_lastMainThreadScrollingReasons(0) 95 , m_lastMainThreadScrollingReasons(0)
96 { 96 {
97 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { 97 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->isThreadedAnimationEnabled()) {
98 ASSERT(m_page); 98 ASSERT(m_page);
99 ASSERT(m_page->mainFrame()->isLocalFrame()); 99 ASSERT(m_page->mainFrame()->isLocalFrame());
100 ASSERT(Platform::current()->compositorSupport()); 100 ASSERT(Platform::current()->compositorSupport());
101 m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->com positorSupport()->createAnimationTimeline()); 101 m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->com positorSupport()->createAnimationTimeline());
102 m_page->chromeClient().attachCompositorAnimationTimeline(m_programmaticS crollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame())); 102 m_page->chromeClient().attachCompositorAnimationTimeline(m_programmaticS crollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame()));
103 } 103 }
104 } 104 }
105 105
106 ScrollingCoordinator::~ScrollingCoordinator() 106 ScrollingCoordinator::~ScrollingCoordinator()
107 { 107 {
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 bool frameIsScrollable = frameView && frameView->isScrollable(); 1076 bool frameIsScrollable = frameView && frameView->isScrollable();
1077 if (frameIsScrollable != m_wasFrameScrollable) 1077 if (frameIsScrollable != m_wasFrameScrollable)
1078 return true; 1078 return true;
1079 1079
1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1082 return false; 1082 return false;
1083 } 1083 }
1084 1084
1085 } // namespace blink 1085 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationTimeline.cpp ('k') | Source/platform/scroll/ProgrammaticScrollAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698