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

Side by Side Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

Issue 1534813004: Run smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years 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) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 else 1036 else
1037 [m_scrollbarPainterController.get() hideOverlayScrollers]; 1037 [m_scrollbarPainterController.get() hideOverlayScrollers];
1038 1038
1039 [m_verticalScrollbarPainterDelegate.get() updateVisibilityImmediately:sh ow]; 1039 [m_verticalScrollbarPainterDelegate.get() updateVisibilityImmediately:sh ow];
1040 [m_verticalScrollbarPainterDelegate.get() updateVisibilityImmediately:sh ow]; 1040 [m_verticalScrollbarPainterDelegate.get() updateVisibilityImmediately:sh ow];
1041 return true; 1041 return true;
1042 } 1042 }
1043 return false; 1043 return false;
1044 } 1044 }
1045 1045
1046 void ScrollAnimatorMac::cancelAnimations() 1046 void ScrollAnimatorMac::cancelAnimation()
1047 { 1047 {
1048 m_haveScrolledSincePageLoad = false; 1048 m_haveScrolledSincePageLoad = false;
1049 1049
1050 if (ScrollbarThemeMacCommon::isOverlayAPIAvailable()) { 1050 if (ScrollbarThemeMacCommon::isOverlayAPIAvailable()) {
1051 if (scrollbarPaintTimerIsActive()) 1051 if (scrollbarPaintTimerIsActive())
1052 stopScrollbarPaintTimer(); 1052 stopScrollbarPaintTimer();
1053 [m_horizontalScrollbarPainterDelegate.get() cancelAnimations]; 1053 [m_horizontalScrollbarPainterDelegate.get() cancelAnimations];
1054 [m_verticalScrollbarPainterDelegate.get() cancelAnimations]; 1054 [m_verticalScrollbarPainterDelegate.get() cancelAnimations];
1055 } 1055 }
1056 } 1056 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 return; 1198 return;
1199 1199
1200 m_visibleScrollerThumbRect = rectInViewCoordinates; 1200 m_visibleScrollerThumbRect = rectInViewCoordinates;
1201 } 1201 }
1202 1202
1203 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { 1203 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() {
1204 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); 1204 return ScrollbarThemeMacCommon::isOverlayAPIAvailable();
1205 } 1205 }
1206 1206
1207 } // namespace blink 1207 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698