diff options
author | 2013-05-23 12:47:26 -0700 | |
---|---|---|
committer | 2013-05-23 12:50:13 -0700 | |
commit | e9bc11f7121dbe373b0cbe5779ee6a12d824492c (patch) | |
tree | 0da7d9e380841202b3df300341321fed984a9c0c /libs/hwui/Extensions.h | |
parent | e0fc1875492cf1e59fe3ae4e0b1a5020672962bb (diff) |
Add PerfHUD ES profiling capabilities
The eglGetSystemTimeNV extension can be used to enable profiling
in PerfHUD ES. When the delta of two calls to eglGetSystemTimeNV
equals 0, we now cancels display lists updates. This allows the
tool to redraw the same frame several times in a row to run its
analysis.
For better results profiling should only be attempted after
setting viewroot.profile_rendering to true using adb shell
setprop.
Change-Id: I02e3c237418004cff8d6cb0b9a37126efae44c90
Diffstat (limited to 'libs/hwui/Extensions.h')
-rw-r--r-- | libs/hwui/Extensions.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h index a3f7c44a6f88..3112244bfd38 100644 --- a/libs/hwui/Extensions.h +++ b/libs/hwui/Extensions.h @@ -17,13 +17,12 @@ #ifndef ANDROID_HWUI_EXTENSIONS_H #define ANDROID_HWUI_EXTENSIONS_H +#include <cutils/compiler.h> + #include <utils/Singleton.h> #include <utils/SortedVector.h> #include <utils/String8.h> -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> - namespace android { namespace uirenderer { @@ -31,7 +30,7 @@ namespace uirenderer { // Classes /////////////////////////////////////////////////////////////////////////////// -class Extensions: public Singleton<Extensions> { +class ANDROID_API Extensions: public Singleton<Extensions> { public: inline bool hasNPot() const { return mHasNPot; } inline bool hasFramebufferFetch() const { return mHasFramebufferFetch; } @@ -41,11 +40,13 @@ public: inline bool hasTiledRendering() const { return mHasTiledRendering; } inline bool has1BitStencil() const { return mHas1BitStencil; } inline bool has4BitStencil() const { return mHas4BitStencil; } + inline bool hasNvSystemTime() const { return mHasNvSystemTime; } inline int getMajorGlVersion() const { return mVersionMajor; } inline int getMinorGlVersion() const { return mVersionMinor; } - bool hasExtension(const char* extension) const; + bool hasGlExtension(const char* extension) const; + bool hasEglExtension(const char* extension) const; void dump() const; @@ -53,12 +54,12 @@ private: Extensions(); ~Extensions(); - friend class Singleton<Extensions>; + void findExtensions(const char* extensions, SortedVector<String8>& list) const; - SortedVector<String8> mExtensionList; + friend class Singleton<Extensions>; - char* mExtensions; - char* mVersion; + SortedVector<String8> mGlExtensionList; + SortedVector<String8> mEglExtensionList; bool mHasNPot; bool mHasFramebufferFetch; @@ -68,6 +69,7 @@ private: bool mHasTiledRendering; bool mHas1BitStencil; bool mHas4BitStencil; + bool mHasNvSystemTime; int mVersionMajor; int mVersionMinor; |