Commit a60d825a by Greg Hartman

Break the dependency on the wrapper libEGL.

This was causing dlsym to return the pointer to the wrapper's function when SwiftShader didn't support an entry point. Bug 25152138 Change-Id: I92d1c9258c823acf0dc60dca9dc3d7dd552512b3 Reviewed-on: https://swiftshader-review.googlesource.com/4120Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarGreg Hartman <ghartman@google.com>
parent 234e2fc5
...@@ -85,8 +85,6 @@ typedef void *EGLNativePixmapType; ...@@ -85,8 +85,6 @@ typedef void *EGLNativePixmapType;
#elif defined(__ANDROID__) || defined(ANDROID) #elif defined(__ANDROID__) || defined(ANDROID)
#include <android/native_window.h>
struct egl_native_pixmap_t; struct egl_native_pixmap_t;
typedef struct ANativeWindow* EGLNativeWindowType; typedef struct ANativeWindow* EGLNativeWindowType;
......
...@@ -29,7 +29,6 @@ COMMON_STATIC_LIBRARIES := \ ...@@ -29,7 +29,6 @@ COMMON_STATIC_LIBRARIES := \
COMMON_SHARED_LIBRARIES := \ COMMON_SHARED_LIBRARIES := \
libdl \ libdl \
liblog \ liblog \
libandroid \
libutils \ libutils \
libcutils \ libcutils \
libhardware \ libhardware \
......
...@@ -230,6 +230,22 @@ WindowSurface::WindowSurface(Display *display, const Config *config, EGLNativeWi ...@@ -230,6 +230,22 @@ WindowSurface::WindowSurface(Display *display, const Config *config, EGLNativeWi
frameBuffer = nullptr; frameBuffer = nullptr;
} }
#ifdef __ANDROID__
static int32_t getWindowProp(ANativeWindow* window, int what) {
int value;
int res = window->query(window, what, &value);
return res < 0 ? res : value;
}
static int32_t ANativeWindow_getHeight(ANativeWindow* window) {
return getWindowProp(window, NATIVE_WINDOW_HEIGHT);
}
static int32_t ANativeWindow_getWidth(ANativeWindow* window) {
return getWindowProp(window, NATIVE_WINDOW_WIDTH);
}
#endif
bool WindowSurface::initialize() bool WindowSurface::initialize()
{ {
ASSERT(!frameBuffer && !backBuffer && !depthStencil); ASSERT(!frameBuffer && !backBuffer && !depthStencil);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment