diff options
author | Mathias Agopian <mathias@google.com> | 2009-12-09 14:32:56 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-12-09 15:26:29 -0800 |
commit | c5e181f8b347ad89874e0c6c7d2eea8d0465a478 (patch) | |
tree | b637cb7ac5eabf5897345fbf7c39ce68ff9e6edb /libs/surfaceflinger/LayerBuffer.h | |
parent | cb94f70d5cfecf69f4f470497703befb270f6565 (diff) | |
download | frameworks_native-c5e181f8b347ad89874e0c6c7d2eea8d0465a478.zip frameworks_native-c5e181f8b347ad89874e0c6c7d2eea8d0465a478.tar.gz frameworks_native-c5e181f8b347ad89874e0c6c7d2eea8d0465a478.tar.bz2 |
fix [2315900] Monochrome camera preview screen after launching camera
this was introduced by a recent change. when we try to figure out the size of
the yuv->rgb temporary buffer, the output resolution has not been computed yet
and an invalid buffer size is used. most of the time the allocation fails
and the system reverts to "standard" GL will uses onle the Y plane.
the allocation of the temporary buffer is moved to onDraw(), the first
time it is called, by that time, the window is positioned properly.
Diffstat (limited to 'libs/surfaceflinger/LayerBuffer.h')
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 1abb103..2ca63ac 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -130,13 +130,14 @@ private: virtual bool transformed() const; virtual void destroy() { } private: + status_t initTempBuffer() const; mutable Mutex mBufferSourceLock; sp<Buffer> mBuffer; status_t mStatus; ISurface::BufferHeap mBufferHeap; size_t mBufferSize; mutable LayerBase::Texture mTexture; - NativeBuffer mTempBuffer; + mutable NativeBuffer mTempBuffer; mutable sp<GraphicBuffer> mTempGraphicBuffer; }; |