Loading libs/gui/GLConsumer.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -182,10 +182,7 @@ GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint3 mAttached(true) { GLC_LOGV("GLConsumer"); memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); mConsumer->setConsumerUsageBits(DEFAULT_USAGE_FLAGS); memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); } GLConsumer::GLConsumer(uint32_t texTarget, bool useFenceSync, bool isControlledByApp) Loading Loading @@ -213,8 +210,6 @@ GLConsumer::GLConsumer(uint32_t texTarget, bool useFenceSync, bool isControlledB GLC_LOGV("GLConsumer"); memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); mConsumer->setConsumerUsageBits(DEFAULT_USAGE_FLAGS); } GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t texTarget, bool useFenceSync, Loading Loading @@ -244,10 +239,17 @@ GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t texTarget, memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); } void GLConsumer::initializeConsumer() { mConsumer->setConsumerUsageBits(DEFAULT_USAGE_FLAGS); } void GLConsumer::onFirstRef() { ConsumerBase::onFirstRef(); initializeConsumer(); } status_t GLConsumer::setDefaultBufferSize(uint32_t w, uint32_t h) { Mutex::Autolock lock(mMutex); Loading libs/gui/include/gui/GLConsumer.h +4 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,8 @@ public: // current at the time of the last call to detachFromContext. status_t attachToContext(uint32_t tex); void onFirstRef() override; protected: // abandonLocked overrides the ConsumerBase method to clear Loading Loading @@ -309,6 +311,8 @@ protected: private: friend class sp<GLConsumer>; void initializeConsumer(); GLConsumer(uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); Loading Loading
libs/gui/GLConsumer.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -182,10 +182,7 @@ GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint3 mAttached(true) { GLC_LOGV("GLConsumer"); memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); mConsumer->setConsumerUsageBits(DEFAULT_USAGE_FLAGS); memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); } GLConsumer::GLConsumer(uint32_t texTarget, bool useFenceSync, bool isControlledByApp) Loading Loading @@ -213,8 +210,6 @@ GLConsumer::GLConsumer(uint32_t texTarget, bool useFenceSync, bool isControlledB GLC_LOGV("GLConsumer"); memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); mConsumer->setConsumerUsageBits(DEFAULT_USAGE_FLAGS); } GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t texTarget, bool useFenceSync, Loading Loading @@ -244,10 +239,17 @@ GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t texTarget, memcpy(mCurrentTransformMatrix, mtxIdentity.asArray(), sizeof(mCurrentTransformMatrix)); } void GLConsumer::initializeConsumer() { mConsumer->setConsumerUsageBits(DEFAULT_USAGE_FLAGS); } void GLConsumer::onFirstRef() { ConsumerBase::onFirstRef(); initializeConsumer(); } status_t GLConsumer::setDefaultBufferSize(uint32_t w, uint32_t h) { Mutex::Autolock lock(mMutex); Loading
libs/gui/include/gui/GLConsumer.h +4 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,8 @@ public: // current at the time of the last call to detachFromContext. status_t attachToContext(uint32_t tex); void onFirstRef() override; protected: // abandonLocked overrides the ConsumerBase method to clear Loading Loading @@ -309,6 +311,8 @@ protected: private: friend class sp<GLConsumer>; void initializeConsumer(); GLConsumer(uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); Loading