Loading libs/hwui/renderthread/CanvasContext.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ void CanvasContext::setSurface(sp<Surface>&& surface, bool enableTimeout) { // Enable frame stats after the surface has been bound to the appropriate graphics API. // Order is important when new and old surfaces are the same, because old surface has // its frame stats disabled automatically. mNativeSurface->enableFrameTimestamps(true); native_window_enable_frame_timestamps(mNativeSurface->getNativeWindow(), true); } else { mRenderThread.removeFrameCallback(this); mGenerationID++; Loading Loading @@ -556,8 +556,9 @@ void CanvasContext::draw() { FrameInfo* forthBehind = mLast4FrameInfos.front().first; int64_t composedFrameId = mLast4FrameInfos.front().second; nsecs_t acquireTime = -1; mNativeSurface->getFrameTimestamps(composedFrameId, nullptr, &acquireTime, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); native_window_get_frame_timestamps(mNativeSurface->getNativeWindow(), composedFrameId, nullptr, &acquireTime, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); // Ignore default -1, NATIVE_WINDOW_TIMESTAMP_INVALID and NATIVE_WINDOW_TIMESTAMP_PENDING forthBehind->set(FrameInfoIndex::GpuCompleted) = acquireTime > 0 ? acquireTime : -1; mJankTracker.finishGpuDraw(*forthBehind); Loading libs/hwui/renderthread/ReliableSurface.h +0 −15 Original line number Diff line number Diff line Loading @@ -49,21 +49,6 @@ public: return ret; } status_t getFrameTimestamps(uint64_t frameNumber, nsecs_t* outRequestedPresentTime, nsecs_t* outAcquireTime, nsecs_t* outLatchTime, nsecs_t* outFirstRefreshStartTime, nsecs_t* outLastRefreshStartTime, nsecs_t* outGlCompositionDoneTime, nsecs_t* outDisplayPresentTime, nsecs_t* outDequeueReadyTime, nsecs_t* outReleaseTime) { return mSurface->getFrameTimestamps(frameNumber, outRequestedPresentTime, outAcquireTime, outLatchTime, outFirstRefreshStartTime, outLastRefreshStartTime, outGlCompositionDoneTime, outDisplayPresentTime, outDequeueReadyTime, outReleaseTime); } void enableFrameTimestamps(bool enable) { return mSurface->enableFrameTimestamps(enable); } private: sp<Surface> mSurface; Loading Loading
libs/hwui/renderthread/CanvasContext.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ void CanvasContext::setSurface(sp<Surface>&& surface, bool enableTimeout) { // Enable frame stats after the surface has been bound to the appropriate graphics API. // Order is important when new and old surfaces are the same, because old surface has // its frame stats disabled automatically. mNativeSurface->enableFrameTimestamps(true); native_window_enable_frame_timestamps(mNativeSurface->getNativeWindow(), true); } else { mRenderThread.removeFrameCallback(this); mGenerationID++; Loading Loading @@ -556,8 +556,9 @@ void CanvasContext::draw() { FrameInfo* forthBehind = mLast4FrameInfos.front().first; int64_t composedFrameId = mLast4FrameInfos.front().second; nsecs_t acquireTime = -1; mNativeSurface->getFrameTimestamps(composedFrameId, nullptr, &acquireTime, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); native_window_get_frame_timestamps(mNativeSurface->getNativeWindow(), composedFrameId, nullptr, &acquireTime, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); // Ignore default -1, NATIVE_WINDOW_TIMESTAMP_INVALID and NATIVE_WINDOW_TIMESTAMP_PENDING forthBehind->set(FrameInfoIndex::GpuCompleted) = acquireTime > 0 ? acquireTime : -1; mJankTracker.finishGpuDraw(*forthBehind); Loading
libs/hwui/renderthread/ReliableSurface.h +0 −15 Original line number Diff line number Diff line Loading @@ -49,21 +49,6 @@ public: return ret; } status_t getFrameTimestamps(uint64_t frameNumber, nsecs_t* outRequestedPresentTime, nsecs_t* outAcquireTime, nsecs_t* outLatchTime, nsecs_t* outFirstRefreshStartTime, nsecs_t* outLastRefreshStartTime, nsecs_t* outGlCompositionDoneTime, nsecs_t* outDisplayPresentTime, nsecs_t* outDequeueReadyTime, nsecs_t* outReleaseTime) { return mSurface->getFrameTimestamps(frameNumber, outRequestedPresentTime, outAcquireTime, outLatchTime, outFirstRefreshStartTime, outLastRefreshStartTime, outGlCompositionDoneTime, outDisplayPresentTime, outDequeueReadyTime, outReleaseTime); } void enableFrameTimestamps(bool enable) { return mSurface->enableFrameTimestamps(enable); } private: sp<Surface> mSurface; Loading