summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/hwui/RenderState.cpp8
-rw-r--r--libs/hwui/RenderState.h4
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java2
3 files changed, 13 insertions, 1 deletions
diff --git a/libs/hwui/RenderState.cpp b/libs/hwui/RenderState.cpp
index a7c5e85..ec8307f 100644
--- a/libs/hwui/RenderState.cpp
+++ b/libs/hwui/RenderState.cpp
@@ -38,6 +38,7 @@ void RenderState::onGLContextCreated() {
}
void RenderState::onGLContextDestroyed() {
+ AutoMutex _lock(mLayerLock);
if (CC_UNLIKELY(!mActiveLayers.empty())) {
mCaches->dumpMemoryUsage();
for (std::set<renderthread::CanvasContext*>::iterator cit = mRegisteredContexts.begin();
@@ -51,6 +52,13 @@ void RenderState::onGLContextDestroyed() {
}
context->mRootRenderNode->debugDumpLayers(" ");
}
+
+ for (std::set<const Layer*>::iterator lit = mActiveLayers.begin();
+ lit != mActiveLayers.end(); lit++) {
+ const Layer* layer = *(lit);
+ ALOGD("Layer %p, fbo %d, buildlayered %d",
+ layer, layer->getFbo(), layer->wasBuildLayered);
+ }
LOG_ALWAYS_FATAL("layers have survived gl context destruction");
}
}
diff --git a/libs/hwui/RenderState.h b/libs/hwui/RenderState.h
index c7ab197..74bafca 100644
--- a/libs/hwui/RenderState.h
+++ b/libs/hwui/RenderState.h
@@ -19,6 +19,7 @@
#include <set>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include <utils/Mutex.h>
#include <private/hwui/DrawGlInfo.h>
@@ -52,9 +53,11 @@ public:
void debugOverdraw(bool enable, bool clear);
void registerLayer(const Layer* layer) {
+ AutoMutex _lock(mLayerLock);
mActiveLayers.insert(layer);
}
void unregisterLayer(const Layer* layer) {
+ AutoMutex _lock(mLayerLock);
mActiveLayers.erase(layer);
}
@@ -83,6 +86,7 @@ private:
GLsizei mViewportWidth;
GLsizei mViewportHeight;
GLuint mFramebuffer;
+ Mutex mLayerLock;
};
} /* namespace uirenderer */
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 3a7dc99..7b4270b 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -10264,7 +10264,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|| !bp.packageSetting.keySetData.isUsingUpgradeKeySets()
|| ((PackageSetting) bp.packageSetting).sharedUser != null) {
sigsOk = compareSignatures(bp.packageSetting.signatures.mSignatures,
- pkg.mSignatures) != PackageManager.SIGNATURE_MATCH;
+ pkg.mSignatures) == PackageManager.SIGNATURE_MATCH;
} else {
sigsOk = checkUpgradeKeySetLP((PackageSetting) bp.packageSetting, pkg);
}