⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286023 in webkit


Ignore:
Timestamp:
Nov 18, 2021, 12:58:02 PM (5 years ago)
Author:
graouts@webkit.org
Message:

[Model] add support for getting and setting the camera
https://bugs.webkit.org/show_bug.cgi?id=233265
<rdar://problem/85426290>

Unreviewed build fix.

Fix the Montery build, making sure we guard calls to the new ARQL SPIs.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::getCameraForModelElement):
(WebKit::ModelElementController::setCameraForModelElement):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r286022 r286023  
     12021-11-18  Antoine Quint  <graouts@webkit.org>
     2
     3        [Model] add support for getting and setting the camera
     4        https://bugs.webkit.org/show_bug.cgi?id=233265
     5        <rdar://problem/85426290>
     6
     7        Unreviewed build fix.
     8
     9        Fix the Montery build, making sure we guard calls to the new ARQL SPIs.
     10
     11        * UIProcess/Cocoa/ModelElementControllerCocoa.mm:
     12        (WebKit::ModelElementController::getCameraForModelElement):
     13        (WebKit::ModelElementController::setCameraForModelElement):
     14
    1152021-11-18  Per Arne  <pvollan@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm

    r286019 r286023  
    254254    }
    255255
     256#if ENABLE(ARKIT_INLINE_PREVIEW_CAMERA_TRANSFORM)
    256257    [preview getCameraTransform:makeBlockPtr([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] (simd_float3 cameraTransform, NSError *error) mutable {
    257258        if (error) {
     
    268269        });
    269270    }).get()];
     271#else
     272    callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable {
     273        if (weakThis)
     274            completionHandler(makeUnexpected(error));
     275    });
     276    return;
     277#endif
    270278}
    271279
     
    281289    }
    282290
     291#if ENABLE(ARKIT_INLINE_PREVIEW_CAMERA_TRANSFORM)
    283292    [preview setCameraTransform:simd_make_float3(camera.pitch, camera.yaw, camera.scale)];
     293#endif
    284294
    285295    callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable {
    286296        if (weakThis)
     297#if ENABLE(ARKIT_INLINE_PREVIEW_CAMERA_TRANSFORM)
    287298            completionHandler(true);
     299#else
     300            completionHandler(false);
     301#endif
    288302    });
    289303}
Note: See TracChangeset for help on using the changeset viewer.