diff options
author | Andy McFadden <fadden@android.com> | 2012-09-25 13:48:15 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-25 13:48:16 -0700 |
commit | f68c825c75198e7b3296532db9352631f18983b7 (patch) | |
tree | 3c973f8d0cfeffc759139dcfe2ad0d0ead6d071c | |
parent | ad901448d7b92cd0a6493ae9d043110e41522291 (diff) | |
parent | 4803b74e2a12a508f7bbfde6f6a962fe3299c61c (diff) | |
download | frameworks_native-f68c825c75198e7b3296532db9352631f18983b7.zip frameworks_native-f68c825c75198e7b3296532db9352631f18983b7.tar.gz frameworks_native-f68c825c75198e7b3296532db9352631f18983b7.tar.bz2 |
Merge "Show build config in dumpsys SurfaceFlinger" into jb-mr1-dev
-rw-r--r-- | include/gui/GuiConfig.h | 29 | ||||
-rw-r--r-- | include/ui/UiConfig.h | 29 | ||||
-rw-r--r-- | libs/gui/Android.mk | 3 | ||||
-rw-r--r-- | libs/gui/GuiConfig.cpp | 38 | ||||
-rw-r--r-- | libs/ui/Android.mk | 3 | ||||
-rw-r--r-- | libs/ui/UiConfig.cpp | 36 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 31 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.h | 1 |
8 files changed, 168 insertions, 2 deletions
diff --git a/include/gui/GuiConfig.h b/include/gui/GuiConfig.h new file mode 100644 index 0000000..b020ed9 --- /dev/null +++ b/include/gui/GuiConfig.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ANDROID_GUI_CONFIG_H +#define ANDROID_GUI_CONFIG_H + +#include <utils/String8.h> + +namespace android { + +// Append the libgui configuration details to configStr. +void appendGuiConfigString(String8& configStr); + +}; // namespace android + +#endif /*ANDROID_GUI_CONFIG_H*/ diff --git a/include/ui/UiConfig.h b/include/ui/UiConfig.h new file mode 100644 index 0000000..fcf8ed5 --- /dev/null +++ b/include/ui/UiConfig.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ANDROID_UI_CONFIG_H +#define ANDROID_UI_CONFIG_H + +#include <utils/String8.h> + +namespace android { + +// Append the libui configuration details to configStr. +void appendUiConfigString(String8& configStr); + +}; // namespace android + +#endif /*ANDROID_UI_CONFIG_H*/ diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk index 282c25a..923845c 100644 --- a/libs/gui/Android.mk +++ b/libs/gui/Android.mk @@ -24,7 +24,8 @@ LOCAL_SRC_FILES:= \ SurfaceComposerClient.cpp \ DummyConsumer.cpp \ CpuConsumer.cpp \ - BufferItemConsumer.cpp + BufferItemConsumer.cpp \ + GuiConfig.cpp LOCAL_SHARED_LIBRARIES := \ libbinder \ diff --git a/libs/gui/GuiConfig.cpp b/libs/gui/GuiConfig.cpp new file mode 100644 index 0000000..0744e4f --- /dev/null +++ b/libs/gui/GuiConfig.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <gui/GuiConfig.h> + +namespace android { + +void appendGuiConfigString(String8& configStr) +{ + static const char* config = + " [libgui" +#ifdef USE_FENCE_SYNC + " USE_FENCE_SYNC" +#endif +#ifdef USE_NATIVE_FENCE_SYNC + " USE_NATIVE_FENCE_SYNC" +#endif +#ifdef ALLOW_DEQUEUE_CURRENT_BUFFER + " ALLOW_DEQUEUE_CURRENT_BUFFER" +#endif + "]"; + configStr.append(config); +} + +}; // namespace android diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk index 80c28a1..0d2e44c 100644 --- a/libs/ui/Android.mk +++ b/libs/ui/Android.mk @@ -23,7 +23,8 @@ LOCAL_SRC_FILES:= \ GraphicBufferMapper.cpp \ PixelFormat.cpp \ Rect.cpp \ - Region.cpp + Region.cpp \ + UiConfig.cpp LOCAL_SHARED_LIBRARIES := \ libcutils \ diff --git a/libs/ui/UiConfig.cpp b/libs/ui/UiConfig.cpp new file mode 100644 index 0000000..8b2130e --- /dev/null +++ b/libs/ui/UiConfig.cpp @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <ui/UiConfig.h> + +namespace android { + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + +void appendUiConfigString(String8& configStr) +{ + static const char* config = + " [libui" +#ifdef FRAMEBUFFER_FORCE_FORMAT + " FRAMEBUFFER_FORCE_FORMAT=" TOSTRING(FRAMEBUFFER_FORCE_FORMAT) +#endif + "]"; + configStr.append(config); +} + + +}; // namespace android 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 |