diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
commit | a6938bab1f6fa76ae98ebbe44f4e534e05fa0993 (patch) | |
tree | bc5a1f806bd06db8abb197e80be9ead3644c0bcc /libs/surfaceflinger/LayerBuffer.h | |
parent | e41dd756db5184519f4dacbf4d95b333822605c7 (diff) | |
download | frameworks_native-a6938bab1f6fa76ae98ebbe44f4e534e05fa0993.zip frameworks_native-a6938bab1f6fa76ae98ebbe44f4e534e05fa0993.tar.gz frameworks_native-a6938bab1f6fa76ae98ebbe44f4e534e05fa0993.tar.bz2 |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'libs/surfaceflinger/LayerBuffer.h')
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.h | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 6e3d49f..5532532 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -22,7 +22,7 @@ #include <utils/IMemory.h> #include <private/ui/LayerState.h> -#include <GLES/eglnatives.h> +#include <EGL/eglnatives.h> #include "LayerBase.h" #include "LayerBitmap.h" @@ -46,6 +46,7 @@ class LayerBuffer : public LayerBaseClient virtual void onVisibilityResolved(const Transform& planeTransform); virtual void postBuffer(ssize_t offset); virtual void unregisterBuffers(); + virtual void updateTransform(Transform* tr) const; protected: LayerBuffer& mLayer; }; @@ -67,9 +68,9 @@ public: virtual void onDraw(const Region& clip) const; virtual uint32_t doTransaction(uint32_t flags); virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion); + virtual Transform getDrawingStateTransform() const; - status_t registerBuffers(int w, int h, int hstride, int vstride, - PixelFormat format, const sp<IMemoryHeap>& heap); + status_t registerBuffers(const ISurface::BufferHeap& buffers); void postBuffer(ssize_t offset); void unregisterBuffers(); sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, int32_t format); @@ -89,10 +90,9 @@ private: class Buffer : public LightRefBase<Buffer> { public: - Buffer(const sp<IMemoryHeap>& heap, ssize_t offset, - int w, int h, int hs, int vs, int f); + Buffer(const ISurface::BufferHeap& buffers, ssize_t offset); inline status_t getStatus() const { - return mHeap!=0 ? NO_ERROR : NO_INIT; + return mBufferHeap.heap!=0 ? NO_ERROR : NO_INIT; } inline const NativeBuffer& getBuffer() const { return mNativeBuffer; @@ -103,34 +103,29 @@ private: Buffer(const Buffer& rhs); ~Buffer(); private: - sp<IMemoryHeap> mHeap; - NativeBuffer mNativeBuffer; + ISurface::BufferHeap mBufferHeap; + NativeBuffer mNativeBuffer; }; class BufferSource : public Source { public: - BufferSource(LayerBuffer& layer, - int w, int h, int hstride, int vstride, - PixelFormat format, const sp<IMemoryHeap>& heap); + BufferSource(LayerBuffer& layer, const ISurface::BufferHeap& buffers); virtual ~BufferSource(); status_t getStatus() const { return mStatus; } sp<Buffer> getBuffer() const; void setBuffer(const sp<Buffer>& buffer); + virtual void updateTransform(Transform* tr) const; virtual void onDraw(const Region& clip) const; virtual void postBuffer(ssize_t offset); virtual void unregisterBuffers(); private: mutable Mutex mLock; - sp<IMemoryHeap> mHeap; sp<Buffer> mBuffer; status_t mStatus; - int mWidth; - int mHeight; - int mHStride; - int mVStride; - int mFormat; + ISurface::BufferHeap mBufferHeap; + size_t mBufferSize; mutable sp<MemoryDealer> mTemporaryDealer; mutable LayerBitmap mTempBitmap; mutable GLuint mTextureName; @@ -186,8 +181,9 @@ private: public: SurfaceBuffer(SurfaceID id, LayerBuffer* owner); virtual ~SurfaceBuffer(); - virtual status_t registerBuffers(int w, int h, int hstride, int vstride, - PixelFormat format, const sp<IMemoryHeap>& heap); + virtual status_t onTransact( + uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags); + virtual status_t registerBuffers(const ISurface::BufferHeap& buffers); virtual void postBuffer(ssize_t offset); virtual void unregisterBuffers(); virtual sp<OverlayRef> createOverlay( |