summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/Layer.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-04-17 19:36:26 -0700
committerMathias Agopian <mathias@google.com>2009-04-24 15:00:41 -0700
commit6cf0db228ca275dfcda57d79c55e5fa306809632 (patch)
treec1e57e8da8c8428bcac5afc877c16f472d0fb501 /libs/surfaceflinger/Layer.h
parent2b1927f686eaec23a5798966b96aadaee3e2eb85 (diff)
downloadframeworks_base-6cf0db228ca275dfcda57d79c55e5fa306809632.zip
frameworks_base-6cf0db228ca275dfcda57d79c55e5fa306809632.tar.gz
frameworks_base-6cf0db228ca275dfcda57d79c55e5fa306809632.tar.bz2
more Surface lifetime management
Surfaces are now destroyed once all references from the clients are gone, but they go through a partial destruction as soon as the window manager requests it. This last part is still buggy. see comments in SurfaceFlinger::destroySurface()
Diffstat (limited to 'libs/surfaceflinger/Layer.h')
-rw-r--r--libs/surfaceflinger/Layer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h
index dc03d35..3f3953f 100644
--- a/libs/surfaceflinger/Layer.h
+++ b/libs/surfaceflinger/Layer.h
@@ -81,6 +81,7 @@ public:
virtual bool needsBlending() const { return mNeedsBlending; }
virtual bool isSecure() const { return mSecure; }
virtual sp<Surface> createSurface() const;
+ virtual status_t ditch();
const LayerBitmap& getBuffer(int i) const { return mBuffers[i]; }
LayerBitmap& getBuffer(int i) { return mBuffers[i]; }
@@ -108,7 +109,9 @@ private:
class SurfaceLayer : public LayerBaseClient::Surface
{
public:
- SurfaceLayer(SurfaceID id, const sp<Layer>& owner);
+ SurfaceLayer(const sp<SurfaceFlinger>& flinger,
+ SurfaceID id, const sp<Layer>& owner);
+ ~SurfaceLayer();
private:
virtual sp<SurfaceBuffer> getBuffer();