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

Commit b04c6f03 authored by Brian Anderson's avatar Brian Anderson
Browse files

Change GL references to GPU for getFrameTimestamps.

Test: Rename only.

Change-Id: Idaf7ab38f78f58aa8387823f47dac084e21eb1f0
parent 8cc8b10e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ enum class FrameEvent {
    ACQUIRE,
    FIRST_REFRESH_START,
    LAST_REFRESH_START,
    GL_COMPOSITION_DONE,
    GPU_COMPOSITION_DONE,
    DISPLAY_PRESENT,
    DISPLAY_RETIRE,
    DEQUEUE_READY,
+2 −2
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ void ConsumerFrameEventHistory::addPostComposition(uint64_t frameNumber,
    if (!frame->addPostCompositeCalled) {
        frame->addPostCompositeCalled = true;
        frame->gpuCompositionDoneFence = gpuCompositionDone;
        mFramesDirty[mCompositionOffset].setDirty<FrameEvent::GL_COMPOSITION_DONE>();
        mFramesDirty[mCompositionOffset].setDirty<FrameEvent::GPU_COMPOSITION_DONE>();
        if (!frame->displayPresentFence->isValid()) {
            frame->displayPresentFence = displayPresent;
            mFramesDirty[mCompositionOffset].setDirty<FrameEvent::DISPLAY_PRESENT>();
@@ -511,7 +511,7 @@ FrameEventsDelta::FrameEventsDelta(
      mFirstRefreshStartTime(frameTimestamps.firstRefreshStartTime),
      mLastRefreshStartTime(frameTimestamps.lastRefreshStartTime),
      mDequeueReadyTime(frameTimestamps.dequeueReadyTime) {
    if (dirtyFields.isDirty<FrameEvent::GL_COMPOSITION_DONE>()) {
    if (dirtyFields.isDirty<FrameEvent::GPU_COMPOSITION_DONE>()) {
        mGpuCompositionDoneFence =
                frameTimestamps.gpuCompositionDoneFence->getSnapshot();
    }
+8 −8
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static bool checkConsumerForUpdates(
        const nsecs_t* outLatchTime,
        const nsecs_t* outFirstRefreshStartTime,
        const nsecs_t* outLastRefreshStartTime,
        const nsecs_t* outGlCompositionDoneTime,
        const nsecs_t* outGpuCompositionDoneTime,
        const nsecs_t* outDisplayPresentTime,
        const nsecs_t* outDisplayRetireTime,
        const nsecs_t* outDequeueReadyTime,
@@ -204,7 +204,7 @@ static bool checkConsumerForUpdates(
    bool checkForLatch = (outLatchTime != nullptr) && !e->hasLatchInfo();
    bool checkForFirstRefreshStart = (outFirstRefreshStartTime != nullptr) &&
            !e->hasFirstRefreshStartInfo();
    bool checkForGlCompositionDone = (outGlCompositionDoneTime != nullptr) &&
    bool checkForGpuCompositionDone = (outGpuCompositionDoneTime != nullptr) &&
            !e->hasGpuCompositionDoneInfo();
    bool checkForDisplayPresent = (outDisplayPresentTime != nullptr) &&
            !e->hasDisplayPresentInfo();
@@ -223,7 +223,7 @@ static bool checkConsumerForUpdates(

    // RequestedPresent and Acquire info are always available producer-side.
    return checkForLatch || checkForFirstRefreshStart ||
            checkForLastRefreshStart || checkForGlCompositionDone ||
            checkForLastRefreshStart || checkForGpuCompositionDone ||
            checkForDisplayPresent || checkForDisplayRetire ||
            checkForDequeueReady || checkForRelease;
}
@@ -244,7 +244,7 @@ static void getFrameTimestampFence(nsecs_t *dst, const std::shared_ptr<FenceTime
status_t Surface::getFrameTimestamps(uint64_t frameNumber,
        nsecs_t* outRequestedPresentTime, nsecs_t* outAcquireTime,
        nsecs_t* outLatchTime, nsecs_t* outFirstRefreshStartTime,
        nsecs_t* outLastRefreshStartTime, nsecs_t* outGlCompositionDoneTime,
        nsecs_t* outLastRefreshStartTime, nsecs_t* outGpuCompositionDoneTime,
        nsecs_t* outDisplayPresentTime, nsecs_t* outDisplayRetireTime,
        nsecs_t* outDequeueReadyTime, nsecs_t* outReleaseTime) {
    ATRACE_CALL();
@@ -274,7 +274,7 @@ status_t Surface::getFrameTimestamps(uint64_t frameNumber,
    // Update our cache of events if the requested events are not available.
    if (checkConsumerForUpdates(events, mLastFrameNumber,
            outLatchTime, outFirstRefreshStartTime, outLastRefreshStartTime,
            outGlCompositionDoneTime, outDisplayPresentTime,
            outGpuCompositionDoneTime, outDisplayPresentTime,
            outDisplayRetireTime, outDequeueReadyTime, outReleaseTime)) {
        FrameEventHistoryDelta delta;
        mGraphicBufferProducer->getFrameTimestamps(&delta);
@@ -296,7 +296,7 @@ status_t Surface::getFrameTimestamps(uint64_t frameNumber,

    getFrameTimestampFence(outAcquireTime, events->acquireFence);
    getFrameTimestampFence(
            outGlCompositionDoneTime, events->gpuCompositionDoneFence);
            outGpuCompositionDoneTime, events->gpuCompositionDoneFence);
    getFrameTimestampFence(
            outDisplayPresentTime, events->displayPresentFence);
    getFrameTimestampFence(outDisplayRetireTime, events->displayRetireFence);
@@ -1032,7 +1032,7 @@ int Surface::dispatchGetFrameTimestamps(va_list args) {
    nsecs_t* outLatchTime = va_arg(args, int64_t*);
    nsecs_t* outFirstRefreshStartTime = va_arg(args, int64_t*);
    nsecs_t* outLastRefreshStartTime = va_arg(args, int64_t*);
    nsecs_t* outGlCompositionDoneTime = va_arg(args, int64_t*);
    nsecs_t* outGpuCompositionDoneTime = va_arg(args, int64_t*);
    nsecs_t* outDisplayPresentTime = va_arg(args, int64_t*);
    nsecs_t* outDisplayRetireTime = va_arg(args, int64_t*);
    nsecs_t* outDequeueReadyTime = va_arg(args, int64_t*);
@@ -1040,7 +1040,7 @@ int Surface::dispatchGetFrameTimestamps(va_list args) {
    return getFrameTimestamps(frameId,
            outRequestedPresentTime, outAcquireTime, outLatchTime,
            outFirstRefreshStartTime, outLastRefreshStartTime,
            outGlCompositionDoneTime, outDisplayPresentTime,
            outGpuCompositionDoneTime, outDisplayPresentTime,
            outDisplayRetireTime, outDequeueReadyTime, outReleaseTime);
}

+1 −1
Original line number Diff line number Diff line
@@ -364,7 +364,7 @@ public:
                FrameEvent::LATCH,
                FrameEvent::FIRST_REFRESH_START,
                FrameEvent::LAST_REFRESH_START,
                FrameEvent::GL_COMPOSITION_DONE,
                FrameEvent::GPU_COMPOSITION_DONE,
                FrameEvent::DEQUEUE_READY,
                FrameEvent::RELEASE
        };
+1 −1
Original line number Diff line number Diff line
@@ -640,7 +640,7 @@ typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDROID) (co
#define EGL_COMPOSITION_LATCH_TIME_ANDROID 0x3153
#define EGL_FIRST_COMPOSITION_START_TIME_ANDROID 0x3154
#define EGL_LAST_COMPOSITION_START_TIME_ANDROID 0x3155
#define EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID 0x3156
#define EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID 0x3156
#define EGL_DISPLAY_PRESENT_TIME_ANDROID 0x3157
#define EGL_DISPLAY_RETIRE_TIME_ANDROID 0x3158
#define EGL_DEQUEUE_READY_TIME_ANDROID 0x3159
Loading