[Webkit-unassigned] [Bug 221225] Implement WebXR getViewerPose and getPose

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 18 02:49:31 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221225

Imanol Fernandez <ifernandez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #420660|commit-queue?               |
              Flags|                            |

--- Comment #23 from Imanol Fernandez <ifernandez at igalia.com> ---
Comment on attachment 420660
  --> https://bugs.webkit.org/attachment.cgi?id=420660
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=420660&action=review

>> Source/WebCore/Modules/webxr/WebXRFrame.cpp:134
>> +    const bool emulatedPosition = m_data.isPositionEmulated || !m_data.isPositionValid;
> 
> why const bool?

IMO it's a good practice to use const on local variables that don't change (e.g some discussion about this here: https://www.bfilipek.com/2016/12/please-declare-your-variables-as-const.html). I wish C++ had implicit const by default :)

I removed the const to follow the same style as existing code. This could be a https://webkit.org/code-style-guidelines/ follow-up discussion

>> Source/WebCore/Modules/webxr/WebXRSession.cpp:60
>> +    , m_viewerReferenceSpace(new WebXRViewerSpace(document, *this))
> 
> makeUnique<WebXRViewerSpace>(document, this)

done

>> Source/WebCore/Modules/webxr/WebXRSpace.h:58
>>      ScriptExecutionContext* scriptExecutionContext() const override { return ContextDestructionObserver::scriptExecutionContext(); }
> 
> final?

done

>> Source/WebCore/Modules/webxr/WebXRSpace.h:60
>> +    Ref<WebXRRigidTransform> m_originOffset;
> 
> Can we make it private and add a protected WebXRRigidTransform& getter?

yes, done

>> Source/WebCore/Modules/webxr/WebXRSpace.h:81
>> +    void derefEventTarget() final { RELEASE_ASSERT_NOT_REACHED(); }
> 
> This is fine like this. Otherwise, you could do m_session.ref()/m_session.deref();

perfect, thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210218/416e333e/attachment-0001.htm>


More information about the webkit-unassigned mailing list