blob: 2e179af8eecc5bf05a3451299cca4a1cf4733577 [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
Romain Guy5dc7fa72013-03-11 20:48:31 -070034#include "thread/TaskProcessor.h"
35#include "thread/TaskManager.h"
36
Romain Guy3b748a42013-04-17 18:54:38 -070037#include "AssetAtlas.h"
Leon Scroggins III0fa2bd62014-05-05 12:50:38 -040038#include "Extensions.h"
Romain Guy03750a02010-10-18 14:06:08 -070039#include "FontRenderer.h"
40#include "GammaFontRenderer.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
Romain Guy03750a02010-10-18 14:06:08 -070058///////////////////////////////////////////////////////////////////////////////
59// Globals
60///////////////////////////////////////////////////////////////////////////////
61
Romain Guy8aa195d2013-06-04 18:00:09 -070062// GL ES 2.0 defines that at least 16 texture units must be supported
Romain Guy03750a02010-10-18 14:06:08 -070063#define REQUIRED_TEXTURE_UNITS_COUNT 3
64
Romain Guy31e08e92013-06-18 15:53:53 -070065// Maximum number of quads that pre-allocated meshes can draw
66static const uint32_t gMaxNumberOfQuads = 2048;
Romain Guy5b3b3522010-10-27 18:57:51 -070067
Romain Guy03750a02010-10-18 14:06:08 -070068// Generates simple and textured vertices
Romain Guy3380cfd2013-08-15 16:57:57 -070069#define FV(x, y, u, v) { x, y, u, v }
Romain Guy03750a02010-10-18 14:06:08 -070070
71// This array is never used directly but used as a memcpy source in the
72// OpenGLRenderer constructor
73static const TextureVertex gMeshVertices[] = {
74 FV(0.0f, 0.0f, 0.0f, 0.0f),
75 FV(1.0f, 0.0f, 1.0f, 0.0f),
76 FV(0.0f, 1.0f, 0.0f, 1.0f),
77 FV(1.0f, 1.0f, 1.0f, 1.0f)
78};
79static const GLsizei gMeshStride = sizeof(TextureVertex);
Chet Haase5b0200b2011-04-13 17:58:08 -070080static const GLsizei gVertexStride = sizeof(Vertex);
81static const GLsizei gAlphaVertexStride = sizeof(AlphaVertex);
Romain Guy03750a02010-10-18 14:06:08 -070082static const GLsizei gMeshTextureOffset = 2 * sizeof(float);
Chris Craik6ebdc112012-08-31 18:24:33 -070083static const GLsizei gVertexAlphaOffset = 2 * sizeof(float);
Chet Haase99585ad2011-05-02 15:00:16 -070084static const GLsizei gVertexAAWidthOffset = 2 * sizeof(float);
85static const GLsizei gVertexAALengthOffset = 3 * sizeof(float);
Romain Guy03750a02010-10-18 14:06:08 -070086static const GLsizei gMeshCount = 4;
87
Romain Guy8aa195d2013-06-04 18:00:09 -070088// Must define as many texture units as specified by REQUIRED_TEXTURE_UNITS_COUNT
Romain Guya1d3c912011-12-13 14:55:06 -080089static const GLenum gTextureUnits[] = {
90 GL_TEXTURE0,
91 GL_TEXTURE1,
92 GL_TEXTURE2
93};
94
Romain Guy03750a02010-10-18 14:06:08 -070095///////////////////////////////////////////////////////////////////////////////
96// Debug
97///////////////////////////////////////////////////////////////////////////////
98
Romain Guyfb8b7632010-08-23 21:05:08 -070099struct CacheLogger {
100 CacheLogger() {
Romain Guyd6b2a002011-06-17 17:45:59 -0700101 INIT_LOGD("Creating OpenGL renderer caches");
Romain Guyfb8b7632010-08-23 21:05:08 -0700102 }
103}; // struct CacheLogger
104
Romain Guy03750a02010-10-18 14:06:08 -0700105///////////////////////////////////////////////////////////////////////////////
106// Caches
107///////////////////////////////////////////////////////////////////////////////
108
John Recke18264b2014-03-12 13:56:30 -0700109class RenderNode;
John Reck17035b02014-09-03 07:39:53 -0700110class RenderState;
Romain Guybb0acdf2012-03-05 13:44:35 -0800111
Romain Guy79537452011-10-12 13:48:51 -0700112class ANDROID_API Caches: public Singleton<Caches> {
Chet Haasedd78cca2010-10-22 18:59:26 -0700113 Caches();
Romain Guyfb8b7632010-08-23 21:05:08 -0700114
115 friend class Singleton<Caches>;
116
Romain Guye190aa62010-11-10 19:01:29 -0800117 CacheLogger mLogger;
Romain Guy9bca4792010-10-25 18:42:25 -0700118
Romain Guyfb8b7632010-08-23 21:05:08 -0700119public:
Romain Guybdf76092011-07-18 15:00:43 -0700120 enum FlushMode {
Romain Guy6d7475d2011-07-27 16:28:21 -0700121 kFlushMode_Layers = 0,
122 kFlushMode_Moderate,
Romain Guybdf76092011-07-18 15:00:43 -0700123 kFlushMode_Full
124 };
125
126 /**
Romain Guydfa10462012-05-12 16:18:58 -0700127 * Initialize caches.
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800128 */
Romain Guy3b748a42013-04-17 18:54:38 -0700129 bool init();
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800130
131 /**
Romain Guy5bb3c732012-11-29 17:52:58 -0800132 * Initialize global system properties.
133 */
134 bool initProperties();
135
John Reck17035b02014-09-03 07:39:53 -0700136 void setRenderState(RenderState* renderState) { mRenderState = renderState; }
137
Romain Guy5bb3c732012-11-29 17:52:58 -0800138 /**
Romain Guybdf76092011-07-18 15:00:43 -0700139 * Flush the cache.
140 *
141 * @param mode Indicates how much of the cache should be flushed
142 */
143 void flush(FlushMode mode);
144
Romain Guy5b3b3522010-10-27 18:57:51 -0700145 /**
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800146 * Destroys all resources associated with this cache. This should
147 * be called after a flush(kFlushMode_Full).
148 */
149 void terminate();
150
151 /**
Romain Guye190aa62010-11-10 19:01:29 -0800152 * Indicates whether the renderer is in debug mode.
153 * This debug mode provides limited information to app developers.
154 */
155 DebugLevel getDebugLevel() const {
156 return mDebugLevel;
157 }
158
159 /**
Romain Guy627c6fd2013-08-21 11:53:18 -0700160 * Returns a non-premultiplied ARGB color for the specified
161 * amount of overdraw (1 for 1x, 2 for 2x, etc.)
162 */
163 uint32_t getOverdrawColor(uint32_t amount) const;
164
165 /**
Romain Guyfe48f652010-11-11 15:36:56 -0800166 * Call this on each frame to ensure that garbage is deleted from
167 * GPU memory.
168 */
169 void clearGarbage();
170
171 /**
Romain Guyada830f2011-01-13 12:13:20 -0800172 * Can be used to delete a layer from a non EGL thread.
Romain Guy57066eb2011-01-12 12:53:32 -0800173 */
Romain Guyada830f2011-01-13 12:13:20 -0800174 void deleteLayerDeferred(Layer* layer);
Romain Guy57066eb2011-01-12 12:53:32 -0800175
176 /**
Romain Guy5b3b3522010-10-27 18:57:51 -0700177 * Binds the VBO used to render simple textured quads.
178 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800179 bool bindMeshBuffer();
Romain Guy5b3b3522010-10-27 18:57:51 -0700180
181 /**
182 * Binds the specified VBO if needed.
183 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800184 bool bindMeshBuffer(const GLuint buffer);
Romain Guy5b3b3522010-10-27 18:57:51 -0700185
186 /**
187 * Unbinds the VBO used to render simple textured quads.
188 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800189 bool unbindMeshBuffer();
190
Romain Guy3b748a42013-04-17 18:54:38 -0700191 /**
192 * Binds a global indices buffer that can draw up to
Romain Guy31e08e92013-06-18 15:53:53 -0700193 * gMaxNumberOfQuads quads.
Romain Guy3b748a42013-04-17 18:54:38 -0700194 */
ztenghui63d41ab2014-02-14 13:13:41 -0800195 bool bindQuadIndicesBuffer();
196 bool bindShadowIndicesBuffer();
Romain Guy15bc6432011-12-13 13:11:32 -0800197 bool unbindIndicesBuffer();
198
Romain Guyf3a910b42011-12-12 20:35:21 -0800199 /**
Romain Guycf51a412013-04-08 19:40:31 -0700200 * Binds the specified buffer as the current GL unpack pixel buffer.
201 */
202 bool bindPixelBuffer(const GLuint buffer);
203
204 /**
205 * Resets the current unpack pixel buffer to 0 (default value.)
206 */
207 bool unbindPixelBuffer();
208
209 /**
Romain Guyf3a910b42011-12-12 20:35:21 -0800210 * Binds an attrib to the specified float vertex pointer.
211 * Assumes a stride of gMeshStride and a size of 2.
212 */
ztenghui55bfb4e2013-12-03 10:38:55 -0800213 void bindPositionVertexPointer(bool force, const GLvoid* vertices, GLsizei stride = gMeshStride);
Romain Guyf3a910b42011-12-12 20:35:21 -0800214
215 /**
216 * Binds an attrib to the specified float vertex pointer.
217 * Assumes a stride of gMeshStride and a size of 2.
218 */
ztenghui55bfb4e2013-12-03 10:38:55 -0800219 void bindTexCoordsVertexPointer(bool force, const GLvoid* vertices, GLsizei stride = gMeshStride);
Romain Guyf3a910b42011-12-12 20:35:21 -0800220
221 /**
222 * Resets the vertex pointers.
223 */
224 void resetVertexPointers();
225 void resetTexCoordsVertexPointer();
Romain Guy03750a02010-10-18 14:06:08 -0700226
Romain Guy15bc6432011-12-13 13:11:32 -0800227 void enableTexCoordsVertexArray();
Romain Guyff316ec2013-02-13 18:39:43 -0800228 void disableTexCoordsVertexArray();
Romain Guy15bc6432011-12-13 13:11:32 -0800229
Romain Guy5b3b3522010-10-27 18:57:51 -0700230 /**
Romain Guya1d3c912011-12-13 14:55:06 -0800231 * Activate the specified texture unit. The texture unit must
232 * be specified using an integer number (0 for GL_TEXTURE0 etc.)
233 */
234 void activeTexture(GLuint textureUnit);
235
236 /**
Chris Craik9ab2d182013-07-22 16:16:06 -0700237 * Invalidate the cached value of the active texture unit.
238 */
239 void resetActiveTexture();
240
241 /**
Romain Guy8aa195d2013-06-04 18:00:09 -0700242 * Binds the specified texture as a GL_TEXTURE_2D texture.
Romain Guybe1b1272013-06-06 14:02:54 -0700243 * All texture bindings must be performed with this method or
244 * bindTexture(GLenum, GLuint).
Romain Guy8aa195d2013-06-04 18:00:09 -0700245 */
246 void bindTexture(GLuint texture);
247
248 /**
Romain Guybe1b1272013-06-06 14:02:54 -0700249 * Binds the specified texture with the specified render target.
250 * All texture bindings must be performed with this method or
251 * bindTexture(GLuint).
Romain Guy8aa195d2013-06-04 18:00:09 -0700252 */
253 void bindTexture(GLenum target, GLuint texture);
254
255 /**
Romain Guybe1b1272013-06-06 14:02:54 -0700256 * Deletes the specified texture and clears it from the cache
257 * of bound textures.
258 * All textures must be deleted using this method.
259 */
260 void deleteTexture(GLuint texture);
261
262 /**
Romain Guy8aa195d2013-06-04 18:00:09 -0700263 * Signals that the cache of bound textures should be cleared.
264 * Other users of the context may have altered which textures are bound.
265 */
266 void resetBoundTextures();
267
268 /**
jiayuanr4a473c7d2014-06-10 17:41:49 +0800269 * Clear the cache of bound textures.
270 */
271 void unbindTexture(GLuint texture);
272
273 /**
Romain Guy8f85e802011-12-14 19:23:32 -0800274 * Sets the scissor for the current surface.
275 */
Romain Guy8a4ac612012-07-17 17:32:48 -0700276 bool setScissor(GLint x, GLint y, GLint width, GLint height);
Romain Guy8f85e802011-12-14 19:23:32 -0800277
278 /**
Romain Guy82bc7a72012-01-03 14:13:39 -0800279 * Resets the scissor state.
280 */
281 void resetScissor();
282
Romain Guy8a4ac612012-07-17 17:32:48 -0700283 bool enableScissor();
284 bool disableScissor();
Romain Guy586cae32012-07-13 15:28:31 -0700285 void setScissorEnabled(bool enabled);
286
Romain Guyef359272013-01-31 19:07:29 -0800287 void startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool discard);
Romain Guy85ef80d2012-09-13 20:26:50 -0700288 void endTiling();
289
Romain Guy82bc7a72012-01-03 14:13:39 -0800290 /**
Romain Guy5b3b3522010-10-27 18:57:51 -0700291 * Returns the mesh used to draw regions. Calling this method will
292 * bind a VBO of type GL_ELEMENT_ARRAY_BUFFER that contains the
293 * indices for the region mesh.
294 */
295 TextureVertex* getRegionMesh();
296
Romain Guyc15008e2010-11-10 11:59:15 -0800297 /**
298 * Displays the memory usage of each cache and the total sum.
299 */
300 void dumpMemoryUsage();
Chet Haase9c1e23b2011-03-24 10:51:31 -0700301 void dumpMemoryUsage(String8& log);
Romain Guyc15008e2010-11-10 11:59:15 -0800302
Romain Guy54c1a642012-09-27 17:55:46 -0700303 bool hasRegisteredFunctors();
304 void registerFunctors(uint32_t functorCount);
305 void unregisterFunctors(uint32_t functorCount);
306
Romain Guyfb8b7632010-08-23 21:05:08 -0700307 bool blend;
308 GLenum lastSrcMode;
309 GLenum lastDstMode;
310 Program* currentProgram;
Romain Guy586cae32012-07-13 15:28:31 -0700311 bool scissorEnabled;
Romain Guyfb8b7632010-08-23 21:05:08 -0700312
Romain Guy0f667532013-03-01 14:31:04 -0800313 bool drawDeferDisabled;
314 bool drawReorderDisabled;
315
Romain Guy746b7402010-10-26 16:27:31 -0700316 // VBO to draw with
Romain Guy03750a02010-10-18 14:06:08 -0700317 GLuint meshBuffer;
Romain Guy03750a02010-10-18 14:06:08 -0700318
Romain Guy746b7402010-10-26 16:27:31 -0700319 // Misc
320 GLint maxTextureSize;
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800321
322 // Debugging
Romain Guy4ff0cf42012-08-06 14:51:10 -0700323 bool debugLayersUpdates;
Romain Guy7c450aa2012-09-21 19:15:00 -0700324 bool debugOverdraw;
Romain Guy746b7402010-10-26 16:27:31 -0700325
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800326 enum StencilClipDebug {
327 kStencilHide,
328 kStencilShowHighlight,
329 kStencilShowRegion
330 };
331 StencilClipDebug debugStencilClip;
332
Romain Guyfb8b7632010-08-23 21:05:08 -0700333 TextureCache textureCache;
334 LayerCache layerCache;
Romain Guy8d4aeb72013-02-12 16:08:55 -0800335 RenderBufferCache renderBufferCache;
Romain Guyfb8b7632010-08-23 21:05:08 -0700336 GradientCache gradientCache;
337 ProgramCache programCache;
338 PathCache pathCache;
339 PatchCache patchCache;
Chris Craik05f3d6e2014-06-02 16:27:04 -0700340 TessellationCache tessellationCache;
Romain Guyfb8b7632010-08-23 21:05:08 -0700341 TextDropShadowCache dropShadowCache;
Romain Guye2d345e2010-09-24 18:39:22 -0700342 FboCache fboCache;
Romain Guy29d89972010-09-22 16:10:57 -0700343
Romain Guyb1d0a4e2012-07-13 18:25:35 -0700344 GammaFontRenderer* fontRenderer;
345
Romain Guy5dc7fa72013-03-11 20:48:31 -0700346 TaskManager tasks;
347
Romain Guy0baaac52012-08-31 20:31:01 -0700348 Dither dither;
Romain Guy0baaac52012-08-31 20:31:01 -0700349 Stencil stencil;
Romain Guy0baaac52012-08-31 20:31:01 -0700350
Romain Guyf9f00162013-05-09 11:50:12 -0700351 bool gpuPixelBuffersEnabled;
352
Romain Guydfa10462012-05-12 16:18:58 -0700353 // Debug methods
Romain Guy13631f32012-01-30 17:41:55 -0800354 PFNGLINSERTEVENTMARKEREXTPROC eventMark;
355 PFNGLPUSHGROUPMARKEREXTPROC startMark;
356 PFNGLPOPGROUPMARKEREXTPROC endMark;
357
Romain Guydfa10462012-05-12 16:18:58 -0700358 PFNGLLABELOBJECTEXTPROC setLabel;
359 PFNGLGETOBJECTLABELEXTPROC getLabel;
360
Chris Craikba9b6132013-12-15 17:10:19 -0800361 // TEMPORARY properties
362 void initTempProperties();
363 void setTempProperty(const char* name, const char* value);
ztenghuicc3c2562014-01-17 10:34:10 -0800364
Chris Craikf5be3ca2014-04-30 18:20:03 -0700365 float propertyLightDiameter;
366 float propertyLightPosY;
367 float propertyLightPosZ;
368 float propertyAmbientRatio;
ztenghui14a4e352014-08-13 10:44:39 -0700369 int propertyAmbientShadowStrength;
370 int propertySpotShadowStrength;
371
Romain Guye190aa62010-11-10 19:01:29 -0800372private:
Romain Guy627c6fd2013-08-21 11:53:18 -0700373 enum OverdrawColorSet {
374 kColorSet_Default = 0,
375 kColorSet_Deuteranomaly
376 };
377
Romain Guyb1d0a4e2012-07-13 18:25:35 -0700378 void initFont();
Romain Guydfa10462012-05-12 16:18:58 -0700379 void initExtensions();
380 void initConstraints();
Romain Guyf9f00162013-05-09 11:50:12 -0700381 void initStaticProperties();
Romain Guydfa10462012-05-12 16:18:58 -0700382
ztenghui63d41ab2014-02-14 13:13:41 -0800383 bool bindIndicesBufferInternal(const GLuint buffer);
384
Romain Guydfa10462012-05-12 16:18:58 -0700385 static void eventMarkNull(GLsizei length, const GLchar* marker) { }
386 static void startMarkNull(GLsizei length, const GLchar* marker) { }
Romain Guy13631f32012-01-30 17:41:55 -0800387 static void endMarkNull() { }
388
Romain Guydfa10462012-05-12 16:18:58 -0700389 static void setLabelNull(GLenum type, uint object, GLsizei length,
390 const char* label) { }
391 static void getLabelNull(GLenum type, uint object, GLsizei bufferSize,
392 GLsizei* length, char* label) {
393 if (length) *length = 0;
394 if (label) *label = '\0';
395 }
396
Romain Guyf3a910b42011-12-12 20:35:21 -0800397 GLuint mCurrentBuffer;
Romain Guy15bc6432011-12-13 13:11:32 -0800398 GLuint mCurrentIndicesBuffer;
Romain Guycf51a412013-04-08 19:40:31 -0700399 GLuint mCurrentPixelBuffer;
ztenghui55bfb4e2013-12-03 10:38:55 -0800400 const void* mCurrentPositionPointer;
Chris Craik16b897c2012-09-27 13:10:56 -0700401 GLsizei mCurrentPositionStride;
ztenghui55bfb4e2013-12-03 10:38:55 -0800402 const void* mCurrentTexCoordsPointer;
Romain Guyff316ec2013-02-13 18:39:43 -0800403 GLsizei mCurrentTexCoordsStride;
Romain Guyf3a910b42011-12-12 20:35:21 -0800404
Romain Guy15bc6432011-12-13 13:11:32 -0800405 bool mTexCoordsArrayEnabled;
406
Romain Guya1d3c912011-12-13 14:55:06 -0800407 GLuint mTextureUnit;
408
Romain Guy8f85e802011-12-14 19:23:32 -0800409 GLint mScissorX;
410 GLint mScissorY;
411 GLint mScissorWidth;
412 GLint mScissorHeight;
413
Romain Guy3bbacf22013-02-06 16:51:04 -0800414 Extensions& mExtensions;
415
Romain Guyf3a910b42011-12-12 20:35:21 -0800416 // Used to render layers
417 TextureVertex* mRegionMesh;
Romain Guy3b748a42013-04-17 18:54:38 -0700418
419 // Global index buffer
420 GLuint mMeshIndices;
ztenghui63d41ab2014-02-14 13:13:41 -0800421 GLuint mShadowStripsIndices;
Romain Guyf3a910b42011-12-12 20:35:21 -0800422
423 mutable Mutex mGarbageLock;
424 Vector<Layer*> mLayerGarbage;
425
Romain Guye190aa62010-11-10 19:01:29 -0800426 DebugLevel mDebugLevel;
Romain Guy8ff6b9e2011-11-09 20:10:18 -0800427 bool mInitialized;
Romain Guy54c1a642012-09-27 17:55:46 -0700428
429 uint32_t mFunctorsCount;
Romain Guy8aa195d2013-06-04 18:00:09 -0700430
Fred Fettinger70735bd2014-08-29 14:02:31 -0500431 // Caches texture bindings for the GL_TEXTURE_2D target
Romain Guy8aa195d2013-06-04 18:00:09 -0700432 GLuint mBoundTextures[REQUIRED_TEXTURE_UNITS_COUNT];
Romain Guy627c6fd2013-08-21 11:53:18 -0700433
434 OverdrawColorSet mOverdrawDebugColorSet;
John Reck17035b02014-09-03 07:39:53 -0700435
436 RenderState* mRenderState;
Romain Guyfb8b7632010-08-23 21:05:08 -0700437}; // class Caches
438
439}; // namespace uirenderer
Romain Guyfb8b7632010-08-23 21:05:08 -0700440}; // namespace android
441
Romain Guy5b3b3522010-10-27 18:57:51 -0700442#endif // ANDROID_HWUI_CACHES_H