Loading libs/gui/SurfaceComposerClient.cpp +10 −1 Original line number Original line Diff line number Diff line Loading @@ -101,7 +101,8 @@ void ComposerService::composerServiceDied() SurfaceComposerClient::Transaction::Transaction(const Transaction& other) : SurfaceComposerClient::Transaction::Transaction(const Transaction& other) : mForceSynchronous(other.mForceSynchronous), mForceSynchronous(other.mForceSynchronous), mTransactionNestCount(other.mTransactionNestCount), mTransactionNestCount(other.mTransactionNestCount), mAnimation(other.mAnimation) { mAnimation(other.mAnimation), mEarlyWakeup(other.mEarlyWakeup) { mDisplayStates = other.mDisplayStates; mDisplayStates = other.mDisplayStates; mComposerStates = other.mComposerStates; mComposerStates = other.mComposerStates; } } Loading Loading @@ -157,9 +158,13 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous) { if (mAnimation) { if (mAnimation) { flags |= ISurfaceComposer::eAnimation; flags |= ISurfaceComposer::eAnimation; } } if (mEarlyWakeup) { flags |= ISurfaceComposer::eEarlyWakeup; } mForceSynchronous = false; mForceSynchronous = false; mAnimation = false; mAnimation = false; mEarlyWakeup = false; sf->setTransactionState(composerStates, displayStates, flags); sf->setTransactionState(composerStates, displayStates, flags); mStatus = NO_ERROR; mStatus = NO_ERROR; Loading @@ -185,6 +190,10 @@ void SurfaceComposerClient::Transaction::setAnimationTransaction() { mAnimation = true; mAnimation = true; } } void SurfaceComposerClient::Transaction::setEarlyWakeup() { mEarlyWakeup = true; } layer_state_t* SurfaceComposerClient::Transaction::getLayerState(const sp<SurfaceControl>& sc) { layer_state_t* SurfaceComposerClient::Transaction::getLayerState(const sp<SurfaceControl>& sc) { if (mComposerStates.count(sc) == 0) { if (mComposerStates.count(sc) == 0) { // we don't have it, add an initialized layer_state to our list // we don't have it, add an initialized layer_state to our list Loading libs/gui/include/gui/ISurfaceComposer.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -61,6 +61,11 @@ public: enum { enum { eSynchronous = 0x01, eSynchronous = 0x01, eAnimation = 0x02, eAnimation = 0x02, // Indicates that this transaction will likely result in a lot of layers being composed, and // thus, SurfaceFlinger should wake-up earlier to avoid missing frame deadlines. In this // case SurfaceFlinger will wake up at (sf vsync offset - debug.sf.early_phase_offset_ns) eEarlyWakeup = 0x04 }; }; enum { enum { Loading libs/gui/include/gui/SurfaceComposerClient.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -154,6 +154,7 @@ public: uint32_t mForceSynchronous = 0; uint32_t mForceSynchronous = 0; uint32_t mTransactionNestCount = 0; uint32_t mTransactionNestCount = 0; bool mAnimation = false; bool mAnimation = false; bool mEarlyWakeup = false; int mStatus = NO_ERROR; int mStatus = NO_ERROR; Loading Loading @@ -273,6 +274,7 @@ public: const Rect& displayRect); const Rect& displayRect); void setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height); void setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height); void setAnimationTransaction(); void setAnimationTransaction(); void setEarlyWakeup(); }; }; status_t destroySurface(const sp<IBinder>& id); status_t destroySurface(const sp<IBinder>& id); Loading services/surfaceflinger/BufferLayer.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -778,6 +778,7 @@ bool BufferLayer::getOpacityForFormat(uint32_t format) { } } void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { ATRACE_CALL(); const State& s(getDrawingState()); const State& s(getDrawingState()); computeGeometry(renderArea, getBE().mMesh, useIdentityTransform); computeGeometry(renderArea, getBE().mMesh, useIdentityTransform); Loading services/surfaceflinger/BufferLayerConsumer.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -356,6 +356,7 @@ status_t BufferLayerConsumer::updateAndReleaseLocked(const BufferItem& item, } } status_t BufferLayerConsumer::bindTextureImageLocked() { status_t BufferLayerConsumer::bindTextureImageLocked() { ATRACE_CALL(); mRE.checkErrors(); mRE.checkErrors(); if (mCurrentTexture == BufferQueue::INVALID_BUFFER_SLOT && mCurrentTextureImage == nullptr) { if (mCurrentTexture == BufferQueue::INVALID_BUFFER_SLOT && mCurrentTextureImage == nullptr) { Loading Loading
libs/gui/SurfaceComposerClient.cpp +10 −1 Original line number Original line Diff line number Diff line Loading @@ -101,7 +101,8 @@ void ComposerService::composerServiceDied() SurfaceComposerClient::Transaction::Transaction(const Transaction& other) : SurfaceComposerClient::Transaction::Transaction(const Transaction& other) : mForceSynchronous(other.mForceSynchronous), mForceSynchronous(other.mForceSynchronous), mTransactionNestCount(other.mTransactionNestCount), mTransactionNestCount(other.mTransactionNestCount), mAnimation(other.mAnimation) { mAnimation(other.mAnimation), mEarlyWakeup(other.mEarlyWakeup) { mDisplayStates = other.mDisplayStates; mDisplayStates = other.mDisplayStates; mComposerStates = other.mComposerStates; mComposerStates = other.mComposerStates; } } Loading Loading @@ -157,9 +158,13 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous) { if (mAnimation) { if (mAnimation) { flags |= ISurfaceComposer::eAnimation; flags |= ISurfaceComposer::eAnimation; } } if (mEarlyWakeup) { flags |= ISurfaceComposer::eEarlyWakeup; } mForceSynchronous = false; mForceSynchronous = false; mAnimation = false; mAnimation = false; mEarlyWakeup = false; sf->setTransactionState(composerStates, displayStates, flags); sf->setTransactionState(composerStates, displayStates, flags); mStatus = NO_ERROR; mStatus = NO_ERROR; Loading @@ -185,6 +190,10 @@ void SurfaceComposerClient::Transaction::setAnimationTransaction() { mAnimation = true; mAnimation = true; } } void SurfaceComposerClient::Transaction::setEarlyWakeup() { mEarlyWakeup = true; } layer_state_t* SurfaceComposerClient::Transaction::getLayerState(const sp<SurfaceControl>& sc) { layer_state_t* SurfaceComposerClient::Transaction::getLayerState(const sp<SurfaceControl>& sc) { if (mComposerStates.count(sc) == 0) { if (mComposerStates.count(sc) == 0) { // we don't have it, add an initialized layer_state to our list // we don't have it, add an initialized layer_state to our list Loading
libs/gui/include/gui/ISurfaceComposer.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -61,6 +61,11 @@ public: enum { enum { eSynchronous = 0x01, eSynchronous = 0x01, eAnimation = 0x02, eAnimation = 0x02, // Indicates that this transaction will likely result in a lot of layers being composed, and // thus, SurfaceFlinger should wake-up earlier to avoid missing frame deadlines. In this // case SurfaceFlinger will wake up at (sf vsync offset - debug.sf.early_phase_offset_ns) eEarlyWakeup = 0x04 }; }; enum { enum { Loading
libs/gui/include/gui/SurfaceComposerClient.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -154,6 +154,7 @@ public: uint32_t mForceSynchronous = 0; uint32_t mForceSynchronous = 0; uint32_t mTransactionNestCount = 0; uint32_t mTransactionNestCount = 0; bool mAnimation = false; bool mAnimation = false; bool mEarlyWakeup = false; int mStatus = NO_ERROR; int mStatus = NO_ERROR; Loading Loading @@ -273,6 +274,7 @@ public: const Rect& displayRect); const Rect& displayRect); void setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height); void setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height); void setAnimationTransaction(); void setAnimationTransaction(); void setEarlyWakeup(); }; }; status_t destroySurface(const sp<IBinder>& id); status_t destroySurface(const sp<IBinder>& id); Loading
services/surfaceflinger/BufferLayer.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -778,6 +778,7 @@ bool BufferLayer::getOpacityForFormat(uint32_t format) { } } void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { ATRACE_CALL(); const State& s(getDrawingState()); const State& s(getDrawingState()); computeGeometry(renderArea, getBE().mMesh, useIdentityTransform); computeGeometry(renderArea, getBE().mMesh, useIdentityTransform); Loading
services/surfaceflinger/BufferLayerConsumer.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -356,6 +356,7 @@ status_t BufferLayerConsumer::updateAndReleaseLocked(const BufferItem& item, } } status_t BufferLayerConsumer::bindTextureImageLocked() { status_t BufferLayerConsumer::bindTextureImageLocked() { ATRACE_CALL(); mRE.checkErrors(); mRE.checkErrors(); if (mCurrentTexture == BufferQueue::INVALID_BUFFER_SLOT && mCurrentTextureImage == nullptr) { if (mCurrentTexture == BufferQueue::INVALID_BUFFER_SLOT && mCurrentTextureImage == nullptr) { Loading