diff options
| author | 2012-09-13 20:26:50 -0700 | |
|---|---|---|
| committer | 2012-09-13 20:26:50 -0700 | |
| commit | 85ef80d8902afe8d26cb75fa7837fd9e6d019620 (patch) | |
| tree | d9dbb8a0d49731396fb904a541f9fbe2ece39698 /libs/hwui/Extensions.h | |
| parent | dcd8c81bf4beb719888b6be1b9418303c9075938 (diff) | |
Foundation for tiling optimization
Change-Id: I4db32a4749f196472ba0dde7e102439d2ba4a3a7
Diffstat (limited to 'libs/hwui/Extensions.h')
| -rw-r--r-- | libs/hwui/Extensions.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h index fb945a841b74..bdaa3cc06aa8 100644 --- a/libs/hwui/Extensions.h +++ b/libs/hwui/Extensions.h @@ -65,11 +65,13 @@ public: mHasDiscardFramebuffer = hasExtension("GL_EXT_discard_framebuffer"); mHasDebugMarker = hasExtension("GL_EXT_debug_marker"); mHasDebugLabel = hasExtension("GL_EXT_debug_label"); + mHasTiledRendering = hasExtension("GL_QCOM_tiled_rendering"); - // We don't need to copy the string, the OpenGL ES spec - // guarantees the result of glGetString to point to a - // static string as long as our OpenGL context is valid - mExtensions = buffer; + mExtensions = strdup(buffer); + } + + ~Extensions() { + free(mExtensions); } inline bool hasNPot() const { return mHasNPot; } @@ -77,6 +79,7 @@ public: inline bool hasDiscardFramebuffer() const { return mHasDiscardFramebuffer; } inline bool hasDebugMarker() const { return mHasDebugMarker; } inline bool hasDebugLabel() const { return mHasDebugLabel; } + inline bool hasTiledRendering() const { return mHasTiledRendering; } bool hasExtension(const char* extension) const { const String8 s(extension); @@ -90,13 +93,14 @@ public: private: SortedVector<String8> mExtensionList; - const char* mExtensions; + char* mExtensions; bool mHasNPot; bool mHasFramebufferFetch; bool mHasDiscardFramebuffer; bool mHasDebugMarker; bool mHasDebugLabel; + bool mHasTiledRendering; }; // class Extensions }; // namespace uirenderer |