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

Commit b5eb4f55 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Benchmark-mode for macrobench"

parents 152d997f f1480761
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -127,6 +127,9 @@ hwui_cflags := \
# a problem
hwui_cflags += -Wno-free-nonheap-object

# clang's warning is broken, see: https://llvm.org/bugs/show_bug.cgi?id=21629
hwui_cflags += -Wno-missing-braces

ifeq (true, $(HWUI_NEW_OPS))
    hwui_src_files += \
        BakedOpDispatcher.cpp \
@@ -309,6 +312,7 @@ LOCAL_C_INCLUDES := $(hwui_c_includes)
# set to libhwui_static_debug to skip actual GL commands
LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static
LOCAL_SHARED_LIBRARIES := libmemunreachable
LOCAL_STATIC_LIBRARIES := libgoogle-benchmark

LOCAL_SRC_FILES += \
    $(hwui_test_common_src_files) \
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ ProfileType Properties::sProfileType = ProfileType::None;
bool Properties::sDisableProfileBars = false;

bool Properties::waitForGpuCompletion = false;
bool Properties::forceDrawFrame = false;

bool Properties::filterOutTestOverhead = false;

+1 −0
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ public:

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

    // Should only be set by automated tests to try and filter out
    // any overhead they add
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo,
        return;
    }

    if (CC_LIKELY(mSwapHistory.size())) {
    if (CC_LIKELY(mSwapHistory.size() && !Properties::forceDrawFrame)) {
        nsecs_t latestVsync = mRenderThread.timeLord().latestVsync();
        const SwapHistory& lastSwap = mSwapHistory.back();
        nsecs_t vsyncDelta = std::abs(lastSwap.vsyncTime - latestVsync);
+13 −0
Original line number Diff line number Diff line
@@ -442,6 +442,19 @@ void RenderProxy::resetProfileInfo() {
    postAndWait(task);
}

CREATE_BRIDGE2(frameTimePercentile, RenderThread* thread, int percentile) {
    return reinterpret_cast<void*>(static_cast<uintptr_t>(
        args->thread->jankTracker().findPercentile(args->percentile)));
}

uint32_t RenderProxy::frameTimePercentile(int p) {
    SETUP_TASK(frameTimePercentile);
    args->thread = &mRenderThread;
    args->percentile = p;
    return static_cast<uint32_t>(reinterpret_cast<uintptr_t>(
        postAndWait(task)));
}

CREATE_BRIDGE2(dumpGraphicsMemory, int fd, RenderThread* thread) {
    args->thread->jankTracker().dump(args->fd);

Loading