Loading services/surfaceflinger/BufferLayerConsumer.cpp +7 −1 Original line number Original line Diff line number Diff line Loading @@ -435,7 +435,9 @@ void BufferLayerConsumer::computeCurrentTransformMatrixLocked() { BLC_LOGD("computeCurrentTransformMatrixLocked: " BLC_LOGD("computeCurrentTransformMatrixLocked: " "mCurrentTextureImage is nullptr"); "mCurrentTextureImage is nullptr"); } } const Rect& cropRect = canUseImageCrop(mCurrentCrop) ? Rect::EMPTY_RECT : mCurrentCrop; const Rect& currentCrop = getCurrentCropLocked(); const Rect& cropRect = canUseImageCrop(currentCrop) ? Rect::EMPTY_RECT : currentCrop; GLConsumer::computeTransformMatrix(mCurrentTransformMatrix, buf, cropRect, mCurrentTransform, GLConsumer::computeTransformMatrix(mCurrentTransformMatrix, buf, cropRect, mCurrentTransform, mFilteringEnabled); mFilteringEnabled); } } Loading Loading @@ -490,6 +492,10 @@ sp<GraphicBuffer> BufferLayerConsumer::getCurrentBuffer(int* outSlot) const { Rect BufferLayerConsumer::getCurrentCrop() const { Rect BufferLayerConsumer::getCurrentCrop() const { Mutex::Autolock lock(mMutex); Mutex::Autolock lock(mMutex); return getCurrentCropLocked(); } Rect BufferLayerConsumer::getCurrentCropLocked() const { return (mCurrentScalingMode == NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) return (mCurrentScalingMode == NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) ? GLConsumer::scaleDownCrop(mCurrentCrop, mDefaultWidth, mDefaultHeight) ? GLConsumer::scaleDownCrop(mCurrentCrop, mDefaultWidth, mDefaultHeight) : mCurrentCrop; : mCurrentCrop; Loading services/surfaceflinger/BufferLayerConsumer.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -274,6 +274,9 @@ private: // mCurrentTextureImage must not be nullptr. // mCurrentTextureImage must not be nullptr. void computeCurrentTransformMatrixLocked(); void computeCurrentTransformMatrixLocked(); // See getCurrentCrop, but with mMutex already held. Rect getCurrentCropLocked() const; // doFenceWaitLocked inserts a wait command into the RenderEngine command // doFenceWaitLocked inserts a wait command into the RenderEngine command // stream to ensure that it is safe for future RenderEngine commands to // stream to ensure that it is safe for future RenderEngine commands to // access the current texture buffer. // access the current texture buffer. Loading Loading
services/surfaceflinger/BufferLayerConsumer.cpp +7 −1 Original line number Original line Diff line number Diff line Loading @@ -435,7 +435,9 @@ void BufferLayerConsumer::computeCurrentTransformMatrixLocked() { BLC_LOGD("computeCurrentTransformMatrixLocked: " BLC_LOGD("computeCurrentTransformMatrixLocked: " "mCurrentTextureImage is nullptr"); "mCurrentTextureImage is nullptr"); } } const Rect& cropRect = canUseImageCrop(mCurrentCrop) ? Rect::EMPTY_RECT : mCurrentCrop; const Rect& currentCrop = getCurrentCropLocked(); const Rect& cropRect = canUseImageCrop(currentCrop) ? Rect::EMPTY_RECT : currentCrop; GLConsumer::computeTransformMatrix(mCurrentTransformMatrix, buf, cropRect, mCurrentTransform, GLConsumer::computeTransformMatrix(mCurrentTransformMatrix, buf, cropRect, mCurrentTransform, mFilteringEnabled); mFilteringEnabled); } } Loading Loading @@ -490,6 +492,10 @@ sp<GraphicBuffer> BufferLayerConsumer::getCurrentBuffer(int* outSlot) const { Rect BufferLayerConsumer::getCurrentCrop() const { Rect BufferLayerConsumer::getCurrentCrop() const { Mutex::Autolock lock(mMutex); Mutex::Autolock lock(mMutex); return getCurrentCropLocked(); } Rect BufferLayerConsumer::getCurrentCropLocked() const { return (mCurrentScalingMode == NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) return (mCurrentScalingMode == NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) ? GLConsumer::scaleDownCrop(mCurrentCrop, mDefaultWidth, mDefaultHeight) ? GLConsumer::scaleDownCrop(mCurrentCrop, mDefaultWidth, mDefaultHeight) : mCurrentCrop; : mCurrentCrop; Loading
services/surfaceflinger/BufferLayerConsumer.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -274,6 +274,9 @@ private: // mCurrentTextureImage must not be nullptr. // mCurrentTextureImage must not be nullptr. void computeCurrentTransformMatrixLocked(); void computeCurrentTransformMatrixLocked(); // See getCurrentCrop, but with mMutex already held. Rect getCurrentCropLocked() const; // doFenceWaitLocked inserts a wait command into the RenderEngine command // doFenceWaitLocked inserts a wait command into the RenderEngine command // stream to ensure that it is safe for future RenderEngine commands to // stream to ensure that it is safe for future RenderEngine commands to // access the current texture buffer. // access the current texture buffer. Loading