diff options
author | Mathias Agopian <mathias@google.com> | 2009-11-02 17:48:33 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-11-02 17:48:33 -0800 |
commit | 36d0184e089831b74de6005f01da9e7b26679bb9 (patch) | |
tree | 8a6cb7b2f9e5c53db29bc818a403b26add0c66fe /libs | |
parent | 989b76aadd92538c7ab4ca00c34508b42fda8cef (diff) | |
download | frameworks_base-36d0184e089831b74de6005f01da9e7b26679bb9.zip frameworks_base-36d0184e089831b74de6005f01da9e7b26679bb9.tar.gz frameworks_base-36d0184e089831b74de6005f01da9e7b26679bb9.tar.bz2 |
fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video
we lost the concept of vertical stride when moving video playback to EGLImage.
Here we bring it back in a somewhat hacky-way that will work only for the
softgl/mdp backend.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.cpp | 2 | ||||
-rw-r--r-- | libs/ui/GraphicBuffer.cpp | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index 82a8e51..a36304c 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -444,6 +444,8 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const GraphicBuffer::USAGE_HW_TEXTURE, src.img.w, src.img.handle, false); + graphicBuffer->setVerticalStride(src.img.h); + err = mLayer.initializeEglImage(graphicBuffer, &mTexture); } #endif diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index efe2d78..6a5c8a9 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -226,6 +226,14 @@ int GraphicBuffer::getIndex() const { return mIndex; } +void GraphicBuffer::setVerticalStride(uint32_t vstride) { + mVStride = vstride; +} + +uint32_t GraphicBuffer::getVerticalStride() const { + return mVStride; +} + // --------------------------------------------------------------------------- }; // namespace android |