Bug 213462 - [WebXR] Introducing XRLayer
Summary: [WebXR] Introducing XRLayer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords: InRadar
Depends on:
Blocks: 208988
  Show dependency treegraph
 
Reported: 2020-06-22 07:38 PDT by Sergio Villar Senin
Modified: 2020-06-23 09:37 PDT (History)
18 users (show)

See Also:


Attachments
Patch (23.82 KB, patch)
2020-06-22 09:39 PDT, Sergio Villar Senin
youennf: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2020-06-22 07:38:54 PDT
[WebXR] Introducing XRLayer
Comment 1 Sergio Villar Senin 2020-06-22 09:39:13 PDT
Created attachment 402484 [details]
Patch
Comment 2 youenn fablet 2020-06-23 06:37:57 PDT
Comment on attachment 402484 [details]
Patch

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

> Source/WebCore/Modules/webxr/WebXRLayer.h:48
> +    WebXRLayer(ScriptExecutionContext*);

explicit and ScriptExecutionContext& or is there a point in supporting nullptr?

> Source/WebCore/Modules/webxr/WebXRLayer.h:51
> +    ScriptExecutionContext* scriptExecutionContext() const override { return ContextDestructionObserver::scriptExecutionContext(); }

final?

> Source/WebCore/Modules/webxr/WebXRLayer.h:57
> +    void derefEventTarget() override { deref(); }

final for all of these?

> Source/WebCore/Modules/webxr/WebXRSession.h:80
> +    ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }

final?

> Source/WebCore/Modules/webxr/WebXRWebGLLayer.cpp:107
>  WebXRWebGLLayer::WebXRWebGLLayer(WebXRSession& session, WebXRRenderingContext&& context, const XRWebGLLayerInit& init)

Would be best to have a Ref<WebXRSession>&&

> Source/WebCore/Modules/webxr/WebXRWebGLLayer.h:62
> +    virtual ~WebXRWebGLLayer();

Not needed I believe
Comment 3 Sergio Villar Senin 2020-06-23 09:33:25 PDT
Comment on attachment 402484 [details]
Patch

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

Thanks for the review Youenn!

>> Source/WebCore/Modules/webxr/WebXRLayer.h:48
>> +    WebXRLayer(ScriptExecutionContext*);
> 
> explicit and ScriptExecutionContext& or is there a point in supporting nullptr?

OK

>> Source/WebCore/Modules/webxr/WebXRLayer.h:57
>> +    void derefEventTarget() override { deref(); }
> 
> final for all of these?

Ok

>> Source/WebCore/Modules/webxr/WebXRSession.h:80
>> +    ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
> 
> final?

Ok

>> Source/WebCore/Modules/webxr/WebXRWebGLLayer.cpp:107
>>  WebXRWebGLLayer::WebXRWebGLLayer(WebXRSession& session, WebXRRenderingContext&& context, const XRWebGLLayerInit& init)
> 
> Would be best to have a Ref<WebXRSession>&&

Ok.

>> Source/WebCore/Modules/webxr/WebXRWebGLLayer.h:62
>> +    virtual ~WebXRWebGLLayer();
> 
> Not needed I believe

Indeed.
Comment 4 Sergio Villar Senin 2020-06-23 09:36:11 PDT
Committed r263403: <https://trac.webkit.org/changeset/263403>
Comment 5 Radar WebKit Bug Importer 2020-06-23 09:37:18 PDT
<rdar://problem/64648039>