summaryrefslogtreecommitdiffstats
path: root/opengl/tests/gl2_basic
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2014-03-05 15:06:53 -0800
committerAndy McFadden <fadden@android.com>2014-03-06 16:46:59 -0800
commit6ef57d7b368ebbac5f2b27c36a9032fee1cda8b1 (patch)
treeb3d4b6f7b16a28d4759711e1f79c6aa19d033449 /opengl/tests/gl2_basic
parentc0c6a0cd4cc2121ffb61576482758aa542acf215 (diff)
downloadframeworks_native-6ef57d7b368ebbac5f2b27c36a9032fee1cda8b1.zip
frameworks_native-6ef57d7b368ebbac5f2b27c36a9032fee1cda8b1.tar.gz
frameworks_native-6ef57d7b368ebbac5f2b27c36a9032fee1cda8b1.tar.bz2
Restore old OpenGL tests
These tests call android_createDisplaySurface() to get a FramebufferNativeWindow that is passed to EGL. This relies on the existence of the framebuffer HAL, which is not supported on many recent devices. This change adds a new "window surface" object that the tests can use to get a window from SurfaceFlinger instead. All tests except for the HWC tests now appear to do things. The HWC tests don't do anything useful, but they no longer depend on the android_createDisplaySurface() function. Bug 13323813 Change-Id: I2cbfbacb3452fb658c29e945b0c7ae7c94c1a4ba
Diffstat (limited to 'opengl/tests/gl2_basic')
-rw-r--r--opengl/tests/gl2_basic/Android.mk6
-rw-r--r--opengl/tests/gl2_basic/gl2_basic.cpp7
2 files changed, 9 insertions, 4 deletions
diff --git a/opengl/tests/gl2_basic/Android.mk b/opengl/tests/gl2_basic/Android.mk
index d7819a1..520395c 100644
--- a/opengl/tests/gl2_basic/Android.mk
+++ b/opengl/tests/gl2_basic/Android.mk
@@ -8,7 +8,11 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
libEGL \
libGLESv2 \
- libui
+ libui \
+ libgui \
+ libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
diff --git a/opengl/tests/gl2_basic/gl2_basic.cpp b/opengl/tests/gl2_basic/gl2_basic.cpp
index 7007871..cdbf1cf 100644
--- a/opengl/tests/gl2_basic/gl2_basic.cpp
+++ b/opengl/tests/gl2_basic/gl2_basic.cpp
@@ -26,8 +26,8 @@
#include <utils/Timers.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
using namespace android;
@@ -298,7 +298,8 @@ int main(int argc, char** argv) {
checkEglError("printEGLConfigurations");
- EGLNativeWindowType window = android_createDisplaySurface();
+ WindowSurface windowSurface;
+ EGLNativeWindowType window = windowSurface.getSurface();
returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
if (returnValue) {
printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);