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

Commit e692ab9a authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix uninitialized variables in GLConsumer

mDefaultWidth, mDefaultHeight and mCurrentScallingMode are now
initialized to the same default value that BufferQueue uses.

Change-Id: I0d4da2022b06419d12745716d8ddbd48c8869953
parent bd115338
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ private:
    uint32_t mCurrentTransform;

    // mCurrentScalingMode is the scaling mode for the current texture. It gets
    // set to each time updateTexImage is called.
    // set each time updateTexImage is called.
    uint32_t mCurrentScalingMode;

    // mCurrentFence is the fence received from BufferQueue in updateTexImage.
+3 −0
Original line number Diff line number Diff line
@@ -82,8 +82,11 @@ GLConsumer::GLConsumer(GLuint tex, bool allowSynchronousMode,
        GLenum texTarget, bool useFenceSync, const sp<BufferQueue> &bufferQueue) :
    ConsumerBase(bufferQueue == 0 ? new BufferQueue(allowSynchronousMode) : bufferQueue),
    mCurrentTransform(0),
    mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
    mCurrentFence(Fence::NO_FENCE),
    mCurrentTimestamp(0),
    mDefaultWidth(1),
    mDefaultHeight(1),
    mFilteringEnabled(true),
    mTexName(tex),
    mUseFenceSync(useFenceSync),