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
diff --git a/opengl/tests/hwc/hwcColorEquiv.cpp b/opengl/tests/hwc/hwcColorEquiv.cpp
index 160906d..c4624d2 100644
--- a/opengl/tests/hwc/hwcColorEquiv.cpp
+++ b/opengl/tests/hwc/hwcColorEquiv.cpp
@@ -85,7 +85,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
#define LOG_TAG "hwcColorEquivTest"
diff --git a/opengl/tests/hwc/hwcCommit.cpp b/opengl/tests/hwc/hwcCommit.cpp
index 3681fbb..1bd5fdf 100644
--- a/opengl/tests/hwc/hwcCommit.cpp
+++ b/opengl/tests/hwc/hwcCommit.cpp
@@ -96,7 +96,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
#define LOG_TAG "hwcCommitTest"
diff --git a/opengl/tests/hwc/hwcRects.cpp b/opengl/tests/hwc/hwcRects.cpp
index ec0403f..9b57623 100644
--- a/opengl/tests/hwc/hwcRects.cpp
+++ b/opengl/tests/hwc/hwcRects.cpp
@@ -104,7 +104,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
#define LOG_TAG "hwcRectsTest"
diff --git a/opengl/tests/hwc/hwcStress.cpp b/opengl/tests/hwc/hwcStress.cpp
index dfaa6c1..b1d6c76 100644
--- a/opengl/tests/hwc/hwcStress.cpp
+++ b/opengl/tests/hwc/hwcStress.cpp
@@ -101,7 +101,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
#define LOG_TAG "hwcStressTest"
diff --git a/opengl/tests/hwc/hwcTestLib.cpp b/opengl/tests/hwc/hwcTestLib.cpp
index 9b224e2..7fae5e5 100644
--- a/opengl/tests/hwc/hwcTestLib.cpp
+++ b/opengl/tests/hwc/hwcTestLib.cpp
@@ -80,7 +80,11 @@
exit(71);
}
- EGLNativeWindowType window = android_createDisplaySurface();
+ // The tests want to stop the framework and play with the hardware
+ // composer, which means it doesn't make sense to use WindowSurface
+ // here. android_createDisplaySurface() is going away, so just
+ // politely fail here.
+ EGLNativeWindowType window = NULL; //android_createDisplaySurface();
if (window == NULL) {
testPrintE("android_createDisplaySurface failed");
exit(72);
diff --git a/opengl/tests/hwc/hwcTestLib.h b/opengl/tests/hwc/hwcTestLib.h
index d403308..a942c10 100644
--- a/opengl/tests/hwc/hwcTestLib.h
+++ b/opengl/tests/hwc/hwcTestLib.h
@@ -27,7 +27,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
#include <utils/Log.h>