diff options
author | Mathias Agopian <mathias@google.com> | 2009-04-10 14:24:30 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-04-10 14:24:30 -0700 |
commit | 076b1cc3a9b90aa5b381a1ed268ca0b548444c9b (patch) | |
tree | b87f7863623b37fa9a6cc4ef48934aab46f79986 /libs/surfaceflinger/LayerBuffer.h | |
parent | 4ec21527096d0dcaa99634e6058aca3a415461af (diff) | |
download | frameworks_native-076b1cc3a9b90aa5b381a1ed268ca0b548444c9b.zip frameworks_native-076b1cc3a9b90aa5b381a1ed268ca0b548444c9b.tar.gz frameworks_native-076b1cc3a9b90aa5b381a1ed268ca0b548444c9b.tar.bz2 |
Integrate from //sandbox/mathias/donut/...@145728
SurfaceFlinger rework for new EGL driver model support.
Diffstat (limited to 'libs/surfaceflinger/LayerBuffer.h')
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 2dc77f1..2d44121 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -22,7 +22,6 @@ #include <utils/IMemory.h> #include <private/ui/LayerState.h> -#include <EGL/eglnatives.h> #include "LayerBase.h" #include "LayerBitmap.h" @@ -64,7 +63,7 @@ public: virtual bool needsBlending() const; - virtual sp<LayerBaseClient::Surface> getSurface() const; + virtual sp<LayerBaseClient::Surface> createSurface() const; virtual void onDraw(const Region& clip) const; virtual uint32_t doTransaction(uint32_t flags); virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion); @@ -126,8 +125,7 @@ private: status_t mStatus; ISurface::BufferHeap mBufferHeap; size_t mBufferSize; - mutable sp<MemoryDealer> mTemporaryDealer; - mutable LayerBitmap mTempBitmap; + mutable sp<android::Buffer> mTempBitmap; mutable GLuint mTextureName; }; @@ -179,23 +177,19 @@ private: class SurfaceBuffer : public LayerBaseClient::Surface { public: - SurfaceBuffer(SurfaceID id, LayerBuffer* owner); + SurfaceBuffer(SurfaceID id, const sp<LayerBuffer>& owner); virtual ~SurfaceBuffer(); - 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( uint32_t w, uint32_t h, int32_t format); - void disown(); private: - LayerBuffer* getOwner() const { - Mutex::Autolock _l(mLock); - return mOwner; + sp<LayerBuffer> getOwner() const { + return static_cast<LayerBuffer*>(Surface::getOwner().get()); } - mutable Mutex mLock; - LayerBuffer* mOwner; }; friend class SurfaceFlinger; @@ -203,10 +197,8 @@ private: mutable Mutex mLock; sp<Source> mSource; - bool mInvalidate; bool mNeedsBlending; - mutable wp<SurfaceBuffer> mClientSurface; }; // --------------------------------------------------------------------------- |