Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d22ce3d authored by Giulio Cervera's avatar Giulio Cervera Committed by Gerrit Code Review
Browse files

Merge "SurfaceTexture: Reset buffer values during connect" into ics

parents 24950846 f6134e7c
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -751,6 +751,13 @@ status_t SurfaceTexture::connect(int api,
                        mConnectedApi, api);
                err = -EINVAL;
            } else {
#ifdef QCOM_HARDWARE
                memcpy(mCurrentTransformMatrix, mtxIdentity,
                        sizeof(mCurrentTransformMatrix));
                mNextBufferInfo.width = 0;
                mNextBufferInfo.height = 0;
                mNextBufferInfo.format = 0;
#endif
                mConnectedApi = api;
                *outWidth = mDefaultWidth;
                *outHeight = mDefaultHeight;
@@ -786,13 +793,6 @@ status_t SurfaceTexture::disconnect(int api) {
                mNextCrop.makeInvalid();
                mNextScalingMode = NATIVE_WINDOW_SCALING_MODE_FREEZE;
                mNextTransform = 0;
#ifdef QCOM_HARDWARE
                memcpy(mCurrentTransformMatrix, mtxIdentity,
                       sizeof(mCurrentTransformMatrix));
                mNextBufferInfo.width = 0;
                mNextBufferInfo.height = 0;
                mNextBufferInfo.format = 0;
#endif
                mDequeueCondition.signal();
            } else {
                ST_LOGE("disconnect: connected to another api (cur=%d, req=%d)",