summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/GraphicsEnv.cpp
diff options
context:
space:
mode:
author Adam Bodnar <abodnar@google.com> 2019-10-10 17:31:14 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-10-10 17:31:14 +0000
commit923b82722e41d24ff86d0f42b083fc2d02911a8f (patch)
tree5216b4ca5d366a8513630c53c8d9233ab9712f40 /libs/graphicsenv/GraphicsEnv.cpp
parent24d8978defe7b749bc3bea89518dcc6600e416c5 (diff)
parent0afcca0b295d50227439af6a555fcbabc80341b0 (diff)
Merge "[libgraphicsenv] Add an API to enable profiling features"
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
-rw-r--r--libs/graphicsenv/GraphicsEnv.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index 30f5f73c3a..28591110f0 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -307,6 +307,13 @@ void GraphicsEnv::sendGpuStatsLocked(GpuStatsInfo::Api api, bool isDriverLoaded,
}
}
+bool GraphicsEnv::setInjectLayersPrSetDumpable() {
+ if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) {
+ return false;
+ }
+ return true;
+}
+
void* GraphicsEnv::loadLibrary(std::string name) {
const android_dlextinfo dlextinfo = {
.flags = ANDROID_DLEXT_USE_NAMESPACE,