Loading services/surfaceflinger/Layer.h +0 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,6 @@ public: void forceClientComposition(int32_t hwcId); bool getForceClientComposition(int32_t hwcId); virtual void setPerFrameData(const sp<const DisplayDevice>& displayDevice) = 0; void setUpFrameBuffer(const sp<const DisplayDevice>& displayDevice); // callIntoHwc exists so we can update our local state and call // acceptDisplayChanges without unnecessarily updating the device's state Loading services/surfaceflinger/SurfaceFlinger.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -1666,20 +1666,20 @@ void SurfaceFlinger::postComposition(nsecs_t refreshStartTime) // |mStateLock| not needed as we are on the main thread const sp<const DisplayDevice> hw(getDefaultDisplayDeviceLocked()); mGlCompositionDoneTimeline.updateSignalTimes(); getBE().mGlCompositionDoneTimeline.updateSignalTimes(); std::shared_ptr<FenceTime> glCompositionDoneFenceTime; if (getBE().mHwc->hasClientComposition(HWC_DISPLAY_PRIMARY)) { glCompositionDoneFenceTime = std::make_shared<FenceTime>(hw->getClientTargetAcquireFence()); mGlCompositionDoneTimeline.push(glCompositionDoneFenceTime); getBE().mGlCompositionDoneTimeline.push(glCompositionDoneFenceTime); } else { glCompositionDoneFenceTime = FenceTime::NO_FENCE; } mDisplayTimeline.updateSignalTimes(); getBE().mDisplayTimeline.updateSignalTimes(); sp<Fence> presentFence = getBE().mHwc->getPresentFence(HWC_DISPLAY_PRIMARY); auto presentFenceTime = std::make_shared<FenceTime>(presentFence); mDisplayTimeline.push(presentFenceTime); getBE().mDisplayTimeline.push(presentFenceTime); nsecs_t vsyncPhase = mPrimaryDispSync.computeNextRefresh(0); nsecs_t vsyncInterval = mPrimaryDispSync.getPeriod(); Loading services/surfaceflinger/SurfaceFlinger.h +3 −2 Original line number Diff line number Diff line Loading @@ -143,6 +143,9 @@ public: EGLContext mEGLContext; EGLDisplay mEGLDisplay; FenceTimeline mGlCompositionDoneTimeline; FenceTimeline mDisplayTimeline; // protected by mCompositorTimingLock; mutable std::mutex mCompositorTimingLock; CompositorTiming mCompositorTiming; Loading Loading @@ -734,8 +737,6 @@ private: std::vector<sp<Layer>> mLayersWithQueuedFrames; sp<Fence> mPreviousPresentFence = Fence::NO_FENCE; bool mHadClientComposition = false; FenceTimeline mGlCompositionDoneTimeline; FenceTimeline mDisplayTimeline; // this may only be written from the main thread with mStateLock held // it may be read from other threads with mStateLock held Loading Loading
services/surfaceflinger/Layer.h +0 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,6 @@ public: void forceClientComposition(int32_t hwcId); bool getForceClientComposition(int32_t hwcId); virtual void setPerFrameData(const sp<const DisplayDevice>& displayDevice) = 0; void setUpFrameBuffer(const sp<const DisplayDevice>& displayDevice); // callIntoHwc exists so we can update our local state and call // acceptDisplayChanges without unnecessarily updating the device's state Loading
services/surfaceflinger/SurfaceFlinger.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -1666,20 +1666,20 @@ void SurfaceFlinger::postComposition(nsecs_t refreshStartTime) // |mStateLock| not needed as we are on the main thread const sp<const DisplayDevice> hw(getDefaultDisplayDeviceLocked()); mGlCompositionDoneTimeline.updateSignalTimes(); getBE().mGlCompositionDoneTimeline.updateSignalTimes(); std::shared_ptr<FenceTime> glCompositionDoneFenceTime; if (getBE().mHwc->hasClientComposition(HWC_DISPLAY_PRIMARY)) { glCompositionDoneFenceTime = std::make_shared<FenceTime>(hw->getClientTargetAcquireFence()); mGlCompositionDoneTimeline.push(glCompositionDoneFenceTime); getBE().mGlCompositionDoneTimeline.push(glCompositionDoneFenceTime); } else { glCompositionDoneFenceTime = FenceTime::NO_FENCE; } mDisplayTimeline.updateSignalTimes(); getBE().mDisplayTimeline.updateSignalTimes(); sp<Fence> presentFence = getBE().mHwc->getPresentFence(HWC_DISPLAY_PRIMARY); auto presentFenceTime = std::make_shared<FenceTime>(presentFence); mDisplayTimeline.push(presentFenceTime); getBE().mDisplayTimeline.push(presentFenceTime); nsecs_t vsyncPhase = mPrimaryDispSync.computeNextRefresh(0); nsecs_t vsyncInterval = mPrimaryDispSync.getPeriod(); Loading
services/surfaceflinger/SurfaceFlinger.h +3 −2 Original line number Diff line number Diff line Loading @@ -143,6 +143,9 @@ public: EGLContext mEGLContext; EGLDisplay mEGLDisplay; FenceTimeline mGlCompositionDoneTimeline; FenceTimeline mDisplayTimeline; // protected by mCompositorTimingLock; mutable std::mutex mCompositorTimingLock; CompositorTiming mCompositorTiming; Loading Loading @@ -734,8 +737,6 @@ private: std::vector<sp<Layer>> mLayersWithQueuedFrames; sp<Fence> mPreviousPresentFence = Fence::NO_FENCE; bool mHadClientComposition = false; FenceTimeline mGlCompositionDoneTimeline; FenceTimeline mDisplayTimeline; // this may only be written from the main thread with mStateLock held // it may be read from other threads with mStateLock held Loading