Loading libs/gui/BLASTBufferQueue.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -582,7 +582,8 @@ status_t BLASTBufferQueue::acquireNextBufferLocked( // Only update mSize for destination bounds if the incoming buffer matches the requested size. // Otherwise, it could cause stretching since the destination bounds will update before the // buffer with the new size is acquired. if (mRequestedSize == getBufferSize(bufferItem)) { if (mRequestedSize == getBufferSize(bufferItem) || bufferItem.mScalingMode != NATIVE_WINDOW_SCALING_MODE_FREEZE) { mSize = mRequestedSize; } Rect crop = computeCrop(bufferItem); Loading libs/gui/tests/BLASTBufferQueue_test.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include <private/gui/ComposerService.h> #include <private/gui/ComposerServiceAIDL.h> #include <ui/DisplayMode.h> #include <ui/DisplayState.h> #include <ui/GraphicBuffer.h> #include <ui/GraphicTypes.h> #include <ui/Transform.h> Loading Loading @@ -198,11 +199,13 @@ protected: t.apply(); t.clear(); ui::DisplayMode mode; ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getActiveDisplayMode(mDisplayToken, &mode)); const ui::Size& resolution = mode.resolution; ui::DisplayState displayState; ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getDisplayState(mDisplayToken, &displayState)); const ui::Size& resolution = displayState.layerStackSpaceRect; mDisplayWidth = resolution.getWidth(); mDisplayHeight = resolution.getHeight(); ALOGV("Display: %dx%d orientation:%d", mDisplayWidth, mDisplayHeight, displayState.orientation); mSurfaceControl = mClient->createSurface(String8("TestSurface"), mDisplayWidth, mDisplayHeight, PIXEL_FORMAT_RGBA_8888, Loading Loading
libs/gui/BLASTBufferQueue.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -582,7 +582,8 @@ status_t BLASTBufferQueue::acquireNextBufferLocked( // Only update mSize for destination bounds if the incoming buffer matches the requested size. // Otherwise, it could cause stretching since the destination bounds will update before the // buffer with the new size is acquired. if (mRequestedSize == getBufferSize(bufferItem)) { if (mRequestedSize == getBufferSize(bufferItem) || bufferItem.mScalingMode != NATIVE_WINDOW_SCALING_MODE_FREEZE) { mSize = mRequestedSize; } Rect crop = computeCrop(bufferItem); Loading
libs/gui/tests/BLASTBufferQueue_test.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include <private/gui/ComposerService.h> #include <private/gui/ComposerServiceAIDL.h> #include <ui/DisplayMode.h> #include <ui/DisplayState.h> #include <ui/GraphicBuffer.h> #include <ui/GraphicTypes.h> #include <ui/Transform.h> Loading Loading @@ -198,11 +199,13 @@ protected: t.apply(); t.clear(); ui::DisplayMode mode; ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getActiveDisplayMode(mDisplayToken, &mode)); const ui::Size& resolution = mode.resolution; ui::DisplayState displayState; ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getDisplayState(mDisplayToken, &displayState)); const ui::Size& resolution = displayState.layerStackSpaceRect; mDisplayWidth = resolution.getWidth(); mDisplayHeight = resolution.getHeight(); ALOGV("Display: %dx%d orientation:%d", mDisplayWidth, mDisplayHeight, displayState.orientation); mSurfaceControl = mClient->createSurface(String8("TestSurface"), mDisplayWidth, mDisplayHeight, PIXEL_FORMAT_RGBA_8888, Loading