fixes for [2474091] Saw Poor behaviour playing a video.
- fix a bug when hacking video buffers into gralloc buffers
where the buffer size was incorrect this was causing the
"direct-form-texture" mode to fail
- also when the above fails, make sure to revert to the
"mdp copy mode" before going to "slow mode"
- finally disable completely the "direct-from-texture" mode
for now. It cannot work because the allocated buffers can't
respect the GPU constraints (alignment and such). We'll
have to find a solution for that.
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h
index eb5b8eb..b176623 100644
--- a/libs/surfaceflinger/LayerBuffer.h
+++ b/libs/surfaceflinger/LayerBuffer.h
@@ -99,7 +99,8 @@
class Buffer : public LightRefBase<Buffer> {
public:
- Buffer(const ISurface::BufferHeap& buffers, ssize_t offset);
+ Buffer(const ISurface::BufferHeap& buffers,
+ ssize_t offset, size_t bufferSize);
inline bool supportsCopybit() const {
return mSupportsCopybit;
}