From d48d29b2960bcc9ea78fbce53321ad8a853a58f4 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Thu, 12 Dec 2024 14:24:44 -0800 Subject: [PATCH] fbsource//xplat/graphics/igl/public/shell/openxr Reviewed By: nlutsenko Differential Revision: D67133102 fbshipit-source-id: 2122c51f4b39457183c6490eb9231655e809456e --- shell/openxr/XrSwapchainProvider.h | 1 - shell/openxr/mobile/AndroidMain.cpp | 16 ++++++++-------- shell/openxr/mobile/XrApp.cpp | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/shell/openxr/XrSwapchainProvider.h b/shell/openxr/XrSwapchainProvider.h index f8fa46a41c..68b6e9d131 100644 --- a/shell/openxr/XrSwapchainProvider.h +++ b/shell/openxr/XrSwapchainProvider.h @@ -17,7 +17,6 @@ #include // forward declarations -namespace igl::shell::openxr::impl {} // namespace igl::shell::openxr::impl namespace igl::shell::openxr { diff --git a/shell/openxr/mobile/AndroidMain.cpp b/shell/openxr/mobile/AndroidMain.cpp index f93e9411dd..f8c4e11b9b 100644 --- a/shell/openxr/mobile/AndroidMain.cpp +++ b/shell/openxr/mobile/AndroidMain.cpp @@ -35,8 +35,8 @@ #include "ShellScalingApi.h" #endif // IGL_PLATFORM_WINDOWS -XrInstance gInstance_; -XrInstance getXrInstance() { +static XrInstance gInstance_; +static XrInstance getXrInstance() { return gInstance_; } @@ -76,41 +76,41 @@ Java_com_facebook_igl_shell_openxr_gles_MainActivity_onActionView(JNIEnv* env, using namespace igl::shell::openxr; -void handleInitWindow(const struct android_app* app) { +static void handleInitWindow(const struct android_app* app) { auto* xrApp = static_cast(app->userData); if (xrApp) { xrApp->setNativeWindow(app->window); } } -void handleTermWindow(const struct android_app* app) { +static void handleTermWindow(const struct android_app* app) { auto* xrApp = static_cast(app->userData); if (xrApp) { xrApp->setNativeWindow(nullptr); } } -void handleResume(const struct android_app* app) { +static void handleResume(const struct android_app* app) { auto* xrApp = static_cast(app->userData); if (xrApp) { xrApp->setResumed(true); } } -void handlePause(const struct android_app* app) { +static void handlePause(const struct android_app* app) { auto* xrApp = static_cast(app->userData); if (xrApp) { xrApp->setResumed(false); } } -void handleDestroy(const struct android_app* app) { +static void handleDestroy(const struct android_app* app) { auto* xrApp = static_cast(app->userData); if (xrApp) { xrApp->setNativeWindow(nullptr); } } -void handleAppCmd(struct android_app* app, int32_t appCmd) { +static void handleAppCmd(struct android_app* app, int32_t appCmd) { switch (appCmd) { case APP_CMD_INIT_WINDOW: IGL_LOG_INFO("APP_CMD_INIT_WINDOW"); diff --git a/shell/openxr/mobile/XrApp.cpp b/shell/openxr/mobile/XrApp.cpp index f3cb8eb40f..6ea9e45cb8 100644 --- a/shell/openxr/mobile/XrApp.cpp +++ b/shell/openxr/mobile/XrApp.cpp @@ -16,7 +16,6 @@ #if IGL_PLATFORM_ANDROID #include -#include #include #endif