Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 41a4bbb26f95103dfe66e08600b2606ce69b17c6
      
https://github.com/WebKit/WebKit/commit/41a4bbb26f95103dfe66e08600b2606ce69b17c6
  Author: Ada Chan <adac...@apple.com>
  Date:   2025-02-28 (Fri, 28 Feb 2025)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/platform/graphics/Color.h
    M Source/WebKit/UIProcess/ios/WKPageHostedModelView.mm
    M Source/WebKit/WebKitSwift/RealityKit/RKEntity.swift

  Log Message:
  -----------
  Adopt stereo content component for the model's portal entity
https://bugs.webkit.org/show_bug.cgi?id=288019
rdar://120925261

Reviewed by Mike Wyrzykowski.

With this adoption, the portal layer is not separated
and no longer on top of all other content.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/platform/graphics/Color.h:
* Source/WebKit/UIProcess/ios/WKPageHostedModelView.mm:
(+[WKPageHostedModelView _usesStereoContent]):
Check runtime flag to determine whether to use stereo
content component. Default values are different between
device and simulator.
(-[WKPageHostedModelView init]):
If using stereo content, set up a new CALayer to associate
with the stereo content entity. A world root is set up
with the stereo content component. The stereo content
entity is now set as the parent of the container view's entity.
(-[WKPageHostedModelView dealloc]):
Make sure the stereo content entity is removed from the scene.
(-[WKPageHostedModelView setShouldDisablePortal:]):
To disable the portal, remove the stereo content layer and entity
from the hierarchy. To show the portal, add the stereo content
layer and entity back.
(-[WKPageHostedModelView applyBackgroundColor:]):
Update the background color of the portal via
REEmbeddedStereoContentComponentSetClearColor(). Since
that function expects linear RGB, we need to convert
the sRGB color to linear first.
(-[WKPageHostedModelView layoutSubviews]):
Make sure the stereo content layer's frame gets updated
with its parent layer.
* Source/WebKit/WebKitSwift/RealityKit/RKEntity.swift:
(WKSRKEntity.applyIBL(_:completion:)):
This version check should be ok to remove now.

Canonical link: https://commits.webkit.org/291371@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to