Loading libs/gui/BLASTBufferQueue.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width, mBufferItemConsumer->setBufferFreedListener(this); mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight); mBufferItemConsumer->setDefaultBufferFormat(PIXEL_FORMAT_RGBA_8888); mBufferItemConsumer->setTransformHint(mSurfaceControl->getTransformHint()); } void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, int width, int height) { Loading @@ -41,6 +42,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, int width, int mWidth = width; mHeight = height; mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight); mBufferItemConsumer->setTransformHint(mSurfaceControl->getTransformHint()); } static void transactionCallbackThunk(void* context, nsecs_t latchTime, Loading @@ -63,6 +65,7 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp<Fence ? stats[0].previousReleaseFence : Fence::NO_FENCE); mNextCallbackBufferItem = BufferItem(); mBufferItemConsumer->setTransformHint(stats[0].transformHint); } mDequeueWaitCV.notify_all(); decStrong((void*)transactionCallbackThunk); Loading libs/gui/SurfaceComposerClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1482,7 +1482,7 @@ sp<SurfaceControl> SurfaceComposerClient::createWithSurfaceParent(const String8& } ALOGE_IF(err, "SurfaceComposerClient::createWithSurfaceParent error %s", strerror(-err)); if (err == NO_ERROR) { return new SurfaceControl(this, handle, gbp, true /* owned */); return new SurfaceControl(this, handle, gbp, true /* owned */, transformHint); } } return nullptr; Loading libs/gui/tests/BLASTBufferQueue_test.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include <ui/DisplayInfo.h> #include <ui/GraphicBuffer.h> #include <ui/GraphicTypes.h> #include <ui/Transform.h> #include <gtest/gtest.h> Loading Loading @@ -201,6 +202,7 @@ TEST_F(BLASTBufferQueueTest, onFrameAvailable_Apply) { igbProducer->connect(new DummyProducerListener, NATIVE_WINDOW_API_CPU, false, &qbOutput)); ASSERT_EQ(NO_ERROR, igbProducer->setMaxDequeuedBufferCount(3)); ASSERT_NE(ui::Transform::orientation_flags::ROT_INVALID, qbOutput.transformHint); int slot; sp<Fence> fence; Loading @@ -222,6 +224,7 @@ TEST_F(BLASTBufferQueueTest, onFrameAvailable_Apply) { NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, Fence::NO_FENCE); igbProducer->queueBuffer(slot, input, &qbOutput); ASSERT_NE(ui::Transform::orientation_flags::ROT_INVALID, qbOutput.transformHint); adapter.waitForCallback(); Loading Loading
libs/gui/BLASTBufferQueue.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width, mBufferItemConsumer->setBufferFreedListener(this); mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight); mBufferItemConsumer->setDefaultBufferFormat(PIXEL_FORMAT_RGBA_8888); mBufferItemConsumer->setTransformHint(mSurfaceControl->getTransformHint()); } void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, int width, int height) { Loading @@ -41,6 +42,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, int width, int mWidth = width; mHeight = height; mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight); mBufferItemConsumer->setTransformHint(mSurfaceControl->getTransformHint()); } static void transactionCallbackThunk(void* context, nsecs_t latchTime, Loading @@ -63,6 +65,7 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp<Fence ? stats[0].previousReleaseFence : Fence::NO_FENCE); mNextCallbackBufferItem = BufferItem(); mBufferItemConsumer->setTransformHint(stats[0].transformHint); } mDequeueWaitCV.notify_all(); decStrong((void*)transactionCallbackThunk); Loading
libs/gui/SurfaceComposerClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1482,7 +1482,7 @@ sp<SurfaceControl> SurfaceComposerClient::createWithSurfaceParent(const String8& } ALOGE_IF(err, "SurfaceComposerClient::createWithSurfaceParent error %s", strerror(-err)); if (err == NO_ERROR) { return new SurfaceControl(this, handle, gbp, true /* owned */); return new SurfaceControl(this, handle, gbp, true /* owned */, transformHint); } } return nullptr; Loading
libs/gui/tests/BLASTBufferQueue_test.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include <ui/DisplayInfo.h> #include <ui/GraphicBuffer.h> #include <ui/GraphicTypes.h> #include <ui/Transform.h> #include <gtest/gtest.h> Loading Loading @@ -201,6 +202,7 @@ TEST_F(BLASTBufferQueueTest, onFrameAvailable_Apply) { igbProducer->connect(new DummyProducerListener, NATIVE_WINDOW_API_CPU, false, &qbOutput)); ASSERT_EQ(NO_ERROR, igbProducer->setMaxDequeuedBufferCount(3)); ASSERT_NE(ui::Transform::orientation_flags::ROT_INVALID, qbOutput.transformHint); int slot; sp<Fence> fence; Loading @@ -222,6 +224,7 @@ TEST_F(BLASTBufferQueueTest, onFrameAvailable_Apply) { NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, Fence::NO_FENCE); igbProducer->queueBuffer(slot, input, &qbOutput); ASSERT_NE(ui::Transform::orientation_flags::ROT_INVALID, qbOutput.transformHint); adapter.waitForCallback(); Loading