Changeset 263256 in webkit
- Timestamp:
- Jun 19, 2020 12:32:14 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r263255 r263256 1 2020-06-10 Sergio Villar Senin <svillar@igalia.com> 2 3 [WebXR] unsigned long in IDL should be translated as unsigned in C++ code 4 https://bugs.webkit.org/show_bug.cgi?id=213020 5 6 Reviewed by Darin Adler. 7 8 The "unsigned long" type definition in IDL must be translated to unsigned in C++ code. 9 10 I'm also replacing the very long XRFrameRequestCallback::Identifier by simply unsigned as it 11 isn't adding anything. 12 13 No new test required as there is no change in functionality, just removing an alias. 14 15 * Modules/webxr/WebXRSession.cpp: 16 (WebCore::WebXRSession::requestAnimationFrame): 17 (WebCore::WebXRSession::cancelAnimationFrame): 18 * Modules/webxr/WebXRSession.h: 19 * Modules/webxr/XRFrameRequestCallback.h: 20 (WebCore::XRFrameRequestCallback::callbackId): 21 (WebCore::XRFrameRequestCallback::setCallbackId): 22 1 23 2020-06-19 Myles C. Maxfield <mmaxfield@apple.com> 2 24 -
trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp
r262898 r263256 197 197 198 198 // https://immersive-web.github.io/webxr/#dom-xrsession-requestanimationframe 199 XRFrameRequestCallback::Id WebXRSession::requestAnimationFrame(Ref<XRFrameRequestCallback>&& callback)199 unsigned WebXRSession::requestAnimationFrame(Ref<XRFrameRequestCallback>&& callback) 200 200 { 201 201 // 1. Let session be the target XRSession object. 202 202 // 2. Increment session's animation frame callback identifier by one. 203 XRFrameRequestCallback::Id newId = ++m_nextCallbackId;203 unsigned newId = m_nextCallbackId++; 204 204 205 205 // 3. Append callback to session's list of animation frame callbacks, associated with session's … … 215 215 216 216 // https://immersive-web.github.io/webxr/#dom-xrsession-cancelanimationframe 217 void WebXRSession::cancelAnimationFrame( XRFrameRequestCallback::Id callbackId)217 void WebXRSession::cancelAnimationFrame(unsigned callbackId) 218 218 { 219 219 // 1. Let session be the target XRSession object. -
trunk/Source/WebCore/Modules/webxr/WebXRSession.h
r262898 r263256 36 36 #include "WebXRSpace.h" 37 37 #include "XREnvironmentBlendMode.h" 38 #include "XRFrameRequestCallback.h"39 38 #include "XRInteractionMode.h" 40 39 #include "XRReferenceSpaceType.h" … … 49 48 namespace WebCore { 50 49 50 class XRFrameRequestCallback; 51 51 class WebXRReferenceSpace; 52 52 class WebXRSystem; … … 74 74 void requestReferenceSpace(XRReferenceSpaceType, RequestReferenceSpacePromise&&); 75 75 76 XRFrameRequestCallback::Id requestAnimationFrame(Ref<XRFrameRequestCallback>&&);77 void cancelAnimationFrame( XRFrameRequestCallback::Id handle);76 unsigned requestAnimationFrame(Ref<XRFrameRequestCallback>&&); 77 void cancelAnimationFrame(unsigned callbackId); 78 78 79 79 void end(EndPromise&&); … … 113 113 RefPtr<WebXRRenderState> m_pendingRenderState; 114 114 115 XRFrameRequestCallback::Id m_nextCallbackId { 0};115 unsigned m_nextCallbackId { 1 }; 116 116 Vector<Ref<XRFrameRequestCallback>> m_callbacks; 117 117 Vector<Ref<XRFrameRequestCallback>> m_runningCallbacks; -
trunk/Source/WebCore/Modules/webxr/XRFrameRequestCallback.h
r262857 r263256 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 unsigned callbackId() { ASSERT(m_id); return m_id; } 45 void setCallbackId(unsigned id) { ASSERT(!m_id); m_id = id; } 47 46 void cancel() { m_cancelled = true; } 48 47 bool isCancelled() const { return m_cancelled; } 49 48 50 49 private: 51 Id m_id { 0 };50 unsigned m_id { 0 }; 52 51 bool m_cancelled { false }; 53 52 };
Note: See TracChangeset
for help on using the changeset viewer.