From 24855c09173a6caaec7dcedd0c2d7ce15121d39b Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 6 Jun 2011 09:55:15 -0700 Subject: 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 --- services/surfaceflinger/LayerBase.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'services/surfaceflinger/LayerBase.cpp') diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index 6025ed4921cb..022f25145297 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -616,10 +616,7 @@ LayerBaseClient::Surface::~Surface() */ // destroy client resources - sp layer = getOwner(); - if (layer != 0) { - mFlinger->destroySurface(layer); - } + mFlinger->destroySurface(mOwner); } sp LayerBaseClient::Surface::getOwner() const { -- cgit v1.2.3-59-g8ed1b