Loading libs/gui/BLASTBufferQueue.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -381,6 +381,10 @@ public: } return mBbq->setFrameRate(frameRate, compatibility); } status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId) override { return mBbq->setFrameTimelineVsync(frameTimelineVsyncId); } }; // TODO: Can we coalesce this with frame updates? Need to confirm Loading @@ -393,6 +397,14 @@ status_t BLASTBufferQueue::setFrameRate(float frameRate, int8_t compatibility) { .apply(); } status_t BLASTBufferQueue::setFrameTimelineVsync(int64_t frameTimelineVsyncId) { std::unique_lock _lock{mMutex}; SurfaceComposerClient::Transaction t; return t.setFrameTimelineVsync(mSurfaceControl, frameTimelineVsyncId) .apply(); } sp<Surface> BLASTBufferQueue::getSurface() { return new BBQSurface(mProducer, true, this); } Loading libs/gui/LayerState.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.writeByte, frameRateCompatibility); SAFE_PARCEL(output.writeUint32, fixedTransformHint); SAFE_PARCEL(output.writeUint64, frameNumber); SAFE_PARCEL(output.writeInt64, frameTimelineVsyncId); return NO_ERROR; } Loading Loading @@ -250,6 +251,7 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.readUint32, &tmpUint32); fixedTransformHint = static_cast<ui::Transform::RotationFlags>(tmpUint32); SAFE_PARCEL(input.readUint64, &frameNumber); SAFE_PARCEL(input.readInt64, &frameTimelineVsyncId); return NO_ERROR; } Loading libs/gui/Surface.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -1521,7 +1521,7 @@ int Surface::dispatchSetFrameTimelineVsync(va_list args) { auto frameTimelineVsyncId = static_cast<int64_t>(va_arg(args, int64_t)); ALOGV("Surface::dispatchSetFrameTimelineVsync"); return composerService()->setFrameTimelineVsync(mGraphicBufferProducer, frameTimelineVsyncId); return setFrameTimelineVsync(frameTimelineVsyncId); } bool Surface::transformToDisplayInverse() { Loading Loading @@ -2288,4 +2288,9 @@ status_t Surface::setFrameRate(float frameRate, int8_t compatibility) { return composerService()->setFrameRate(mGraphicBufferProducer, frameRate, compatibility); } status_t Surface::setFrameTimelineVsync(int64_t frameTimelineVsyncId) { return composerService()->setFrameTimelineVsync(mGraphicBufferProducer, frameTimelineVsyncId); } }; // namespace android libs/gui/SurfaceComposerClient.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -1510,6 +1510,19 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrame return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrameTimelineVsync( const sp<SurfaceControl>& sc, int64_t frameTimelineVsyncId) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eFrameTimelineVsyncChanged; s->frameTimelineVsyncId = frameTimelineVsyncId; return *this; } // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) { Loading libs/gui/include/gui/BLASTBufferQueue.h +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public: void flushShadowQueue() { mFlushShadowQueue = true; } status_t setFrameRate(float frameRate, int8_t compatibility); status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId); virtual ~BLASTBufferQueue() = default; Loading Loading
libs/gui/BLASTBufferQueue.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -381,6 +381,10 @@ public: } return mBbq->setFrameRate(frameRate, compatibility); } status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId) override { return mBbq->setFrameTimelineVsync(frameTimelineVsyncId); } }; // TODO: Can we coalesce this with frame updates? Need to confirm Loading @@ -393,6 +397,14 @@ status_t BLASTBufferQueue::setFrameRate(float frameRate, int8_t compatibility) { .apply(); } status_t BLASTBufferQueue::setFrameTimelineVsync(int64_t frameTimelineVsyncId) { std::unique_lock _lock{mMutex}; SurfaceComposerClient::Transaction t; return t.setFrameTimelineVsync(mSurfaceControl, frameTimelineVsyncId) .apply(); } sp<Surface> BLASTBufferQueue::getSurface() { return new BBQSurface(mProducer, true, this); } Loading
libs/gui/LayerState.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.writeByte, frameRateCompatibility); SAFE_PARCEL(output.writeUint32, fixedTransformHint); SAFE_PARCEL(output.writeUint64, frameNumber); SAFE_PARCEL(output.writeInt64, frameTimelineVsyncId); return NO_ERROR; } Loading Loading @@ -250,6 +251,7 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.readUint32, &tmpUint32); fixedTransformHint = static_cast<ui::Transform::RotationFlags>(tmpUint32); SAFE_PARCEL(input.readUint64, &frameNumber); SAFE_PARCEL(input.readInt64, &frameTimelineVsyncId); return NO_ERROR; } Loading
libs/gui/Surface.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -1521,7 +1521,7 @@ int Surface::dispatchSetFrameTimelineVsync(va_list args) { auto frameTimelineVsyncId = static_cast<int64_t>(va_arg(args, int64_t)); ALOGV("Surface::dispatchSetFrameTimelineVsync"); return composerService()->setFrameTimelineVsync(mGraphicBufferProducer, frameTimelineVsyncId); return setFrameTimelineVsync(frameTimelineVsyncId); } bool Surface::transformToDisplayInverse() { Loading Loading @@ -2288,4 +2288,9 @@ status_t Surface::setFrameRate(float frameRate, int8_t compatibility) { return composerService()->setFrameRate(mGraphicBufferProducer, frameRate, compatibility); } status_t Surface::setFrameTimelineVsync(int64_t frameTimelineVsyncId) { return composerService()->setFrameTimelineVsync(mGraphicBufferProducer, frameTimelineVsyncId); } }; // namespace android
libs/gui/SurfaceComposerClient.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -1510,6 +1510,19 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrame return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrameTimelineVsync( const sp<SurfaceControl>& sc, int64_t frameTimelineVsyncId) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eFrameTimelineVsyncChanged; s->frameTimelineVsyncId = frameTimelineVsyncId; return *this; } // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) { Loading
libs/gui/include/gui/BLASTBufferQueue.h +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public: void flushShadowQueue() { mFlushShadowQueue = true; } status_t setFrameRate(float frameRate, int8_t compatibility); status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId); virtual ~BLASTBufferQueue() = default; Loading