Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 17 | #ifndef ANDROID_HWUI_CACHES_H |
| 18 | #define ANDROID_HWUI_CACHES_H |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 19 | |
Romain Guy | a2341a9 | 2010-09-08 18:04:33 -0700 | [diff] [blame] | 20 | #ifndef LOG_TAG |
| 21 | #define LOG_TAG "OpenGLRenderer" |
| 22 | #endif |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 23 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 24 | |
| 25 | #include "AssetAtlas.h" |
| 26 | #include "Dither.h" |
| 27 | #include "Extensions.h" |
| 28 | #include "FboCache.h" |
| 29 | #include "GradientCache.h" |
| 30 | #include "LayerCache.h" |
| 31 | #include "PatchCache.h" |
| 32 | #include "ProgramCache.h" |
| 33 | #include "PathCache.h" |
| 34 | #include "RenderBufferCache.h" |
| 35 | #include "renderstate/PixelBufferState.h" |
| 36 | #include "ResourceCache.h" |
| 37 | #include "TessellationCache.h" |
| 38 | #include "TextDropShadowCache.h" |
| 39 | #include "TextureCache.h" |
| 40 | #include "thread/TaskProcessor.h" |
| 41 | #include "thread/TaskManager.h" |
| 42 | |
Chris Craik | 59744b7 | 2014-07-01 17:56:52 -0700 | [diff] [blame] | 43 | #include <vector> |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 44 | #include <memory> |
Chris Craik | 59744b7 | 2014-07-01 17:56:52 -0700 | [diff] [blame] | 45 | |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 46 | #include <GLES3/gl3.h> |
| 47 | |
| 48 | #include <utils/KeyedVector.h> |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 49 | #include <utils/Singleton.h> |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 50 | #include <utils/Vector.h> |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 51 | |
Romain Guy | 7953745 | 2011-10-12 13:48:51 -0700 | [diff] [blame] | 52 | #include <cutils/compiler.h> |
| 53 | |
Tom Hudson | 2dc236b | 2014-10-15 15:46:42 -0400 | [diff] [blame] | 54 | #include <SkPath.h> |
| 55 | |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 56 | namespace android { |
| 57 | namespace uirenderer { |
| 58 | |
Tom Hudson | 2dc236b | 2014-10-15 15:46:42 -0400 | [diff] [blame] | 59 | class GammaFontRenderer; |
| 60 | |
Romain Guy | 03750a0 | 2010-10-18 14:06:08 -0700 | [diff] [blame] | 61 | /////////////////////////////////////////////////////////////////////////////// |
| 62 | // Globals |
| 63 | /////////////////////////////////////////////////////////////////////////////// |
| 64 | |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 65 | // GL ES 2.0 defines that at least 16 texture units must be supported |
Romain Guy | 03750a0 | 2010-10-18 14:06:08 -0700 | [diff] [blame] | 66 | #define REQUIRED_TEXTURE_UNITS_COUNT 3 |
| 67 | |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 68 | // Must define as many texture units as specified by REQUIRED_TEXTURE_UNITS_COUNT |
Romain Guy | a1d3c91 | 2011-12-13 14:55:06 -0800 | [diff] [blame] | 69 | static const GLenum gTextureUnits[] = { |
| 70 | GL_TEXTURE0, |
| 71 | GL_TEXTURE1, |
| 72 | GL_TEXTURE2 |
| 73 | }; |
| 74 | |
Romain Guy | 03750a0 | 2010-10-18 14:06:08 -0700 | [diff] [blame] | 75 | /////////////////////////////////////////////////////////////////////////////// |
Romain Guy | 03750a0 | 2010-10-18 14:06:08 -0700 | [diff] [blame] | 76 | // Caches |
| 77 | /////////////////////////////////////////////////////////////////////////////// |
| 78 | |
John Reck | e18264b | 2014-03-12 13:56:30 -0700 | [diff] [blame] | 79 | class RenderNode; |
John Reck | 17035b0 | 2014-09-03 07:39:53 -0700 | [diff] [blame] | 80 | class RenderState; |
Romain Guy | bb0acdf | 2012-03-05 13:44:35 -0800 | [diff] [blame] | 81 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 82 | class ANDROID_API Caches { |
| 83 | public: |
| 84 | static Caches& createInstance(RenderState& renderState) { |
| 85 | LOG_ALWAYS_FATAL_IF(sInstance, "double create of Caches attempted"); |
| 86 | sInstance = new Caches(renderState); |
| 87 | return *sInstance; |
| 88 | } |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 89 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 90 | static Caches& getInstance() { |
| 91 | LOG_ALWAYS_FATAL_IF(!sInstance, "instance not yet created"); |
| 92 | return *sInstance; |
| 93 | } |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 94 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 95 | static bool hasInstance() { |
| 96 | return sInstance != 0; |
| 97 | } |
| 98 | private: |
| 99 | Caches(RenderState& renderState); |
| 100 | static Caches* sInstance; |
Romain Guy | 9bca479 | 2010-10-25 18:42:25 -0700 | [diff] [blame] | 101 | |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 102 | public: |
Romain Guy | bdf7609 | 2011-07-18 15:00:43 -0700 | [diff] [blame] | 103 | enum FlushMode { |
Romain Guy | 6d7475d | 2011-07-27 16:28:21 -0700 | [diff] [blame] | 104 | kFlushMode_Layers = 0, |
| 105 | kFlushMode_Moderate, |
Romain Guy | bdf7609 | 2011-07-18 15:00:43 -0700 | [diff] [blame] | 106 | kFlushMode_Full |
| 107 | }; |
| 108 | |
| 109 | /** |
Romain Guy | dfa1046 | 2012-05-12 16:18:58 -0700 | [diff] [blame] | 110 | * Initialize caches. |
Romain Guy | 8ff6b9e | 2011-11-09 20:10:18 -0800 | [diff] [blame] | 111 | */ |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 112 | bool init(); |
Romain Guy | 8ff6b9e | 2011-11-09 20:10:18 -0800 | [diff] [blame] | 113 | |
| 114 | /** |
Romain Guy | 5bb3c73 | 2012-11-29 17:52:58 -0800 | [diff] [blame] | 115 | * Initialize global system properties. |
| 116 | */ |
| 117 | bool initProperties(); |
| 118 | |
| 119 | /** |
Romain Guy | bdf7609 | 2011-07-18 15:00:43 -0700 | [diff] [blame] | 120 | * Flush the cache. |
| 121 | * |
| 122 | * @param mode Indicates how much of the cache should be flushed |
| 123 | */ |
| 124 | void flush(FlushMode mode); |
| 125 | |
Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 126 | /** |
Romain Guy | 8ff6b9e | 2011-11-09 20:10:18 -0800 | [diff] [blame] | 127 | * Destroys all resources associated with this cache. This should |
| 128 | * be called after a flush(kFlushMode_Full). |
| 129 | */ |
| 130 | void terminate(); |
| 131 | |
| 132 | /** |
Romain Guy | e190aa6 | 2010-11-10 19:01:29 -0800 | [diff] [blame] | 133 | * Indicates whether the renderer is in debug mode. |
| 134 | * This debug mode provides limited information to app developers. |
| 135 | */ |
| 136 | DebugLevel getDebugLevel() const { |
| 137 | return mDebugLevel; |
| 138 | } |
| 139 | |
| 140 | /** |
Romain Guy | 627c6fd | 2013-08-21 11:53:18 -0700 | [diff] [blame] | 141 | * Returns a non-premultiplied ARGB color for the specified |
| 142 | * amount of overdraw (1 for 1x, 2 for 2x, etc.) |
| 143 | */ |
| 144 | uint32_t getOverdrawColor(uint32_t amount) const; |
| 145 | |
| 146 | /** |
Romain Guy | fe48f65 | 2010-11-11 15:36:56 -0800 | [diff] [blame] | 147 | * Call this on each frame to ensure that garbage is deleted from |
| 148 | * GPU memory. |
| 149 | */ |
| 150 | void clearGarbage(); |
| 151 | |
| 152 | /** |
Romain Guy | ada830f | 2011-01-13 12:13:20 -0800 | [diff] [blame] | 153 | * Can be used to delete a layer from a non EGL thread. |
Romain Guy | 57066eb | 2011-01-12 12:53:32 -0800 | [diff] [blame] | 154 | */ |
Romain Guy | ada830f | 2011-01-13 12:13:20 -0800 | [diff] [blame] | 155 | void deleteLayerDeferred(Layer* layer); |
Romain Guy | 57066eb | 2011-01-12 12:53:32 -0800 | [diff] [blame] | 156 | |
Romain Guy | 15bc643 | 2011-12-13 13:11:32 -0800 | [diff] [blame] | 157 | |
Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 158 | /** |
Romain Guy | a1d3c91 | 2011-12-13 14:55:06 -0800 | [diff] [blame] | 159 | * Activate the specified texture unit. The texture unit must |
| 160 | * be specified using an integer number (0 for GL_TEXTURE0 etc.) |
| 161 | */ |
| 162 | void activeTexture(GLuint textureUnit); |
| 163 | |
| 164 | /** |
Chris Craik | 9ab2d18 | 2013-07-22 16:16:06 -0700 | [diff] [blame] | 165 | * Invalidate the cached value of the active texture unit. |
| 166 | */ |
| 167 | void resetActiveTexture(); |
| 168 | |
| 169 | /** |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 170 | * Binds the specified texture as a GL_TEXTURE_2D texture. |
Romain Guy | be1b127 | 2013-06-06 14:02:54 -0700 | [diff] [blame] | 171 | * All texture bindings must be performed with this method or |
| 172 | * bindTexture(GLenum, GLuint). |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 173 | */ |
| 174 | void bindTexture(GLuint texture); |
| 175 | |
| 176 | /** |
Romain Guy | be1b127 | 2013-06-06 14:02:54 -0700 | [diff] [blame] | 177 | * Binds the specified texture with the specified render target. |
| 178 | * All texture bindings must be performed with this method or |
| 179 | * bindTexture(GLuint). |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 180 | */ |
| 181 | void bindTexture(GLenum target, GLuint texture); |
| 182 | |
| 183 | /** |
Romain Guy | be1b127 | 2013-06-06 14:02:54 -0700 | [diff] [blame] | 184 | * Deletes the specified texture and clears it from the cache |
| 185 | * of bound textures. |
| 186 | * All textures must be deleted using this method. |
| 187 | */ |
| 188 | void deleteTexture(GLuint texture); |
| 189 | |
| 190 | /** |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 191 | * Signals that the cache of bound textures should be cleared. |
| 192 | * Other users of the context may have altered which textures are bound. |
| 193 | */ |
| 194 | void resetBoundTextures(); |
| 195 | |
| 196 | /** |
jiayuanr | 4a473c7d | 2014-06-10 17:41:49 +0800 | [diff] [blame] | 197 | * Clear the cache of bound textures. |
| 198 | */ |
| 199 | void unbindTexture(GLuint texture); |
| 200 | |
Romain Guy | ef35927 | 2013-01-31 19:07:29 -0800 | [diff] [blame] | 201 | void startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool discard); |
Romain Guy | 85ef80d | 2012-09-13 20:26:50 -0700 | [diff] [blame] | 202 | void endTiling(); |
| 203 | |
Romain Guy | 82bc7a7 | 2012-01-03 14:13:39 -0800 | [diff] [blame] | 204 | /** |
Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 205 | * Returns the mesh used to draw regions. Calling this method will |
| 206 | * bind a VBO of type GL_ELEMENT_ARRAY_BUFFER that contains the |
| 207 | * indices for the region mesh. |
| 208 | */ |
| 209 | TextureVertex* getRegionMesh(); |
| 210 | |
Romain Guy | c15008e | 2010-11-10 11:59:15 -0800 | [diff] [blame] | 211 | /** |
| 212 | * Displays the memory usage of each cache and the total sum. |
| 213 | */ |
| 214 | void dumpMemoryUsage(); |
Chet Haase | 9c1e23b | 2011-03-24 10:51:31 -0700 | [diff] [blame] | 215 | void dumpMemoryUsage(String8& log); |
Romain Guy | c15008e | 2010-11-10 11:59:15 -0800 | [diff] [blame] | 216 | |
Romain Guy | 54c1a64 | 2012-09-27 17:55:46 -0700 | [diff] [blame] | 217 | bool hasRegisteredFunctors(); |
| 218 | void registerFunctors(uint32_t functorCount); |
| 219 | void unregisterFunctors(uint32_t functorCount); |
| 220 | |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 221 | bool blend; |
| 222 | GLenum lastSrcMode; |
| 223 | GLenum lastDstMode; |
| 224 | Program* currentProgram; |
| 225 | |
Romain Guy | 0f66753 | 2013-03-01 14:31:04 -0800 | [diff] [blame] | 226 | bool drawDeferDisabled; |
| 227 | bool drawReorderDisabled; |
| 228 | |
Romain Guy | 746b740 | 2010-10-26 16:27:31 -0700 | [diff] [blame] | 229 | // Misc |
| 230 | GLint maxTextureSize; |
Romain Guy | 3ff0bfd | 2013-02-25 14:15:37 -0800 | [diff] [blame] | 231 | |
| 232 | // Debugging |
Romain Guy | 4ff0cf4 | 2012-08-06 14:51:10 -0700 | [diff] [blame] | 233 | bool debugLayersUpdates; |
Romain Guy | 7c450aa | 2012-09-21 19:15:00 -0700 | [diff] [blame] | 234 | bool debugOverdraw; |
Romain Guy | 746b740 | 2010-10-26 16:27:31 -0700 | [diff] [blame] | 235 | |
Romain Guy | 3ff0bfd | 2013-02-25 14:15:37 -0800 | [diff] [blame] | 236 | enum StencilClipDebug { |
| 237 | kStencilHide, |
| 238 | kStencilShowHighlight, |
| 239 | kStencilShowRegion |
| 240 | }; |
| 241 | StencilClipDebug debugStencilClip; |
| 242 | |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 243 | TextureCache textureCache; |
| 244 | LayerCache layerCache; |
Romain Guy | 8d4aeb7 | 2013-02-12 16:08:55 -0800 | [diff] [blame] | 245 | RenderBufferCache renderBufferCache; |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 246 | GradientCache gradientCache; |
| 247 | ProgramCache programCache; |
| 248 | PathCache pathCache; |
| 249 | PatchCache patchCache; |
Chris Craik | 05f3d6e | 2014-06-02 16:27:04 -0700 | [diff] [blame] | 250 | TessellationCache tessellationCache; |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 251 | TextDropShadowCache dropShadowCache; |
Romain Guy | e2d345e | 2010-09-24 18:39:22 -0700 | [diff] [blame] | 252 | FboCache fboCache; |
Romain Guy | 29d8997 | 2010-09-22 16:10:57 -0700 | [diff] [blame] | 253 | |
Romain Guy | b1d0a4e | 2012-07-13 18:25:35 -0700 | [diff] [blame] | 254 | GammaFontRenderer* fontRenderer; |
| 255 | |
Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 256 | TaskManager tasks; |
| 257 | |
Romain Guy | 0baaac5 | 2012-08-31 20:31:01 -0700 | [diff] [blame] | 258 | Dither dither; |
Romain Guy | 0baaac5 | 2012-08-31 20:31:01 -0700 | [diff] [blame] | 259 | |
Romain Guy | f9f0016 | 2013-05-09 11:50:12 -0700 | [diff] [blame] | 260 | bool gpuPixelBuffersEnabled; |
| 261 | |
Romain Guy | dfa1046 | 2012-05-12 16:18:58 -0700 | [diff] [blame] | 262 | // Debug methods |
Romain Guy | 13631f3 | 2012-01-30 17:41:55 -0800 | [diff] [blame] | 263 | PFNGLINSERTEVENTMARKEREXTPROC eventMark; |
| 264 | PFNGLPUSHGROUPMARKEREXTPROC startMark; |
| 265 | PFNGLPOPGROUPMARKEREXTPROC endMark; |
| 266 | |
Romain Guy | dfa1046 | 2012-05-12 16:18:58 -0700 | [diff] [blame] | 267 | PFNGLLABELOBJECTEXTPROC setLabel; |
| 268 | PFNGLGETOBJECTLABELEXTPROC getLabel; |
| 269 | |
Chris Craik | ba9b613 | 2013-12-15 17:10:19 -0800 | [diff] [blame] | 270 | // TEMPORARY properties |
| 271 | void initTempProperties(); |
| 272 | void setTempProperty(const char* name, const char* value); |
ztenghui | cc3c256 | 2014-01-17 10:34:10 -0800 | [diff] [blame] | 273 | |
Chris Craik | f5be3ca | 2014-04-30 18:20:03 -0700 | [diff] [blame] | 274 | float propertyLightDiameter; |
| 275 | float propertyLightPosY; |
| 276 | float propertyLightPosZ; |
| 277 | float propertyAmbientRatio; |
ztenghui | 14a4e35 | 2014-08-13 10:44:39 -0700 | [diff] [blame] | 278 | int propertyAmbientShadowStrength; |
| 279 | int propertySpotShadowStrength; |
| 280 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 281 | PixelBufferState& pixelBuffer() { return *mPixelBufferState; } |
| 282 | |
Romain Guy | e190aa6 | 2010-11-10 19:01:29 -0800 | [diff] [blame] | 283 | private: |
Romain Guy | 627c6fd | 2013-08-21 11:53:18 -0700 | [diff] [blame] | 284 | enum OverdrawColorSet { |
| 285 | kColorSet_Default = 0, |
| 286 | kColorSet_Deuteranomaly |
| 287 | }; |
| 288 | |
Romain Guy | b1d0a4e | 2012-07-13 18:25:35 -0700 | [diff] [blame] | 289 | void initFont(); |
Romain Guy | dfa1046 | 2012-05-12 16:18:58 -0700 | [diff] [blame] | 290 | void initExtensions(); |
| 291 | void initConstraints(); |
Romain Guy | f9f0016 | 2013-05-09 11:50:12 -0700 | [diff] [blame] | 292 | void initStaticProperties(); |
Romain Guy | dfa1046 | 2012-05-12 16:18:58 -0700 | [diff] [blame] | 293 | |
Andreas Gampe | 64bb413 | 2014-11-22 00:35:09 +0000 | [diff] [blame] | 294 | static void eventMarkNull(GLsizei length, const GLchar* marker) { } |
| 295 | static void startMarkNull(GLsizei length, const GLchar* marker) { } |
Romain Guy | 13631f3 | 2012-01-30 17:41:55 -0800 | [diff] [blame] | 296 | static void endMarkNull() { } |
| 297 | |
Andreas Gampe | 64bb413 | 2014-11-22 00:35:09 +0000 | [diff] [blame] | 298 | static void setLabelNull(GLenum type, uint object, GLsizei length, |
| 299 | const char* label) { } |
| 300 | static void getLabelNull(GLenum type, uint object, GLsizei bufferSize, |
Romain Guy | dfa1046 | 2012-05-12 16:18:58 -0700 | [diff] [blame] | 301 | GLsizei* length, char* label) { |
| 302 | if (length) *length = 0; |
| 303 | if (label) *label = '\0'; |
| 304 | } |
| 305 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 306 | RenderState* mRenderState; |
Romain Guy | f3a910b4 | 2011-12-12 20:35:21 -0800 | [diff] [blame] | 307 | |
Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame^] | 308 | std::unique_ptr<PixelBufferState> mPixelBufferState; // TODO: move to RenderState |
Romain Guy | 15bc643 | 2011-12-13 13:11:32 -0800 | [diff] [blame] | 309 | |
Romain Guy | a1d3c91 | 2011-12-13 14:55:06 -0800 | [diff] [blame] | 310 | GLuint mTextureUnit; |
| 311 | |
Romain Guy | 3bbacf2 | 2013-02-06 16:51:04 -0800 | [diff] [blame] | 312 | Extensions& mExtensions; |
| 313 | |
Romain Guy | f3a910b4 | 2011-12-12 20:35:21 -0800 | [diff] [blame] | 314 | // Used to render layers |
Chris Craik | 51d6a3d | 2014-12-22 17:16:56 -0800 | [diff] [blame] | 315 | std::unique_ptr<TextureVertex[]> mRegionMesh; |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 316 | |
Romain Guy | f3a910b4 | 2011-12-12 20:35:21 -0800 | [diff] [blame] | 317 | mutable Mutex mGarbageLock; |
| 318 | Vector<Layer*> mLayerGarbage; |
| 319 | |
Romain Guy | e190aa6 | 2010-11-10 19:01:29 -0800 | [diff] [blame] | 320 | DebugLevel mDebugLevel; |
Romain Guy | 8ff6b9e | 2011-11-09 20:10:18 -0800 | [diff] [blame] | 321 | bool mInitialized; |
Romain Guy | 54c1a64 | 2012-09-27 17:55:46 -0700 | [diff] [blame] | 322 | |
| 323 | uint32_t mFunctorsCount; |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 324 | |
Fred Fettinger | 70735bd | 2014-08-29 14:02:31 -0500 | [diff] [blame] | 325 | // Caches texture bindings for the GL_TEXTURE_2D target |
Romain Guy | 8aa195d | 2013-06-04 18:00:09 -0700 | [diff] [blame] | 326 | GLuint mBoundTextures[REQUIRED_TEXTURE_UNITS_COUNT]; |
Romain Guy | 627c6fd | 2013-08-21 11:53:18 -0700 | [diff] [blame] | 327 | |
| 328 | OverdrawColorSet mOverdrawDebugColorSet; |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 329 | }; // class Caches |
| 330 | |
| 331 | }; // namespace uirenderer |
Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 332 | }; // namespace android |
| 333 | |
Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 334 | #endif // ANDROID_HWUI_CACHES_H |