mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7.
Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624
Original change's description:
> Load entry points dynamically in tests and samples.
>
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
>
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
>
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
>
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
>
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org
Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
@@ -6,31 +6,36 @@
|
||||
|
||||
// AndroidWindow.cpp: Implementation of OSWindow for Android
|
||||
|
||||
#include "util/android/AndroidWindow.h"
|
||||
#include "android/AndroidWindow.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "android/third_party/android_native_app_glue.h"
|
||||
#include "common/debug.h"
|
||||
#include "util/android/third_party/android_native_app_glue.h"
|
||||
#include "util/egl_loader_autogen.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
struct android_app *sApp = nullptr;
|
||||
pthread_mutex_t sInitWindowMutex;
|
||||
pthread_cond_t sInitWindowCond;
|
||||
bool sInitWindowDone = false;
|
||||
struct android_app *sApp = nullptr;
|
||||
pthread_mutex_t sInitWindowMutex;
|
||||
pthread_cond_t sInitWindowCond;
|
||||
bool sInitWindowDone = false;
|
||||
} // namespace
|
||||
|
||||
AndroidWindow::AndroidWindow() {}
|
||||
AndroidWindow::AndroidWindow()
|
||||
{
|
||||
}
|
||||
|
||||
AndroidWindow::~AndroidWindow() {}
|
||||
AndroidWindow::~AndroidWindow()
|
||||
{
|
||||
}
|
||||
|
||||
bool AndroidWindow::initialize(const std::string &name, size_t width, size_t height)
|
||||
{
|
||||
return resize(width, height);
|
||||
}
|
||||
void AndroidWindow::destroy() {}
|
||||
void AndroidWindow::destroy()
|
||||
{
|
||||
}
|
||||
|
||||
EGLNativeWindowType AndroidWindow::getNativeWindow() const
|
||||
{
|
||||
@@ -63,7 +68,7 @@ bool AndroidWindow::setPosition(int x, int y)
|
||||
|
||||
bool AndroidWindow::resize(int width, int height)
|
||||
{
|
||||
mWidth = width;
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
|
||||
// sApp->window used below is valid only after Activity Surface is created
|
||||
@@ -80,7 +85,9 @@ bool AndroidWindow::resize(int width, int height)
|
||||
return err == 0;
|
||||
}
|
||||
|
||||
void AndroidWindow::setVisible(bool isVisible) {}
|
||||
void AndroidWindow::setVisible(bool isVisible)
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidWindow::signalTestEvent()
|
||||
{
|
||||
@@ -107,11 +114,11 @@ static void onAppCmd(struct android_app *app, int32_t cmd)
|
||||
pthread_cond_broadcast(&sInitWindowCond);
|
||||
pthread_mutex_unlock(&sInitWindowMutex);
|
||||
break;
|
||||
// TODO: process other commands and pass them to AndroidWindow for handling
|
||||
// TODO: figure out how to handle APP_CMD_PAUSE,
|
||||
// which should immediately halt all the rendering,
|
||||
// since Activity Surface is no longer available.
|
||||
// Currently tests crash when paused, for example, due to device changing orientation
|
||||
// TODO: process other commands and pass them to AndroidWindow for handling
|
||||
// TODO: figure out how to handle APP_CMD_PAUSE,
|
||||
// which should immediately halt all the rendering,
|
||||
// since Activity Surface is no longer available.
|
||||
// Currently tests crash when paused, for example, due to device changing orientation
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +138,7 @@ void android_main(struct android_app *app)
|
||||
pthread_cond_init(&sInitWindowCond, nullptr);
|
||||
|
||||
// Event handlers, invoked from source->process()
|
||||
app->onAppCmd = onAppCmd;
|
||||
app->onAppCmd = onAppCmd;
|
||||
app->onInputEvent = onInputEvent;
|
||||
|
||||
// Message loop, polling for events indefinitely (due to -1 timeout)
|
||||
|
||||
Reference in New Issue
Block a user