diff options
author | Mathias Agopian <mathias@google.com> | 2011-06-06 09:55:15 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-06-06 15:14:25 -0700 |
commit | 24855c09173a6caaec7dcedd0c2d7ce15121d39b (patch) | |
tree | 1b72c39ca375da3f4c43ba5afcf9cde70dd7a53d /include | |
parent | b16b020dd32147fbaaf7de47d5de16bfee10967a (diff) | |
download | frameworks_base-24855c09173a6caaec7dcedd0c2d7ce15121d39b.zip frameworks_base-24855c09173a6caaec7dcedd0c2d7ce15121d39b.tar.gz frameworks_base-24855c09173a6caaec7dcedd0c2d7ce15121d39b.tar.bz2 |
merge various SF fixes from gingerbread to honeycomb-mr2 (DO NOT MERGE)
Fix a race that could cause GL commands to be executed from the wrong thread.
RefBase subclasses can now decide how they want to be destroyed.
Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
Fix a race-condtion in SurfaceFlinger that could lead to a crash.
initial cherry-pick:
resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp
Change-Id: I2a335e03fff219e35c18a7b0089b3a11d636576f
Diffstat (limited to 'include')
-rw-r--r-- | include/utils/RefBase.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h index f355087..e88cb29 100644 --- a/include/utils/RefBase.h +++ b/include/utils/RefBase.h @@ -120,7 +120,14 @@ public: protected: RefBase(); virtual ~RefBase(); - + + // called when the last reference goes away. this is responsible for + // calling the destructor. The default implementation just does + // "delete this;". + // Make sure to never acquire a strong reference from this function. The + // same restrictions than for destructors apply. + virtual void destroy() const; + //! Flags for extendObjectLifetime() enum { OBJECT_LIFETIME_WEAK = 0x0001, |