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

Commit f43f627f authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Add some options to macrobench"

parents 4a5b54fb 682573c8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ void JankTracker::dumpData(const ProfileData* data, int fd) {
    dprintf(fd, "\nTotal frames rendered: %u", data->totalFrameCount);
    dprintf(fd, "\nJanky frames: %u (%.2f%%)", data->jankFrameCount,
            (float) data->jankFrameCount / (float) data->totalFrameCount * 100.0f);
    dprintf(fd, "\n50th percentile: %ums", findPercentile(data, 50));
    dprintf(fd, "\n90th percentile: %ums", findPercentile(data, 90));
    dprintf(fd, "\n95th percentile: %ums", findPercentile(data, 95));
    dprintf(fd, "\n99th percentile: %ums", findPercentile(data, 99));
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ int Properties::overrideSpotShadowStrength = -1;
ProfileType Properties::sProfileType = ProfileType::None;
bool Properties::sDisableProfileBars = false;

bool Properties::waitForGpuCompletion = false;

static int property_get_int(const char* key, int defaultValue) {
    char buf[PROPERTY_VALUE_MAX] = {'\0',};

+3 −0
Original line number Diff line number Diff line
@@ -285,6 +285,9 @@ public:

    static ProfileType getProfileType();

    // Should be used only by test apps
    static bool waitForGpuCompletion;

private:
    static ProfileType sProfileType;
    static bool sDisableProfileBars;
+5 −6
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@

#define GLES_VERSION 2

#define WAIT_FOR_GPU_COMPLETION 0

// Android-specific addition that is used to show when frames began in systrace
EGLAPI void EGLAPIENTRY eglBeginFrame(EGLDisplay dpy, EGLSurface surface);

@@ -179,7 +177,10 @@ void EglManager::loadConfig() {
}

void EglManager::createContext() {
    EGLint attribs[] = { EGL_CONTEXT_CLIENT_VERSION, GLES_VERSION, EGL_NONE };
    EGLint attribs[] = {
            EGL_CONTEXT_CLIENT_VERSION, GLES_VERSION,
            EGL_NONE
    };
    mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT, attribs);
    LOG_ALWAYS_FATAL_IF(mEglContext == EGL_NO_CONTEXT,
        "Failed to create context, error = %s", egl_error_str());
@@ -318,12 +319,10 @@ void EglManager::damageFrame(const Frame& frame, const SkRect& dirty) {

bool EglManager::swapBuffers(const Frame& frame, const SkRect& screenDirty) {

#if WAIT_FOR_GPU_COMPLETION
    {
    if (CC_UNLIKELY(Properties::waitForGpuCompletion)) {
        ATRACE_NAME("Finishing GPU work");
        fence();
    }
#endif

    EGLint rects[4];
    frame.map(screenDirty, rects);
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ class TestScene {
public:
    struct Options {
        int count = 0;
        int reportFrametimeWeight = 0;
    };

    template <class T>
Loading