Loading libs/gui/BLASTBufferQueue.cpp +10 −7 Original line number Diff line number Diff line Loading @@ -197,15 +197,18 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, } SurfaceComposerClient::Transaction t; const bool setBackpressureFlag = !SurfaceControl::isSameSurface(mSurfaceControl, surface); bool applyTransaction = false; if (!SurfaceControl::isSameSurface(mSurfaceControl, surface)) { // Always update the native object even though they might have the same layer handle, so we can // get the updated transform hint from WM. mSurfaceControl = surface; if (mSurfaceControl != nullptr) { if (setBackpressureFlag) { t.setFlags(mSurfaceControl, layer_state_t::eEnableBackpressure, layer_state_t::eEnableBackpressure); applyTransaction = true; } if (mSurfaceControl != nullptr) { mTransformHint = mSurfaceControl->getTransformHint(); mBufferItemConsumer->setTransformHint(mTransformHint); } Loading @@ -221,7 +224,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, // We only need to update the scale if we've received at least one buffer. The reason // for this is the scale is calculated based on the requested size and buffer size. // If there's no buffer, the scale will always be 1. if (mLastBufferInfo.hasBuffer) { if (mSurfaceControl != nullptr && mLastBufferInfo.hasBuffer) { t.setDestinationFrame(mSurfaceControl, Rect(0, 0, newSize.getWidth(), newSize.getHeight())); } Loading Loading
libs/gui/BLASTBufferQueue.cpp +10 −7 Original line number Diff line number Diff line Loading @@ -197,15 +197,18 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, } SurfaceComposerClient::Transaction t; const bool setBackpressureFlag = !SurfaceControl::isSameSurface(mSurfaceControl, surface); bool applyTransaction = false; if (!SurfaceControl::isSameSurface(mSurfaceControl, surface)) { // Always update the native object even though they might have the same layer handle, so we can // get the updated transform hint from WM. mSurfaceControl = surface; if (mSurfaceControl != nullptr) { if (setBackpressureFlag) { t.setFlags(mSurfaceControl, layer_state_t::eEnableBackpressure, layer_state_t::eEnableBackpressure); applyTransaction = true; } if (mSurfaceControl != nullptr) { mTransformHint = mSurfaceControl->getTransformHint(); mBufferItemConsumer->setTransformHint(mTransformHint); } Loading @@ -221,7 +224,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, // We only need to update the scale if we've received at least one buffer. The reason // for this is the scale is calculated based on the requested size and buffer size. // If there's no buffer, the scale will always be 1. if (mLastBufferInfo.hasBuffer) { if (mSurfaceControl != nullptr && mLastBufferInfo.hasBuffer) { t.setDestinationFrame(mSurfaceControl, Rect(0, 0, newSize.getWidth(), newSize.getHeight())); } Loading