diff options
author | Mathias Agopian <mathias@google.com> | 2009-04-17 19:36:26 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-04-24 15:00:41 -0700 |
commit | 6cf0db228ca275dfcda57d79c55e5fa306809632 (patch) | |
tree | c1e57e8da8c8428bcac5afc877c16f472d0fb501 /libs/surfaceflinger/SurfaceFlinger.h | |
parent | 2b1927f686eaec23a5798966b96aadaee3e2eb85 (diff) | |
download | frameworks_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/SurfaceFlinger.h')
-rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.h b/libs/surfaceflinger/SurfaceFlinger.h index cb84542..b488ab5 100644 --- a/libs/surfaceflinger/SurfaceFlinger.h +++ b/libs/surfaceflinger/SurfaceFlinger.h @@ -203,7 +203,8 @@ private: Client* client, DisplayID display, int32_t id, uint32_t w, uint32_t h, uint32_t flags); - status_t destroySurface(SurfaceID surface_id); + status_t removeSurface(SurfaceID surface_id); + status_t destroySurface(const sp<LayerBaseClient>& layer); status_t setClientState(ClientID cid, int32_t count, const layer_state_t* states); @@ -287,6 +288,7 @@ private: sp<LayerBaseClient> getLayerUser_l(SurfaceID index) const; status_t addLayer_l(const sp<LayerBase>& layer); status_t removeLayer_l(const sp<LayerBase>& layer); + status_t purgatorizeLayer_l(const sp<LayerBase>& layer); void free_resources_l(); uint32_t getTransactionFlags(uint32_t flags); @@ -315,7 +317,9 @@ private: volatile int32_t mTransactionFlags; volatile int32_t mTransactionCount; Condition mTransactionCV; + SortedVector< sp<LayerBase> > mLayerPurgatory; + // protected by mStateLock (but we could use another lock) Tokenizer mTokens; DefaultKeyedVector<ClientID, Client*> mClientsMap; |