Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb328d59 authored by Louis Huemiller's avatar Louis Huemiller Committed by Android (Google) Code Review
Browse files

Merge "Hardware Composer Commit Points Benchmark" into honeycomb

parents 102bf5b3 653f8108
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -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)
+2 −0
Original line number Diff line number Diff line
@@ -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 −0

File added.

Preview size limit exceeded, changes collapsed.

+4 −2
Original line number Diff line number Diff line
@@ -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) {
+28 −0
Original line number Diff line number Diff line
@@ -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)
Loading