summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2012-09-24 19:07:20 -0700
committerAndy McFadden <fadden@android.com>2012-09-25 11:31:46 -0700
commit4803b74e2a12a508f7bbfde6f6a962fe3299c61c (patch)
tree7c5540c94aa9f450c2a3b31228a0ece81a04acc0 /services
parenta046dd9772cd8da4ead9edc7a89d9992ff0d38cf (diff)
downloadframeworks_native-4803b74e2a12a508f7bbfde6f6a962fe3299c61c.zip
frameworks_native-4803b74e2a12a508f7bbfde6f6a962fe3299c61c.tar.gz
frameworks_native-4803b74e2a12a508f7bbfde6f6a962fe3299c61c.tar.bz2
Show build config in dumpsys SurfaceFlinger
This adds a line to the "dumpsys SurfaceFlinger" output that shows build-time configuration values. Example: Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \ [libgui USE_FENCE_SYNC] Bug 7206633 Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp31
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h1
2 files changed, 32 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index bc7552d..6bd300d 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -37,11 +37,13 @@
#include <gui/BitTube.h>
#include <gui/BufferQueue.h>
+#include <gui/GuiConfig.h>
#include <gui/IDisplayEventConnection.h>
#include <gui/SurfaceTextureClient.h>
#include <ui/GraphicBufferAllocator.h>
#include <ui/PixelFormat.h>
+#include <ui/UiConfig.h>
#include <utils/misc.h>
#include <utils/String8.h>
@@ -2045,6 +2047,26 @@ void SurfaceFlinger::clearStatsLocked(const Vector<String16>& args, size_t& inde
}
}
+/*static*/ void SurfaceFlinger::appendSfConfigString(String8& result)
+{
+ static const char* config =
+ " [sf"
+#ifdef NO_RGBX_8888
+ " NO_RGBX_8888"
+#endif
+#ifdef HAS_CONTEXT_PRIORITY
+ " HAS_CONTEXT_PRIORITY"
+#endif
+#ifdef NEVER_DEFAULT_TO_ASYNC_MODE
+ " NEVER_DEFAULT_TO_ASYNC_MODE"
+#endif
+#ifdef TARGET_DISABLE_TRIPLE_BUFFERING
+ " TARGET_DISABLE_TRIPLE_BUFFERING"
+#endif
+ "]";
+ result.append(config);
+}
+
void SurfaceFlinger::dumpAllLocked(
String8& result, char* buffer, size_t SIZE) const
{
@@ -2056,6 +2078,15 @@ void SurfaceFlinger::dumpAllLocked(
nsecs_t inTransactionDuration = (inTransaction) ? now-inTransaction : 0;
/*
+ * Dump library configuration.
+ */
+ result.append("Build configuration:");
+ appendSfConfigString(result);
+ appendUiConfigString(result);
+ appendGuiConfigString(result);
+ result.append("\n");
+
+ /*
* Dump the visible layer list
*/
const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index c9877b2..0a019ce 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -382,6 +382,7 @@ private:
String8& result, char* buffer, size_t SIZE) const;
void dumpAllLocked(String8& result, char* buffer, size_t SIZE) const;
bool startDdmConnection();
+ static void appendSfConfigString(String8& result);
/* ------------------------------------------------------------------------
* Attributes