Loading include/gui/IGraphicBufferConsumer.h +4 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,10 @@ public: // Indicates whether this buffer has been seen by a consumer yet bool mAcquireCalled; // Indicates this buffer must be transformed by the inverse transform of the screen // it is displayed onto. This is applied after mTransform. bool mTransformToDisplayInverse; }; Loading include/ui/TMatHelpers.h +1 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ template <template<typename T> class BASE, typename T> class TMatDebug { public: String8 asString() const { return matrix::asString(*this); return matrix::asString( static_cast< const BASE<T>& >(*this) ); } }; Loading libs/gui/BufferQueue.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -557,7 +557,8 @@ status_t BufferQueue::queueBuffer(int buf, item.mAcquireCalled = mSlots[buf].mAcquireCalled; item.mGraphicBuffer = mSlots[buf].mGraphicBuffer; item.mCrop = crop; item.mTransform = transform; item.mTransform = transform & ~NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; item.mTransformToDisplayInverse = bool(transform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY); item.mScalingMode = scalingMode; item.mTimestamp = timestamp; item.mIsAutoTimestamp = isAutoTimestamp; Loading libs/gui/IGraphicBufferConsumer.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ IGraphicBufferConsumer::BufferItem::BufferItem() : mFrameNumber(0), mBuf(INVALID_BUFFER_SLOT), mIsDroppable(false), mAcquireCalled(false) { mAcquireCalled(false), mTransformToDisplayInverse(false) { mCrop.makeInvalid(); } Loading @@ -60,7 +61,8 @@ size_t IGraphicBufferConsumer::BufferItem::getPodSize() const { sizeof(mFrameNumber) + sizeof(mBuf) + sizeof(mIsDroppable) + sizeof(mAcquireCalled); sizeof(mAcquireCalled) + sizeof(mTransformToDisplayInverse); return c; } Loading Loading @@ -130,6 +132,7 @@ status_t IGraphicBufferConsumer::BufferItem::flatten( FlattenableUtils::write(buffer, size, mBuf); FlattenableUtils::write(buffer, size, mIsDroppable); FlattenableUtils::write(buffer, size, mAcquireCalled); FlattenableUtils::write(buffer, size, mTransformToDisplayInverse); return NO_ERROR; } Loading Loading @@ -171,6 +174,7 @@ status_t IGraphicBufferConsumer::BufferItem::unflatten( FlattenableUtils::read(buffer, size, mBuf); FlattenableUtils::read(buffer, size, mIsDroppable); FlattenableUtils::read(buffer, size, mAcquireCalled); FlattenableUtils::read(buffer, size, mTransformToDisplayInverse); return NO_ERROR; } Loading services/surfaceflinger/DisplayDevice.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,25 @@ void DisplayDevice::setLayerStack(uint32_t stack) { // ---------------------------------------------------------------------------- uint32_t DisplayDevice::getOrientationTransform() const { uint32_t transform = 0; switch (mOrientation) { case DisplayState::eOrientationDefault: transform = Transform::ROT_0; break; case DisplayState::eOrientation90: transform = Transform::ROT_90; break; case DisplayState::eOrientation180: transform = Transform::ROT_180; break; case DisplayState::eOrientation270: transform = Transform::ROT_270; break; } return transform; } status_t DisplayDevice::orientationToTransfrom( int orientation, int w, int h, Transform* tr) { Loading Loading
include/gui/IGraphicBufferConsumer.h +4 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,10 @@ public: // Indicates whether this buffer has been seen by a consumer yet bool mAcquireCalled; // Indicates this buffer must be transformed by the inverse transform of the screen // it is displayed onto. This is applied after mTransform. bool mTransformToDisplayInverse; }; Loading
include/ui/TMatHelpers.h +1 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ template <template<typename T> class BASE, typename T> class TMatDebug { public: String8 asString() const { return matrix::asString(*this); return matrix::asString( static_cast< const BASE<T>& >(*this) ); } }; Loading
libs/gui/BufferQueue.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -557,7 +557,8 @@ status_t BufferQueue::queueBuffer(int buf, item.mAcquireCalled = mSlots[buf].mAcquireCalled; item.mGraphicBuffer = mSlots[buf].mGraphicBuffer; item.mCrop = crop; item.mTransform = transform; item.mTransform = transform & ~NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; item.mTransformToDisplayInverse = bool(transform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY); item.mScalingMode = scalingMode; item.mTimestamp = timestamp; item.mIsAutoTimestamp = isAutoTimestamp; Loading
libs/gui/IGraphicBufferConsumer.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ IGraphicBufferConsumer::BufferItem::BufferItem() : mFrameNumber(0), mBuf(INVALID_BUFFER_SLOT), mIsDroppable(false), mAcquireCalled(false) { mAcquireCalled(false), mTransformToDisplayInverse(false) { mCrop.makeInvalid(); } Loading @@ -60,7 +61,8 @@ size_t IGraphicBufferConsumer::BufferItem::getPodSize() const { sizeof(mFrameNumber) + sizeof(mBuf) + sizeof(mIsDroppable) + sizeof(mAcquireCalled); sizeof(mAcquireCalled) + sizeof(mTransformToDisplayInverse); return c; } Loading Loading @@ -130,6 +132,7 @@ status_t IGraphicBufferConsumer::BufferItem::flatten( FlattenableUtils::write(buffer, size, mBuf); FlattenableUtils::write(buffer, size, mIsDroppable); FlattenableUtils::write(buffer, size, mAcquireCalled); FlattenableUtils::write(buffer, size, mTransformToDisplayInverse); return NO_ERROR; } Loading Loading @@ -171,6 +174,7 @@ status_t IGraphicBufferConsumer::BufferItem::unflatten( FlattenableUtils::read(buffer, size, mBuf); FlattenableUtils::read(buffer, size, mIsDroppable); FlattenableUtils::read(buffer, size, mAcquireCalled); FlattenableUtils::read(buffer, size, mTransformToDisplayInverse); return NO_ERROR; } Loading
services/surfaceflinger/DisplayDevice.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,25 @@ void DisplayDevice::setLayerStack(uint32_t stack) { // ---------------------------------------------------------------------------- uint32_t DisplayDevice::getOrientationTransform() const { uint32_t transform = 0; switch (mOrientation) { case DisplayState::eOrientationDefault: transform = Transform::ROT_0; break; case DisplayState::eOrientation90: transform = Transform::ROT_90; break; case DisplayState::eOrientation180: transform = Transform::ROT_180; break; case DisplayState::eOrientation270: transform = Transform::ROT_270; break; } return transform; } status_t DisplayDevice::orientationToTransfrom( int orientation, int w, int h, Transform* tr) { Loading