Hardware Composer Commit Points Benchmark
Change-Id: Ie997d13559c0e4e9dc3babfe92ca1acacef2a549
This commit is contained in:
parent
e9c8c2206e
commit
653f810879
@ -124,3 +124,33 @@ LOCAL_MODULE_TAGS := tests
|
||||
LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
|
||||
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES:= hwcCommit.cpp
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libEGL \
|
||||
libGLESv2 \
|
||||
libui \
|
||||
libhardware \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libtestUtil \
|
||||
libglTest \
|
||||
libhwcTest \
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
system/extras/tests/include \
|
||||
hardware/libhardware/include \
|
||||
frameworks/base/opengl/tests \
|
||||
frameworks/base/opengl/tests/include \
|
||||
|
||||
LOCAL_MODULE:= hwcCommit
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativebenchmark
|
||||
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
|
||||
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
@ -176,6 +176,8 @@ main(int argc, char *argv[])
|
||||
|
||||
assert(refFormat != NULL);
|
||||
|
||||
testSetLogCatTag(LOG_TAG);
|
||||
|
||||
// Parse command line arguments
|
||||
while ((opt = getopt(argc, argv, "vs:e:r:D:?h")) != -1) {
|
||||
switch (opt) {
|
||||
|
1420
opengl/tests/hwc/hwcCommit.cpp
Normal file
1420
opengl/tests/hwc/hwcCommit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@
|
||||
* hwcRects [options] (graphicFormat displayFrame [attributes],)...
|
||||
* options:
|
||||
* -D #.## - End of test delay
|
||||
* -v Verbose");
|
||||
* -v - Verbose
|
||||
*
|
||||
* graphic formats:
|
||||
* RGBA8888 (reference frame default)
|
||||
@ -108,7 +108,7 @@
|
||||
#include <ui/GraphicBuffer.h>
|
||||
#include <ui/EGLUtils.h>
|
||||
|
||||
#define LOG_TAG "hwcColorEquivTest"
|
||||
#define LOG_TAG "hwcRectsTest"
|
||||
#include <utils/Log.h>
|
||||
#include <testUtil.h>
|
||||
|
||||
@ -210,6 +210,8 @@ main(int argc, char *argv[])
|
||||
string str;
|
||||
char cmd[MAXCMD];
|
||||
|
||||
testSetLogCatTag(LOG_TAG);
|
||||
|
||||
// Parse command line arguments
|
||||
while ((opt = getopt(argc, argv, "D:v?h")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -174,6 +174,19 @@ HwcTestDim::operator string()
|
||||
return out.str();
|
||||
}
|
||||
|
||||
// Dimension class to hwc_rect conversion
|
||||
HwcTestDim::operator hwc_rect() const
|
||||
{
|
||||
hwc_rect rect;
|
||||
|
||||
rect.left = rect.top = 0;
|
||||
|
||||
rect.right = this->_w;
|
||||
rect.bottom = this->_h;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
// Hardware Composer rectangle to string conversion
|
||||
string hwcTestRect2str(const struct hwc_rect& rect)
|
||||
{
|
||||
@ -349,6 +362,21 @@ const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(const char *desc)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Look up and return pointer to structure with the characteristics
|
||||
// of the graphic format specified by the id parameter. Search failure
|
||||
// indicated by the return of NULL.
|
||||
const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(uint32_t id)
|
||||
{
|
||||
for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
|
||||
if (id == hwcTestGraphicFormat[n1].format) {
|
||||
return &hwcTestGraphicFormat[n1];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
// Given the integer ID of a graphic format, return a pointer to
|
||||
// a string that describes the format.
|
||||
const char *hwcTestGraphicFormat2str(uint32_t format)
|
||||
|
@ -98,6 +98,7 @@ class HwcTestDim {
|
||||
void setHeight(uint32_t h) { _h = h; }
|
||||
|
||||
operator std::string();
|
||||
operator hwc_rect() const;
|
||||
|
||||
private:
|
||||
uint32_t _w;
|
||||
@ -109,6 +110,7 @@ void hwcTestInitDisplay(bool verbose, EGLDisplay *dpy, EGLSurface *surface,
|
||||
EGLint *width, EGLint *height);
|
||||
void hwcTestOpenHwc(hwc_composer_device_t **hwcDevicePtr);
|
||||
const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(const char *desc);
|
||||
const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(uint32_t id);
|
||||
const char *hwcTestGraphicFormat2str(uint32_t format);
|
||||
std::string hwcTestRect2str(const struct hwc_rect& rect);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user