blob: 7bb5c4a2a4817036bd34f165fa580d2adf02d392 [file] [log] [blame]
Romain Guyfb8b7632010-08-23 21:05:08 -07001/*
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 Guy5b3b3522010-10-27 18:57:51 -070017#ifndef ANDROID_HWUI_CACHES_H
18#define ANDROID_HWUI_CACHES_H
Romain Guyfb8b7632010-08-23 21:05:08 -070019
Romain Guya2341a92010-09-08 18:04:33 -070020#ifndef LOG_TAG
21 #define LOG_TAG "OpenGLRenderer"
22#endif
Romain Guyfb8b7632010-08-23 21:05:08 -070023
Chris Craik59744b72014-07-01 17:56:52 -070024#include <vector>
25
Romain Guy3b748a42013-04-17 18:54:38 -070026#include <GLES3/gl3.h>
27
28#include <utils/KeyedVector.h>
Romain Guyfb8b7632010-08-23 21:05:08 -070029#include <utils/Singleton.h>
Romain Guy3b748a42013-04-17 18:54:38 -070030#include <utils/Vector.h>
Romain Guyfb8b7632010-08-23 21:05:08 -070031
Romain Guy79537452011-10-12 13:48:51 -070032#include <cutils/compiler.h>
33
Tom Hudson2dc236b2014-10-15 15:46:42 -040034#include <SkPath.h>
35
Romain Guy5dc7fa72013-03-11 20:48:31 -070036#include "thread/TaskProcessor.h"
37#include "thread/TaskManager.h"
38
Romain Guy3b748a42013-04-17 18:54:38 -070039#include "AssetAtlas.h"
Leon Scroggins III0fa2bd62014-05-05 12:50:38 -040040#include "Extensions.h"
Romain Guyfb8b7632010-08-23 21:05:08 -070041#include "TextureCache.h"
42#include "LayerCache.h"
Romain Guy8d4aeb72013-02-12 16:08:55 -080043#include "RenderBufferCache.h"
Romain Guyfb8b7632010-08-23 21:05:08 -070044#include "GradientCache.h"
45#include "PatchCache.h"
Romain Guyfb8b7632010-08-23 21:05:08 -070046#include "ProgramCache.h"
Romain Guyff26a0c2011-01-20 11:35:46 -080047#include "PathCache.h"
Chris Craik05f3d6e2014-06-02 16:27:04 -070048#include "TessellationCache.h"
Romain Guyfb8b7632010-08-23 21:05:08 -070049#include "TextDropShadowCache.h"
Romain Guye2d345e2010-09-24 18:39:22 -070050#include "FboCache.h"
Chet Haase5c13d892010-10-08 08:37:55 -070051#include "ResourceCache.h"
Romain Guy0baaac52012-08-31 20:31:01 -070052#include "Stencil.h"
Romain Guy211efea2012-07-31 21:16:07 -070053#include "Dither.h"
Romain Guyfb8b7632010-08-23 21:05:08 -070054
55namespace android {
56namespace uirenderer {
57
Tom Hudson2dc236b2014-10-15 15:46:42 -040058class GammaFontRenderer;
59
Romain Guy03750a02010-10-18 14:06:08 -070060///////////////////////////////////////////////////////////////////////////////
61// Globals
62///////////////////////////////////////////////////////////////////////////////
63
Romain Guy8aa195d2013-06-04 18:00:09 -070064// GL ES 2.0 defines that at least 16 texture units must be supported
Romain Guy03750a02010-10-18 14:06:08 -070065#define REQUIRED_TEXTURE_UNITS_COUNT 3
66
Romain Guy31e08e92013-06-18 15:53:53 -070067// Maximum number of quads that pre-allocated meshes can draw
68static const uint32_t gMaxNumberOfQuads = 2048;
Romain Guy5b3b3522010-10-27 18:57:51 -070069
Romain Guy03750a02010-10-18 14:06:08 -070070// Generates simple and textured vertices
Romain Guy3380cfd2013-08-15 16:57:57 -070071#define FV(x, y, u, v) { x, y, u, v }
Romain Guy03750a02010-10-18 14:06:08 -070072
73// This array is never used directly but used as a memcpy source in the
74// OpenGLRenderer constructor
75static const TextureVertex gMeshVertices[] = {
76 FV(0.0f, 0.0f, 0.0f, 0.0f),
77 FV(1.0f, 0.0f, 1.0f, 0.0f),
78 FV(0.0f, 1.0f, 0.0f, 1.0f),
79 FV(1.0f, 1.0f, 1.0f, 1.0f)
80};
81static const GLsizei gMeshStride = sizeof(TextureVertex);
Chet Haase5b0200b2011-04-13 17:58:08 -070082static const GLsizei gVertexStride = sizeof(Vertex);
83static const GLsizei gAlphaVertexStride = sizeof(AlphaVertex);
Romain Guy03750a02010-10-18 14:06:08 -070084static const GLsizei gMeshTextureOffset = 2 * sizeof(float);
Chris Craik6ebdc112012-08-31 18:24:33 -070085static const GLsizei gVertexAlphaOffset = 2 * sizeof(float);
Chet Haase99585ad2011-05-02 15:00:16 -070086static const GLsizei gVertexAAWidthOffset = 2 * sizeof(float);
87static const GLsizei gVertexAALengthOffset = 3 * sizeof(float);
Romain Guy03750a02010-10-18 14:06:08 -070088static const GLsizei gMeshCount = 4;
89
Romain Guy8aa195d2013-06-04 18:00:09 -070090// Must define as many texture units as specified by REQUIRED_TEXTURE_UNITS_COUNT
Romain Guya1d3c912011-12-13 14:55:06 -080091static const GLenum gTextureUnits[] = {
92 GL_TEXTURE0,
93 GL_TEXTURE1,
94 GL_TEXTURE2
95};
96
Romain Guy03750a02010-10-18 14:06:08 -070097///////////////////////////////////////////////////////////////////////////////
98// Debug
99///////////////////////////////////////////////////////////////////////////////
100
Romain Guyfb8b7632010-08-23 21:05:08 -0700101struct CacheLogger {
102 CacheLogger() {
Romain Guyd6b2a002011-06-17 17:45:59 -0700103 INIT_LOGD("Creating OpenGL renderer caches");
Romain Guyfb8b7632010-08-23 21:05:08 -0700104 }
105}; // struct CacheLogger
106
Romain Guy03750a02010-10-18 14:06:08 -0700107///////////////////////////////////////////////////////////////////////////////
108// Caches
109///////////////////////////////////////////////////////////////////////////////
110
John Recke18264b2014-03-12 13:56:30 -0700111class RenderNode;
John Reck17035b02014-09-03 07:39:53 -0700112class RenderState;
Romain Guybb0acdf2012-03-05 13:44:35 -0800113
Romain Guy79537452011-10-12 13:48:51 -0700114class ANDROID_API Caches: public Singleton<Caches> {
Chet Haasedd78cca2010-10-22 18:59:26 -0700115 Caches();
Romain Guyfb8b7632010-08-23 21:05:08 -0700116
117 friend class Singleton<Caches>;
118
Romain Guye190aa62010-11-10 19:01:29 -0800119 CacheLogger mLogger;
Romain Guy9bca4792010-10-25 18:42:25 -0700120
Romain Guyfb8b7632010-08-23 21:05:08 -0700121public:
Romain Guybdf76092011-07-18 15:00:43 -0700122 enum FlushMode {
Romain Guy6d7475d2011-07-27 16:28:21 -0700123 kFlushMode_Layers = 0,
124 kFlushMode_Moderate,
Romain Guybdf76092011-07-18 15:00:43 -0700125 kFlushMode_Full
126 };
127
128 /**
Romain Guydfa10462012-05-12 16:18:58 -0700129 * Initialize caches.
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800130 */
Romain Guy3b748a42013-04-17 18:54:38 -0700131 bool init();
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800132
133 /**
Romain Guy5bb3c732012-11-29 17:52:58 -0800134 * Initialize global system properties.
135 */
136 bool initProperties();
137
John Reck17035b02014-09-03 07:39:53 -0700138 void setRenderState(RenderState* renderState) { mRenderState = renderState; }
139
Romain Guy5bb3c732012-11-29 17:52:58 -0800140 /**
Romain Guybdf76092011-07-18 15:00:43 -0700141 * Flush the cache.
142 *
143 * @param mode Indicates how much of the cache should be flushed
144 */
145 void flush(FlushMode mode);
146
Romain Guy5b3b3522010-10-27 18:57:51 -0700147 /**
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800148 * Destroys all resources associated with this cache. This should
149 * be called after a flush(kFlushMode_Full).
150 */
151 void terminate();
152
153 /**
Romain Guye190aa62010-11-10 19:01:29 -0800154 * Indicates whether the renderer is in debug mode.
155 * This debug mode provides limited information to app developers.
156 */
157 DebugLevel getDebugLevel() const {
158 return mDebugLevel;
159 }
160
161 /**
Romain Guy627c6fd2013-08-21 11:53:18 -0700162 * Returns a non-premultiplied ARGB color for the specified
163 * amount of overdraw (1 for 1x, 2 for 2x, etc.)
164 */
165 uint32_t getOverdrawColor(uint32_t amount) const;
166
167 /**
Romain Guyfe48f652010-11-11 15:36:56 -0800168 * Call this on each frame to ensure that garbage is deleted from
169 * GPU memory.
170 */
171 void clearGarbage();
172
173 /**
Romain Guyada830f2011-01-13 12:13:20 -0800174 * Can be used to delete a layer from a non EGL thread.
Romain Guy57066eb2011-01-12 12:53:32 -0800175 */
Romain Guyada830f2011-01-13 12:13:20 -0800176 void deleteLayerDeferred(Layer* layer);
Romain Guy57066eb2011-01-12 12:53:32 -0800177
178 /**
Romain Guy5b3b3522010-10-27 18:57:51 -0700179 * Binds the VBO used to render simple textured quads.
180 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800181 bool bindMeshBuffer();
Romain Guy5b3b3522010-10-27 18:57:51 -0700182
183 /**
184 * Binds the specified VBO if needed.
185 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800186 bool bindMeshBuffer(const GLuint buffer);
Romain Guy5b3b3522010-10-27 18:57:51 -0700187
188 /**
189 * Unbinds the VBO used to render simple textured quads.
190 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800191 bool unbindMeshBuffer();
192
Romain Guy3b748a42013-04-17 18:54:38 -0700193 /**
194 * Binds a global indices buffer that can draw up to
Romain Guy31e08e92013-06-18 15:53:53 -0700195 * gMaxNumberOfQuads quads.
Romain Guy3b748a42013-04-17 18:54:38 -0700196 */
ztenghui63d41ab2014-02-14 13:13:41 -0800197 bool bindQuadIndicesBuffer();
198 bool bindShadowIndicesBuffer();
Romain Guy15bc6432011-12-13 13:11:32 -0800199 bool unbindIndicesBuffer();
200
Romain Guyf3a910b42011-12-12 20:35:21 -0800201 /**
Romain Guycf51a412013-04-08 19:40:31 -0700202 * Binds the specified buffer as the current GL unpack pixel buffer.
203 */
204 bool bindPixelBuffer(const GLuint buffer);
205
206 /**
207 * Resets the current unpack pixel buffer to 0 (default value.)
208 */
209 bool unbindPixelBuffer();
210
211 /**
Romain Guyf3a910b42011-12-12 20:35:21 -0800212 * Binds an attrib to the specified float vertex pointer.
213 * Assumes a stride of gMeshStride and a size of 2.
214 */
ztenghui55bfb4e2013-12-03 10:38:55 -0800215 void bindPositionVertexPointer(bool force, const GLvoid* vertices, GLsizei stride = gMeshStride);
Romain Guyf3a910b42011-12-12 20:35:21 -0800216
217 /**
218 * Binds an attrib to the specified float vertex pointer.
219 * Assumes a stride of gMeshStride and a size of 2.
220 */
ztenghui55bfb4e2013-12-03 10:38:55 -0800221 void bindTexCoordsVertexPointer(bool force, const GLvoid* vertices, GLsizei stride = gMeshStride);
Romain Guyf3a910b42011-12-12 20:35:21 -0800222
223 /**
224 * Resets the vertex pointers.
225 */
226 void resetVertexPointers();
227 void resetTexCoordsVertexPointer();
Romain Guy03750a02010-10-18 14:06:08 -0700228
Romain Guy15bc6432011-12-13 13:11:32 -0800229 void enableTexCoordsVertexArray();
Romain Guyff316ec2013-02-13 18:39:43 -0800230 void disableTexCoordsVertexArray();
Romain Guy15bc6432011-12-13 13:11:32 -0800231
Romain Guy5b3b3522010-10-27 18:57:51 -0700232 /**
Romain Guya1d3c912011-12-13 14:55:06 -0800233 * Activate the specified texture unit. The texture unit must
234 * be specified using an integer number (0 for GL_TEXTURE0 etc.)
235 */
236 void activeTexture(GLuint textureUnit);
237
238 /**
Chris Craik9ab2d182013-07-22 16:16:06 -0700239 * Invalidate the cached value of the active texture unit.
240 */
241 void resetActiveTexture();
242
243 /**
Romain Guy8aa195d2013-06-04 18:00:09 -0700244 * Binds the specified texture as a GL_TEXTURE_2D texture.
Romain Guybe1b1272013-06-06 14:02:54 -0700245 * All texture bindings must be performed with this method or
246 * bindTexture(GLenum, GLuint).
Romain Guy8aa195d2013-06-04 18:00:09 -0700247 */
248 void bindTexture(GLuint texture);
249
250 /**
Romain Guybe1b1272013-06-06 14:02:54 -0700251 * Binds the specified texture with the specified render target.
252 * All texture bindings must be performed with this method or
253 * bindTexture(GLuint).
Romain Guy8aa195d2013-06-04 18:00:09 -0700254 */
255 void bindTexture(GLenum target, GLuint texture);
256
257 /**
Romain Guybe1b1272013-06-06 14:02:54 -0700258 * Deletes the specified texture and clears it from the cache
259 * of bound textures.
260 * All textures must be deleted using this method.
261 */
262 void deleteTexture(GLuint texture);
263
264 /**
Romain Guy8aa195d2013-06-04 18:00:09 -0700265 * Signals that the cache of bound textures should be cleared.
266 * Other users of the context may have altered which textures are bound.
267 */
268 void resetBoundTextures();
269
270 /**
jiayuanr4a473c7d2014-06-10 17:41:49 +0800271 * Clear the cache of bound textures.
272 */
273 void unbindTexture(GLuint texture);
274
275 /**
Romain Guy8f85e802011-12-14 19:23:32 -0800276 * Sets the scissor for the current surface.
277 */
Romain Guy8a4ac612012-07-17 17:32:48 -0700278 bool setScissor(GLint x, GLint y, GLint width, GLint height);
Romain Guy8f85e802011-12-14 19:23:32 -0800279
280 /**
Romain Guy82bc7a72012-01-03 14:13:39 -0800281 * Resets the scissor state.
282 */
283 void resetScissor();
284
Romain Guy8a4ac612012-07-17 17:32:48 -0700285 bool enableScissor();
286 bool disableScissor();
Romain Guy586cae32012-07-13 15:28:31 -0700287 void setScissorEnabled(bool enabled);
288
Romain Guyef359272013-01-31 19:07:29 -0800289 void startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool discard);
Romain Guy85ef80d2012-09-13 20:26:50 -0700290 void endTiling();
291
Romain Guy82bc7a72012-01-03 14:13:39 -0800292 /**
Romain Guy5b3b3522010-10-27 18:57:51 -0700293 * Returns the mesh used to draw regions. Calling this method will
294 * bind a VBO of type GL_ELEMENT_ARRAY_BUFFER that contains the
295 * indices for the region mesh.
296 */
297 TextureVertex* getRegionMesh();
298
Romain Guyc15008e2010-11-10 11:59:15 -0800299 /**
300 * Displays the memory usage of each cache and the total sum.
301 */
302 void dumpMemoryUsage();
Chet Haase9c1e23b2011-03-24 10:51:31 -0700303 void dumpMemoryUsage(String8& log);
Romain Guyc15008e2010-11-10 11:59:15 -0800304
Romain Guy54c1a642012-09-27 17:55:46 -0700305 bool hasRegisteredFunctors();
306 void registerFunctors(uint32_t functorCount);
307 void unregisterFunctors(uint32_t functorCount);
308
Romain Guyfb8b7632010-08-23 21:05:08 -0700309 bool blend;
310 GLenum lastSrcMode;
311 GLenum lastDstMode;
312 Program* currentProgram;
Romain Guy586cae32012-07-13 15:28:31 -0700313 bool scissorEnabled;
Romain Guyfb8b7632010-08-23 21:05:08 -0700314
Romain Guy0f6675332013-03-01 14:31:04 -0800315 bool drawDeferDisabled;
316 bool drawReorderDisabled;
317
Romain Guy746b7402010-10-26 16:27:31 -0700318 // VBO to draw with
Romain Guy03750a02010-10-18 14:06:08 -0700319 GLuint meshBuffer;
Romain Guy03750a02010-10-18 14:06:08 -0700320
Romain Guy746b7402010-10-26 16:27:31 -0700321 // Misc
322 GLint maxTextureSize;
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800323
324 // Debugging
Romain Guy4ff0cf42012-08-06 14:51:10 -0700325 bool debugLayersUpdates;
Romain Guy7c450aa2012-09-21 19:15:00 -0700326 bool debugOverdraw;
Romain Guy746b7402010-10-26 16:27:31 -0700327
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800328 enum StencilClipDebug {
329 kStencilHide,
330 kStencilShowHighlight,
331 kStencilShowRegion
332 };
333 StencilClipDebug debugStencilClip;
334
Romain Guyfb8b7632010-08-23 21:05:08 -0700335 TextureCache textureCache;
336 LayerCache layerCache;
Romain Guy8d4aeb72013-02-12 16:08:55 -0800337 RenderBufferCache renderBufferCache;
Romain Guyfb8b7632010-08-23 21:05:08 -0700338 GradientCache gradientCache;
339 ProgramCache programCache;
340 PathCache pathCache;
341 PatchCache patchCache;
Chris Craik05f3d6e2014-06-02 16:27:04 -0700342 TessellationCache tessellationCache;
Romain Guyfb8b7632010-08-23 21:05:08 -0700343 TextDropShadowCache dropShadowCache;
Romain Guye2d345e2010-09-24 18:39:22 -0700344 FboCache fboCache;
Chet Haase5c13d892010-10-08 08:37:55 -0700345 ResourceCache resourceCache;
Romain Guy29d89972010-09-22 16:10:57 -0700346
Romain Guyb1d0a4e2012-07-13 18:25:35 -0700347 GammaFontRenderer* fontRenderer;
348
Romain Guy5dc7fa72013-03-11 20:48:31 -0700349 TaskManager tasks;
350
Romain Guy0baaac52012-08-31 20:31:01 -0700351 Dither dither;
Romain Guy0baaac52012-08-31 20:31:01 -0700352 Stencil stencil;
Romain Guy0baaac52012-08-31 20:31:01 -0700353
Romain Guy3b748a42013-04-17 18:54:38 -0700354 AssetAtlas assetAtlas;
355
Romain Guyf9f00162013-05-09 11:50:12 -0700356 bool gpuPixelBuffersEnabled;
357
Romain Guydfa10462012-05-12 16:18:58 -0700358 // Debug methods
Romain Guy13631f32012-01-30 17:41:55 -0800359 PFNGLINSERTEVENTMARKEREXTPROC eventMark;
360 PFNGLPUSHGROUPMARKEREXTPROC startMark;
361 PFNGLPOPGROUPMARKEREXTPROC endMark;
362
Romain Guydfa10462012-05-12 16:18:58 -0700363 PFNGLLABELOBJECTEXTPROC setLabel;
364 PFNGLGETOBJECTLABELEXTPROC getLabel;
365
Chris Craikba9b6132013-12-15 17:10:19 -0800366 // TEMPORARY properties
367 void initTempProperties();
368 void setTempProperty(const char* name, const char* value);
ztenghuicc3c2562014-01-17 10:34:10 -0800369
Chris Craikf5be3ca2014-04-30 18:20:03 -0700370 float propertyLightDiameter;
371 float propertyLightPosY;
372 float propertyLightPosZ;
373 float propertyAmbientRatio;
ztenghui14a4e352014-08-13 10:44:39 -0700374 int propertyAmbientShadowStrength;
375 int propertySpotShadowStrength;
376
Romain Guye190aa62010-11-10 19:01:29 -0800377private:
Romain Guy627c6fd2013-08-21 11:53:18 -0700378 enum OverdrawColorSet {
379 kColorSet_Default = 0,
380 kColorSet_Deuteranomaly
381 };
382
Romain Guyb1d0a4e2012-07-13 18:25:35 -0700383 void initFont();
Romain Guydfa10462012-05-12 16:18:58 -0700384 void initExtensions();
385 void initConstraints();
Romain Guyf9f00162013-05-09 11:50:12 -0700386 void initStaticProperties();
Romain Guydfa10462012-05-12 16:18:58 -0700387
ztenghui63d41ab2014-02-14 13:13:41 -0800388 bool bindIndicesBufferInternal(const GLuint buffer);
389
Romain Guydfa10462012-05-12 16:18:58 -0700390 static void eventMarkNull(GLsizei length, const GLchar* marker) { }
391 static void startMarkNull(GLsizei length, const GLchar* marker) { }
Romain Guy13631f32012-01-30 17:41:55 -0800392 static void endMarkNull() { }
393
Romain Guydfa10462012-05-12 16:18:58 -0700394 static void setLabelNull(GLenum type, uint object, GLsizei length,
395 const char* label) { }
396 static void getLabelNull(GLenum type, uint object, GLsizei bufferSize,
397 GLsizei* length, char* label) {
398 if (length) *length = 0;
399 if (label) *label = '\0';
400 }
401
Romain Guyf3a910b42011-12-12 20:35:21 -0800402 GLuint mCurrentBuffer;
Romain Guy15bc6432011-12-13 13:11:32 -0800403 GLuint mCurrentIndicesBuffer;
Romain Guycf51a412013-04-08 19:40:31 -0700404 GLuint mCurrentPixelBuffer;
ztenghui55bfb4e2013-12-03 10:38:55 -0800405 const void* mCurrentPositionPointer;
Chris Craik16b897c2012-09-27 13:10:56 -0700406 GLsizei mCurrentPositionStride;
ztenghui55bfb4e2013-12-03 10:38:55 -0800407 const void* mCurrentTexCoordsPointer;
Romain Guyff316ec2013-02-13 18:39:43 -0800408 GLsizei mCurrentTexCoordsStride;
Romain Guyf3a910b42011-12-12 20:35:21 -0800409
Romain Guy15bc6432011-12-13 13:11:32 -0800410 bool mTexCoordsArrayEnabled;
411
Romain Guya1d3c912011-12-13 14:55:06 -0800412 GLuint mTextureUnit;
413
Romain Guy8f85e802011-12-14 19:23:32 -0800414 GLint mScissorX;
415 GLint mScissorY;
416 GLint mScissorWidth;
417 GLint mScissorHeight;
418
Romain Guy3bbacf22013-02-06 16:51:04 -0800419 Extensions& mExtensions;
420
Romain Guyf3a910b42011-12-12 20:35:21 -0800421 // Used to render layers
422 TextureVertex* mRegionMesh;
Romain Guy3b748a42013-04-17 18:54:38 -0700423
424 // Global index buffer
425 GLuint mMeshIndices;
ztenghui63d41ab2014-02-14 13:13:41 -0800426 GLuint mShadowStripsIndices;
Romain Guyf3a910b42011-12-12 20:35:21 -0800427
428 mutable Mutex mGarbageLock;
429 Vector<Layer*> mLayerGarbage;
430
Romain Guye190aa62010-11-10 19:01:29 -0800431 DebugLevel mDebugLevel;
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800432 bool mInitialized;
Romain Guy54c1a642012-09-27 17:55:46 -0700433
434 uint32_t mFunctorsCount;
Romain Guy8aa195d2013-06-04 18:00:09 -0700435
Fred Fettinger70735bd2014-08-29 14:02:31 -0500436 // Caches texture bindings for the GL_TEXTURE_2D target
Romain Guy8aa195d2013-06-04 18:00:09 -0700437 GLuint mBoundTextures[REQUIRED_TEXTURE_UNITS_COUNT];
Romain Guy627c6fd2013-08-21 11:53:18 -0700438
439 OverdrawColorSet mOverdrawDebugColorSet;
John Reck17035b02014-09-03 07:39:53 -0700440
441 RenderState* mRenderState;
Romain Guyfb8b7632010-08-23 21:05:08 -0700442}; // class Caches
443
444}; // namespace uirenderer
Romain Guyfb8b7632010-08-23 21:05:08 -0700445}; // namespace android
446
Romain Guy5b3b3522010-10-27 18:57:51 -0700447#endif // ANDROID_HWUI_CACHES_H