Loading libs/hwui/JankTracker.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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)); Loading libs/hwui/Properties.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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',}; Loading libs/hwui/Properties.h +3 −0 Original line number Diff line number Diff line Loading @@ -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; Loading libs/hwui/renderthread/EglManager.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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()); Loading Loading @@ -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); Loading libs/hwui/tests/common/TestScene.h +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ class TestScene { public: struct Options { int count = 0; int reportFrametimeWeight = 0; }; template <class T> Loading Loading
libs/hwui/JankTracker.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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)); Loading
libs/hwui/Properties.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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',}; Loading
libs/hwui/Properties.h +3 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
libs/hwui/renderthread/EglManager.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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()); Loading Loading @@ -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); Loading
libs/hwui/tests/common/TestScene.h +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ class TestScene { public: struct Options { int count = 0; int reportFrametimeWeight = 0; }; template <class T> Loading