Changeset 286565 in webkit
- Timestamp:
- Dec 6, 2021, 1:15:39 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/SystemTracing.h (modified) (3 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/mac/ScrollingEffectsController.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r286555 r286565 1 2021-12-06 Simon Fraser <simon.fraser@apple.com> 2 3 Add a call to os_signpost to tag a momentum scroll animation 4 https://bugs.webkit.org/show_bug.cgi?id=233885 5 6 Reviewed by Tim Horton. 7 8 * wtf/SystemTracing.h: 9 1 10 2021-12-06 Antoine Quint <graouts@webkit.org> 2 11 -
trunk/Source/WTF/wtf/SystemTracing.h
r286537 r286565 197 197 WTF_EXTERN_C_END 198 198 199 // These macros only emit signposts on internal builds when WEBKIT_SIGNPOSTS_ENABLED is set. 199 200 #define WTFEmitSignpost(pointer, name, ...) \ 200 201 WTFEmitSignpostWithFunction(os_signpost_event_emit, (pointer), name, ##__VA_ARGS__) … … 215 216 } while (0) 216 217 218 // These macros emit signposts on all builds. 219 #define WTFEmitSignpostAlways(name, format, ...) \ 220 do { os_signpost_event_emit(WTFSignpostLogHandle(), OS_SIGNPOST_ID_EXCLUSIVE, name, format, ##__VA_ARGS__); } } while (0) 221 222 #define WTFBeginSignpostIntervalAlways(name, format, ...) \ 223 do { os_signpost_interval_begin(WTFSignpostLogHandle(), OS_SIGNPOST_ID_EXCLUSIVE, name, format, ##__VA_ARGS__); } while (0) 224 225 #define WTF_OS_SIGNPOST_ANIMATION_INTERVAL_TAG "isAnimation=YES" 226 227 #define WTFBeginAnimationSignpostIntervalAlways(name, format, ...) \ 228 do { os_signpost_interval_begin(WTFSignpostLogHandle(), OS_SIGNPOST_ID_EXCLUSIVE, name, format " " WTF_OS_SIGNPOST_ANIMATION_INTERVAL_TAG, ##__VA_ARGS__); } while (0) 229 230 #define WTFEndSignpostIntervalAlways(name, format, ...) \ 231 do { os_signpost_interval_end(WTFSignpostLogHandle(), OS_SIGNPOST_ID_EXCLUSIVE, name, format, ##__VA_ARGS__); } while (0) 232 217 233 #else 218 234 … … 221 237 #define WTFEndSignpost(pointer, name, ...) do { } while (0) 222 238 239 #define WTFEmitSignpostAlways(name, format, ...) do { } while (0) 240 #define WTFBeginSignpostIntervalAlways(name, format, ...) do { } while (0) 241 #define WTFBeginAnimationSignpostIntervalAlways(name, format, ...) do { } while (0) 242 #define WTFEndSignpostIntervalAlways(name, format, ...) do { } while (0) 243 223 244 #endif -
trunk/Source/WebCore/ChangeLog
r286560 r286565 1 2021-12-06 Simon Fraser <simon.fraser@apple.com> 2 3 Add a call to os_signpost to tag a momentum scroll animation 4 https://bugs.webkit.org/show_bug.cgi?id=233885 5 6 Reviewed by Tim Horton. 7 8 Use the momentum "Began" and "Ended" events to mark the start/end of a momentum scroll 9 as an animation via os_signost. 10 11 Put the code in ScrollingEffectsController rather than MomentumEventDispatcher so that 12 non-generated momentum gets marked too. 13 14 * platform/mac/ScrollingEffectsController.mm: 15 (WebCore::ScrollingEffectsController::handleWheelEvent): 16 1 17 2021-12-06 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm
r286274 r286565 35 35 #import <sys/sysctl.h> 36 36 #import <sys/time.h> 37 #import <wtf/SystemTracing.h> 37 38 #import <wtf/text/TextStream.h> 38 39 … … 178 179 179 180 auto momentumPhase = wheelEvent.momentumPhase(); 181 182 if (momentumPhase == PlatformWheelEventPhase::Began) 183 WTFBeginAnimationSignpostIntervalAlways("Momentum scroll", ""); 184 180 185 if (!m_momentumScrollInProgress && (momentumPhase == PlatformWheelEventPhase::Began || momentumPhase == PlatformWheelEventPhase::Changed)) 181 186 m_momentumScrollInProgress = true; … … 220 225 221 226 if (m_momentumScrollInProgress && momentumPhase == PlatformWheelEventPhase::Ended) { 227 WTFEndSignpostIntervalAlways("Momentum scroll", ""); 222 228 m_momentumScrollInProgress = false; 223 229 m_ignoreMomentumScrolls = false;
Note:
See TracChangeset
for help on using the changeset viewer.