From 4e606e3901b500bdd0f3ea21b8cb63734087bf0a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 16 Mar 2017 15:34:57 -0700 Subject: egl: Remove retire event. Test: adb shell /data/nativetest/libgui_test/libgui_test --gtest_filter=*GetFrameTimestamps* Change-Id: Ibf63d22e42ae52307662107eec50f80de0e703f5 --- include/gui/FrameTimestamps.h | 14 ++------------ include/gui/ISurfaceComposer.h | 5 ----- include/gui/Surface.h | 9 ++------- 3 files changed, 4 insertions(+), 24 deletions(-) (limited to 'include/gui') diff --git a/include/gui/FrameTimestamps.h b/include/gui/FrameTimestamps.h index cbb44910b9..92251edca6 100644 --- a/include/gui/FrameTimestamps.h +++ b/include/gui/FrameTimestamps.h @@ -43,7 +43,6 @@ enum class FrameEvent { LAST_REFRESH_START, GPU_COMPOSITION_DONE, DISPLAY_PRESENT, - DISPLAY_RETIRE, DEQUEUE_READY, RELEASE, EVENT_COUNT, // Not an actual event. @@ -70,7 +69,6 @@ struct FrameEvents { bool hasAcquireInfo() const; bool hasGpuCompositionDoneInfo() const; bool hasDisplayPresentInfo() const; - bool hasDisplayRetireInfo() const; bool hasReleaseInfo() const; bool hasDequeueReadyInfo() const; @@ -85,7 +83,6 @@ struct FrameEvents { // encountered help us determine if timestamps aren't available because // a) we'll just never get them or b) they're not ready yet. bool addPostCompositeCalled{false}; - bool addRetireCalled{false}; bool addReleaseCalled{false}; nsecs_t postedTime{TIMESTAMP_PENDING}; @@ -98,7 +95,6 @@ struct FrameEvents { std::shared_ptr acquireFence{FenceTime::NO_FENCE}; std::shared_ptr gpuCompositionDoneFence{FenceTime::NO_FENCE}; std::shared_ptr displayPresentFence{FenceTime::NO_FENCE}; - std::shared_ptr displayRetireFence{FenceTime::NO_FENCE}; std::shared_ptr releaseFence{FenceTime::NO_FENCE}; }; @@ -167,7 +163,6 @@ protected: FenceTimeline mAcquireTimeline; FenceTimeline mGpuCompositionDoneTimeline; FenceTimeline mPresentTimeline; - FenceTimeline mRetireTimeline; FenceTimeline mReleaseTimeline; }; @@ -224,8 +219,6 @@ public: const std::shared_ptr& gpuCompositionDone, const std::shared_ptr& displayPresent, const CompositorTiming& compositorTiming); - void addRetire(uint64_t frameNumber, - const std::shared_ptr& displayRetire); void addRelease(uint64_t frameNumber, nsecs_t dequeueReadyTime, std::shared_ptr&& release); @@ -239,7 +232,6 @@ private: size_t mQueueOffset{0}; size_t mCompositionOffset{0}; - size_t mRetireOffset{0}; size_t mReleaseOffset{0}; int mCurrentConnectId{0}; @@ -281,7 +273,6 @@ private: uint64_t mFrameNumber{0}; bool mAddPostCompositeCalled{0}; - bool mAddRetireCalled{0}; bool mAddReleaseCalled{0}; nsecs_t mPostedTime{FrameEvents::TIMESTAMP_PENDING}; @@ -293,17 +284,16 @@ private: FenceTime::Snapshot mGpuCompositionDoneFence; FenceTime::Snapshot mDisplayPresentFence; - FenceTime::Snapshot mDisplayRetireFence; FenceTime::Snapshot mReleaseFence; // This is a static method with an auto return value so we can call // it without needing const and non-const versions. template static inline auto allFences(ThisT fed) -> - std::arraymReleaseFence), 4> { + std::arraymReleaseFence), 3> { return {{ &fed->mGpuCompositionDoneFence, &fed->mDisplayPresentFence, - &fed->mDisplayRetireFence, &fed->mReleaseFence + &fed->mReleaseFence }}; } }; diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h index 9870ba0715..2fbe07aa57 100644 --- a/include/gui/ISurfaceComposer.h +++ b/include/gui/ISurfaceComposer.h @@ -126,11 +126,6 @@ public: virtual bool authenticateSurfaceTexture( const sp& surface) const = 0; - /* Returns the frame timestamps supported by SurfaceFlinger. - */ - virtual status_t getSupportedFrameTimestamps( - std::vector* outSupported) const = 0; - /* set display power mode. depending on the mode, it can either trigger * screen on, off or low power mode and wait for it to complete. * requires ACCESS_SURFACE_FLINGER permission. diff --git a/include/gui/Surface.h b/include/gui/Surface.h index cfc68c6203..62f6cadece 100644 --- a/include/gui/Surface.h +++ b/include/gui/Surface.h @@ -152,8 +152,8 @@ public: nsecs_t* outRequestedPresentTime, nsecs_t* outAcquireTime, nsecs_t* outLatchTime, nsecs_t* outFirstRefreshStartTime, nsecs_t* outLastRefreshStartTime, nsecs_t* outGlCompositionDoneTime, - nsecs_t* outDisplayPresentTime, nsecs_t* outDisplayRetireTime, - nsecs_t* outDequeueReadyTime, nsecs_t* outReleaseTime); + nsecs_t* outDisplayPresentTime, nsecs_t* outDequeueReadyTime, + nsecs_t* outReleaseTime); status_t getWideColorSupport(bool* supported); status_t getHdrSupport(bool* supported); @@ -411,11 +411,6 @@ protected: uint64_t mNextFrameNumber = 1; uint64_t mLastFrameNumber = 0; - // Mutable because ANativeWindow::query needs this class const. - mutable bool mQueriedSupportedTimestamps; - mutable bool mFrameTimestampsSupportsPresent; - mutable bool mFrameTimestampsSupportsRetire; - // A cached copy of the FrameEventHistory maintained by the consumer. bool mEnableFrameTimestamps = false; std::unique_ptr mFrameEventHistory; -- cgit v1.2.3-59-g8ed1b