Changeset 262718 in webkit
- Timestamp:
- Jun 8, 2020 8:59:37 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r262716 r262718 1 2020-05-29 Sergio Villar Senin <svillar@igalia.com> 2 3 [WebXR] Pass an unsigned long to cancelAnimationCallback() as handle 4 https://bugs.webkit.org/show_bug.cgi?id=212529 5 6 Reviewed by Youenn Fablet. 7 8 The type of the handle returned by XRSession::requestAnimationFrame() was recently changed 9 to unsigned long from long as there was no point in using signed integers for that. However 10 we forgot to update the cancelAnimationFrame() in the specs as well as it receives the handle 11 returned by requestAnimationFrame(). 12 13 We landed https://github.com/immersive-web/webxr/pull/1069 in the WebXR specs so we can now 14 safely also replace signed by unsigned integers in our implementation. 15 16 No new tests as there is no change in functionality. 17 18 * Modules/webxr/WebXRSession.cpp: 19 (WebCore::WebXRSession::cancelAnimationFrame): Use unsigned ids. 20 * Modules/webxr/WebXRSession.h: Ditto. 21 * Modules/webxr/WebXRSession.idl: Ditto. 22 1 23 2020-06-01 Sergio Villar Senin <svillar@igalia.com> 2 24 -
trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp
r262299 r262718 192 192 193 193 // https://immersive-web.github.io/webxr/#dom-xrsession-requestanimationframe 194 XRFrameRequestCallback::Id WebXRSession::requestAnimationFrame(Ref<XRFrameRequestCallback>&& callback)194 XRFrameRequestCallback::Identifier WebXRSession::requestAnimationFrame(Ref<XRFrameRequestCallback>&& callback) 195 195 { 196 196 // 1. Let session be the target XRSession object. 197 197 // 2. Increment session's animation frame callback identifier by one. 198 XRFrameRequestCallback::Id newId = ++m_nextCallbackId;198 XRFrameRequestCallback::Identifier newId = ++m_nextCallbackId; 199 199 200 200 // 3. Append callback to session's list of animation frame callbacks, associated with session's … … 210 210 211 211 // https://immersive-web.github.io/webxr/#dom-xrsession-cancelanimationframe 212 void WebXRSession::cancelAnimationFrame( intcallbackId)212 void WebXRSession::cancelAnimationFrame(XRFrameRequestCallback::Identifier callbackId) 213 213 { 214 214 // 1. Let session be the target XRSession object. -
trunk/Source/WebCore/Modules/webxr/WebXRSession.h
r262299 r262718 72 72 void requestReferenceSpace(XRReferenceSpaceType, RequestReferenceSpacePromise&&); 73 73 74 XRFrameRequestCallback::Id requestAnimationFrame(Ref<XRFrameRequestCallback>&&);75 void cancelAnimationFrame( inthandle);74 XRFrameRequestCallback::Identifier requestAnimationFrame(Ref<XRFrameRequestCallback>&&); 75 void cancelAnimationFrame(XRFrameRequestCallback::Identifier handle); 76 76 77 77 void end(EndPromise&&); … … 110 110 RefPtr<WebXRRenderState> m_pendingRenderState; 111 111 112 XRFrameRequestCallback::Id m_nextCallbackId { 0 };112 XRFrameRequestCallback::Identifier m_nextCallbackId { 0 }; 113 113 Vector<Ref<XRFrameRequestCallback>> m_callbacks; 114 114 Vector<Ref<XRFrameRequestCallback>> m_runningCallbacks; -
trunk/Source/WebCore/Modules/webxr/WebXRSession.idl
r262188 r262718 43 43 44 44 unsigned long requestAnimationFrame(XRFrameRequestCallback callback); 45 void cancelAnimationFrame( long handle);45 void cancelAnimationFrame(unsigned long handle); 46 46 47 47 Promise<void> end(); -
trunk/Source/WebCore/Modules/webxr/XRFrameRequestCallback.h
r262188 r262718 42 42 virtual CallbackResult<void> handleEvent(double highResTimeMs, WebXRFrame&) = 0; 43 43 44 using Id = unsigned long;45 Id callbackId() { ASSERT(m_id); return m_id; }46 void setCallbackId(Id id) { ASSERT(!m_id); m_id = id; }44 using Identifier = unsigned long; 45 Identifier callbackId() { ASSERT(m_id); return m_id; } 46 void setCallbackId(Identifier id) { ASSERT(!m_id); m_id = id; } 47 47 void cancel() { m_cancelled = true; } 48 48 bool isCancelled() const { return m_cancelled; } 49 49 50 50 private: 51 Id m_id { 0 };51 Identifier m_id { 0 }; 52 52 bool m_cancelled { false }; 53 53 };
Note: See TracChangeset
for help on using the changeset viewer.