Skip to content

Commit

Permalink
fbsource//xplat/graphics/igl/public/shell/openxr
Browse files Browse the repository at this point in the history
Reviewed By: nlutsenko

Differential Revision: D67133102

fbshipit-source-id: 2122c51f4b39457183c6490eb9231655e809456e
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Dec 12, 2024
1 parent a8e15fe commit d48d29b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion shell/openxr/XrSwapchainProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <igl/Texture.h>

// forward declarations
namespace igl::shell::openxr::impl {} // namespace igl::shell::openxr::impl

namespace igl::shell::openxr {

Expand Down
16 changes: 8 additions & 8 deletions shell/openxr/mobile/AndroidMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#include "ShellScalingApi.h"
#endif // IGL_PLATFORM_WINDOWS

XrInstance gInstance_;
XrInstance getXrInstance() {
static XrInstance gInstance_;
static XrInstance getXrInstance() {
return gInstance_;
}

Expand Down Expand Up @@ -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<igl::shell::openxr::XrApp*>(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<igl::shell::openxr::XrApp*>(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<igl::shell::openxr::XrApp*>(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<igl::shell::openxr::XrApp*>(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<igl::shell::openxr::XrApp*>(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");
Expand Down
1 change: 0 additions & 1 deletion shell/openxr/mobile/XrApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#if IGL_PLATFORM_ANDROID
#include <android/asset_manager.h>
#include <android/log.h>
#include <android_native_app_glue.h>
#endif

Expand Down

0 comments on commit d48d29b

Please sign in to comment.