blob: e70982f5444a8f18929053db7c199bf3a602fb6d [file] [log] [blame]
Romain Guy5cbbce52010-06-27 22:59:20 -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_PROGRAM_H
18#define ANDROID_HWUI_PROGRAM_H
Romain Guy5cbbce52010-06-27 22:59:20 -070019
Romain Guyf3a910b42011-12-12 20:35:21 -080020#include <utils/KeyedVector.h>
21
Romain Guy5cbbce52010-06-27 22:59:20 -070022#include <GLES2/gl2.h>
23#include <GLES2/gl2ext.h>
24
Mike Reedc2f31df2016-10-28 17:21:45 -040025#include <SkBlendMode.h>
Romain Guy5cbbce52010-06-27 22:59:20 -070026
Chris Craik096b8d92013-03-01 11:08:11 -080027#include "Debug.h"
Chris Craik0519c8102015-02-11 13:17:06 -080028#include "FloatColor.h"
Romain Guy0b9db912010-07-09 18:53:25 -070029#include "Matrix.h"
Romain Guyf3a910b42011-12-12 20:35:21 -080030#include "Properties.h"
Romain Guy0b9db912010-07-09 18:53:25 -070031
Romain Guy5cbbce52010-06-27 22:59:20 -070032namespace android {
33namespace uirenderer {
34
Romain Guyf3a910b42011-12-12 20:35:21 -080035///////////////////////////////////////////////////////////////////////////////
36// Defines
37///////////////////////////////////////////////////////////////////////////////
38
39// Debug
40#if DEBUG_PROGRAMS
Steve Block5baa3a62011-12-20 16:23:08 +000041 #define PROGRAM_LOGD(...) ALOGD(__VA_ARGS__)
Romain Guyf3a910b42011-12-12 20:35:21 -080042#else
43 #define PROGRAM_LOGD(...)
44#endif
45
Romain Guyf8773082012-07-12 18:01:00 -070046#define COLOR_COMPONENT_THRESHOLD 1.0f
47#define COLOR_COMPONENT_INV_THRESHOLD 0.0f
Romain Guyf3a910b42011-12-12 20:35:21 -080048
Chris Craikdeeda3d2014-05-05 19:09:33 -070049#define PROGRAM_KEY_TEXTURE 0x01
50#define PROGRAM_KEY_A8_TEXTURE 0x02
51#define PROGRAM_KEY_BITMAP 0x04
52#define PROGRAM_KEY_GRADIENT 0x08
53#define PROGRAM_KEY_BITMAP_FIRST 0x10
54#define PROGRAM_KEY_COLOR_MATRIX 0x20
55#define PROGRAM_KEY_COLOR_BLEND 0x40
56#define PROGRAM_KEY_BITMAP_NPOT 0x80
sergeyv9c97e482016-12-12 16:14:11 -080057#define PROGRAM_KEY_BITMAP_EXTERNAL 0x100
Romain Guyf3a910b42011-12-12 20:35:21 -080058
Chris Craikdeeda3d2014-05-05 19:09:33 -070059#define PROGRAM_KEY_SWAP_SRC_DST 0x2000
60
61#define PROGRAM_KEY_BITMAP_WRAPS_MASK 0x600
Romain Guyf3a910b42011-12-12 20:35:21 -080062#define PROGRAM_KEY_BITMAP_WRAPT_MASK 0x1800
63
64// Encode the xfermodes on 6 bits
65#define PROGRAM_MAX_XFERMODE 0x1f
66#define PROGRAM_XFERMODE_SHADER_SHIFT 26
67#define PROGRAM_XFERMODE_COLOR_OP_SHIFT 20
68#define PROGRAM_XFERMODE_FRAMEBUFFER_SHIFT 14
69
70#define PROGRAM_BITMAP_WRAPS_SHIFT 9
71#define PROGRAM_BITMAP_WRAPT_SHIFT 11
72
Chris Craik6d29c8d2013-05-08 18:35:44 -070073#define PROGRAM_GRADIENT_TYPE_SHIFT 33 // 2 bits for gradient type
Romain Guyf3a910b42011-12-12 20:35:21 -080074#define PROGRAM_MODULATE_SHIFT 35
75
Chris Craik91a8c7c2014-08-12 14:31:35 -070076#define PROGRAM_HAS_VERTEX_ALPHA_SHIFT 36
77#define PROGRAM_USE_SHADOW_ALPHA_INTERP_SHIFT 37
Romain Guyf3a910b42011-12-12 20:35:21 -080078
Chris Craikbf759452014-08-11 16:00:44 -070079#define PROGRAM_HAS_EXTERNAL_TEXTURE_SHIFT 38
80#define PROGRAM_HAS_TEXTURE_TRANSFORM_SHIFT 39
Romain Guyf3a910b42011-12-12 20:35:21 -080081
Chris Craik11718bc2015-09-22 11:50:13 -070082#define PROGRAM_IS_SIMPLE_GRADIENT 40
Romain Guyf3a910b42011-12-12 20:35:21 -080083
Chris Craik11718bc2015-09-22 11:50:13 -070084#define PROGRAM_HAS_COLORS 41
Romain Guy41210632012-07-16 17:04:24 -070085
Chris Craik11718bc2015-09-22 11:50:13 -070086#define PROGRAM_HAS_DEBUG_HIGHLIGHT 42
87#define PROGRAM_HAS_ROUND_RECT_CLIP 43
Romain Guy3ff0bfd2013-02-25 14:15:37 -080088
Romain Guy253f2c22016-09-28 17:34:42 -070089#define PROGRAM_HAS_GAMMA_CORRECTION 44
90
Romain Guyf3a910b42011-12-12 20:35:21 -080091///////////////////////////////////////////////////////////////////////////////
92// Types
93///////////////////////////////////////////////////////////////////////////////
94
95typedef uint64_t programid;
96
97///////////////////////////////////////////////////////////////////////////////
98// Program description
99///////////////////////////////////////////////////////////////////////////////
100
101/**
102 * Describe the features required for a given program. The features
103 * determine the generation of both the vertex and fragment shaders.
104 * A ProgramDescription must be used in conjunction with a ProgramCache.
105 */
106struct ProgramDescription {
Chris Craikb9ce116d2015-08-20 15:14:06 -0700107 enum class ColorFilterMode {
108 None = 0,
109 Matrix,
110 Blend
Romain Guyf3a910b42011-12-12 20:35:21 -0800111 };
112
113 enum Gradient {
Romain Guy42e1e0d2012-07-30 14:47:51 -0700114 kGradientLinear = 0,
Romain Guyf3a910b42011-12-12 20:35:21 -0800115 kGradientCircular,
116 kGradientSweep
117 };
118
119 ProgramDescription() {
120 reset();
121 }
122
123 // Texturing
124 bool hasTexture;
125 bool hasAlpha8Texture;
126 bool hasExternalTexture;
127 bool hasTextureTransform;
128
Romain Guyff316ec2013-02-13 18:39:43 -0800129 // Color attribute
130 bool hasColors;
131
Romain Guyf3a910b42011-12-12 20:35:21 -0800132 // Modulate, this should only be set when setColor() return true
133 bool modulate;
134
135 // Shaders
136 bool hasBitmap;
sergeyv9c97e482016-12-12 16:14:11 -0800137 bool isShaderBitmapExternal;
sergeyv554ffeb2016-11-15 18:01:21 -0800138 bool useShaderBasedWrap;
Romain Guyf3a910b42011-12-12 20:35:21 -0800139
Chris Craik91a8c7c2014-08-12 14:31:35 -0700140 bool hasVertexAlpha;
141 bool useShadowAlphaInterp;
Romain Guyf3a910b42011-12-12 20:35:21 -0800142
143 bool hasGradient;
144 Gradient gradientType;
Romain Guy42e1e0d2012-07-30 14:47:51 -0700145 bool isSimpleGradient;
Romain Guyf3a910b42011-12-12 20:35:21 -0800146
Mike Reedc2f31df2016-10-28 17:21:45 -0400147 SkBlendMode shadersMode;
Romain Guyf3a910b42011-12-12 20:35:21 -0800148
149 bool isBitmapFirst;
150 GLenum bitmapWrapS;
151 GLenum bitmapWrapT;
152
153 // Color operations
Chris Craik117bdbc2015-02-05 10:12:38 -0800154 ColorFilterMode colorOp;
Mike Reedc2f31df2016-10-28 17:21:45 -0400155 SkBlendMode colorMode;
Romain Guyf3a910b42011-12-12 20:35:21 -0800156
157 // Framebuffer blending (requires Extensions.hasFramebufferFetch())
Mike Reedc2f31df2016-10-28 17:21:45 -0400158 // Ignored for all values < SkBlendMode::kPlus
159 SkBlendMode framebufferMode;
Romain Guyf3a910b42011-12-12 20:35:21 -0800160 bool swapSrcDst;
161
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800162 bool hasDebugHighlight;
Chris Craikdeeda3d2014-05-05 19:09:33 -0700163 bool hasRoundRectClip;
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800164
Romain Guy253f2c22016-09-28 17:34:42 -0700165 bool hasGammaCorrection;
166
Romain Guyf3a910b42011-12-12 20:35:21 -0800167 /**
168 * Resets this description. All fields are reset back to the default
169 * values they hold after building a new instance.
170 */
171 void reset() {
172 hasTexture = false;
173 hasAlpha8Texture = false;
174 hasExternalTexture = false;
175 hasTextureTransform = false;
176
Romain Guyff316ec2013-02-13 18:39:43 -0800177 hasColors = false;
178
Chris Craik91a8c7c2014-08-12 14:31:35 -0700179 hasVertexAlpha = false;
180 useShadowAlphaInterp = false;
Romain Guyf3a910b42011-12-12 20:35:21 -0800181
182 modulate = false;
183
184 hasBitmap = false;
sergeyv9c97e482016-12-12 16:14:11 -0800185 isShaderBitmapExternal = false;
sergeyv554ffeb2016-11-15 18:01:21 -0800186 useShaderBasedWrap = false;
Romain Guyf3a910b42011-12-12 20:35:21 -0800187
188 hasGradient = false;
189 gradientType = kGradientLinear;
Romain Guy42e1e0d2012-07-30 14:47:51 -0700190 isSimpleGradient = false;
Romain Guyf3a910b42011-12-12 20:35:21 -0800191
Mike Reedc2f31df2016-10-28 17:21:45 -0400192 shadersMode = SkBlendMode::kClear;
Romain Guyf3a910b42011-12-12 20:35:21 -0800193
194 isBitmapFirst = false;
195 bitmapWrapS = GL_CLAMP_TO_EDGE;
196 bitmapWrapT = GL_CLAMP_TO_EDGE;
197
Chris Craikb9ce116d2015-08-20 15:14:06 -0700198 colorOp = ColorFilterMode::None;
Mike Reedc2f31df2016-10-28 17:21:45 -0400199 colorMode = SkBlendMode::kClear;
Romain Guyf3a910b42011-12-12 20:35:21 -0800200
Mike Reedc2f31df2016-10-28 17:21:45 -0400201 framebufferMode = SkBlendMode::kClear;
Romain Guyf3a910b42011-12-12 20:35:21 -0800202 swapSrcDst = false;
203
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800204 hasDebugHighlight = false;
Chris Craikdeeda3d2014-05-05 19:09:33 -0700205 hasRoundRectClip = false;
Romain Guy253f2c22016-09-28 17:34:42 -0700206
207 hasGammaCorrection = false;
Romain Guyf3a910b42011-12-12 20:35:21 -0800208 }
209
210 /**
211 * Indicates, for a given color, whether color modulation is required in
212 * the fragment shader. When this method returns true, the program should
213 * be provided with a modulation color.
214 */
Chris Craike63f7c622013-10-17 10:30:55 -0700215 bool setColorModulate(const float a) {
Romain Guya938f562012-09-13 20:31:08 -0700216 modulate = a < COLOR_COMPONENT_THRESHOLD;
Romain Guyf3a910b42011-12-12 20:35:21 -0800217 return modulate;
218 }
219
220 /**
221 * Indicates, for a given color, whether color modulation is required in
222 * the fragment shader. When this method returns true, the program should
223 * be provided with a modulation color.
224 */
Chris Craike63f7c622013-10-17 10:30:55 -0700225 bool setAlpha8ColorModulate(const float r, const float g, const float b, const float a) {
Romain Guyf3a910b42011-12-12 20:35:21 -0800226 modulate = a < COLOR_COMPONENT_THRESHOLD || r > COLOR_COMPONENT_INV_THRESHOLD ||
227 g > COLOR_COMPONENT_INV_THRESHOLD || b > COLOR_COMPONENT_INV_THRESHOLD;
228 return modulate;
229 }
230
231 /**
232 * Computes the unique key identifying this program.
233 */
234 programid key() const {
235 programid key = 0;
236 if (hasTexture) key |= PROGRAM_KEY_TEXTURE;
237 if (hasAlpha8Texture) key |= PROGRAM_KEY_A8_TEXTURE;
238 if (hasBitmap) {
239 key |= PROGRAM_KEY_BITMAP;
sergeyv554ffeb2016-11-15 18:01:21 -0800240 if (useShaderBasedWrap) {
Romain Guyf3a910b42011-12-12 20:35:21 -0800241 key |= PROGRAM_KEY_BITMAP_NPOT;
242 key |= getEnumForWrap(bitmapWrapS) << PROGRAM_BITMAP_WRAPS_SHIFT;
243 key |= getEnumForWrap(bitmapWrapT) << PROGRAM_BITMAP_WRAPT_SHIFT;
244 }
sergeyv9c97e482016-12-12 16:14:11 -0800245 if (isShaderBitmapExternal) {
246 key |= PROGRAM_KEY_BITMAP_EXTERNAL;
247 }
Romain Guyf3a910b42011-12-12 20:35:21 -0800248 }
249 if (hasGradient) key |= PROGRAM_KEY_GRADIENT;
250 key |= programid(gradientType) << PROGRAM_GRADIENT_TYPE_SHIFT;
251 if (isBitmapFirst) key |= PROGRAM_KEY_BITMAP_FIRST;
252 if (hasBitmap && hasGradient) {
Mike Reedc2f31df2016-10-28 17:21:45 -0400253 key |= ((int)shadersMode & PROGRAM_MAX_XFERMODE) << PROGRAM_XFERMODE_SHADER_SHIFT;
Romain Guyf3a910b42011-12-12 20:35:21 -0800254 }
255 switch (colorOp) {
Chris Craikb9ce116d2015-08-20 15:14:06 -0700256 case ColorFilterMode::Matrix:
Romain Guyf3a910b42011-12-12 20:35:21 -0800257 key |= PROGRAM_KEY_COLOR_MATRIX;
258 break;
Chris Craikb9ce116d2015-08-20 15:14:06 -0700259 case ColorFilterMode::Blend:
Romain Guyf3a910b42011-12-12 20:35:21 -0800260 key |= PROGRAM_KEY_COLOR_BLEND;
Mike Reedc2f31df2016-10-28 17:21:45 -0400261 key |= ((int)colorMode & PROGRAM_MAX_XFERMODE) << PROGRAM_XFERMODE_COLOR_OP_SHIFT;
Romain Guyf3a910b42011-12-12 20:35:21 -0800262 break;
Chris Craikb9ce116d2015-08-20 15:14:06 -0700263 case ColorFilterMode::None:
Romain Guyf3a910b42011-12-12 20:35:21 -0800264 break;
265 }
Mike Reedc2f31df2016-10-28 17:21:45 -0400266 key |= ((int)framebufferMode & PROGRAM_MAX_XFERMODE) << PROGRAM_XFERMODE_FRAMEBUFFER_SHIFT;
Romain Guyf3a910b42011-12-12 20:35:21 -0800267 if (swapSrcDst) key |= PROGRAM_KEY_SWAP_SRC_DST;
268 if (modulate) key |= programid(0x1) << PROGRAM_MODULATE_SHIFT;
Chris Craik91a8c7c2014-08-12 14:31:35 -0700269 if (hasVertexAlpha) key |= programid(0x1) << PROGRAM_HAS_VERTEX_ALPHA_SHIFT;
270 if (useShadowAlphaInterp) key |= programid(0x1) << PROGRAM_USE_SHADOW_ALPHA_INTERP_SHIFT;
Romain Guyf3a910b42011-12-12 20:35:21 -0800271 if (hasExternalTexture) key |= programid(0x1) << PROGRAM_HAS_EXTERNAL_TEXTURE_SHIFT;
272 if (hasTextureTransform) key |= programid(0x1) << PROGRAM_HAS_TEXTURE_TRANSFORM_SHIFT;
Romain Guy42e1e0d2012-07-30 14:47:51 -0700273 if (isSimpleGradient) key |= programid(0x1) << PROGRAM_IS_SIMPLE_GRADIENT;
Romain Guyff316ec2013-02-13 18:39:43 -0800274 if (hasColors) key |= programid(0x1) << PROGRAM_HAS_COLORS;
Romain Guy3ff0bfd2013-02-25 14:15:37 -0800275 if (hasDebugHighlight) key |= programid(0x1) << PROGRAM_HAS_DEBUG_HIGHLIGHT;
Chris Craikdeeda3d2014-05-05 19:09:33 -0700276 if (hasRoundRectClip) key |= programid(0x1) << PROGRAM_HAS_ROUND_RECT_CLIP;
Romain Guy253f2c22016-09-28 17:34:42 -0700277 if (hasGammaCorrection) key |= programid(0x1) << PROGRAM_HAS_GAMMA_CORRECTION;
Romain Guyf3a910b42011-12-12 20:35:21 -0800278 return key;
279 }
280
281 /**
282 * Logs the specified message followed by the key identifying this program.
283 */
284 void log(const char* message) const {
285#if DEBUG_PROGRAMS
286 programid k = key();
287 PROGRAM_LOGD("%s (key = 0x%.8x%.8x)", message, uint32_t(k >> 32),
288 uint32_t(k & 0xffffffff));
289#endif
290 }
291
292private:
Romain Guy41210632012-07-16 17:04:24 -0700293 static inline uint32_t getEnumForWrap(GLenum wrap) {
Romain Guyf3a910b42011-12-12 20:35:21 -0800294 switch (wrap) {
295 case GL_CLAMP_TO_EDGE:
296 return 0;
297 case GL_REPEAT:
298 return 1;
299 case GL_MIRRORED_REPEAT:
300 return 2;
301 }
302 return 0;
303 }
304
305}; // struct ProgramDescription
306
Romain Guy5cbbce52010-06-27 22:59:20 -0700307/**
308 * A program holds a vertex and a fragment shader. It offers several utility
309 * methods to query attributes and uniforms.
310 */
Romain Guy889f8d12010-07-29 14:37:42 -0700311class Program {
Romain Guy5cbbce52010-06-27 22:59:20 -0700312public:
Romain Guy3e263fa2011-12-12 16:47:48 -0800313 enum ShaderBindings {
314 kBindingPosition,
315 kBindingTexCoords
316 };
317
Romain Guy5cbbce52010-06-27 22:59:20 -0700318 /**
319 * Creates a new program with the specified vertex and fragment
320 * shaders sources.
321 */
Romain Guyf3a910b42011-12-12 20:35:21 -0800322 Program(const ProgramDescription& description, const char* vertex, const char* fragment);
Romain Guy6926c722010-07-12 20:20:03 -0700323 virtual ~Program();
Romain Guy5cbbce52010-06-27 22:59:20 -0700324
325 /**
326 * Binds this program to the GL context.
327 */
Romain Guy6926c722010-07-12 20:20:03 -0700328 virtual void use();
Romain Guy5cbbce52010-06-27 22:59:20 -0700329
Romain Guy260e1022010-07-12 14:41:06 -0700330 /**
331 * Marks this program as unused. This will not unbind
332 * the program from the GL context.
333 */
Romain Guy6926c722010-07-12 20:20:03 -0700334 virtual void remove();
Romain Guy260e1022010-07-12 14:41:06 -0700335
336 /**
Romain Guyac670c02010-07-27 17:39:27 -0700337 * Returns the OpenGL name of the specified attribute.
338 */
339 int getAttrib(const char* name);
340
341 /**
342 * Returns the OpenGL name of the specified uniform.
343 */
344 int getUniform(const char* name);
345
346 /**
Romain Guy260e1022010-07-12 14:41:06 -0700347 * Indicates whether this program is currently in use with
348 * the GL context.
349 */
350 inline bool isInUse() const {
351 return mUse;
352 }
353
Romain Guy889f8d12010-07-29 14:37:42 -0700354 /**
Romain Guy67f27952010-12-07 20:09:23 -0800355 * Indicates whether this program was correctly compiled and linked.
356 */
357 inline bool isInitialized() const {
358 return mInitialized;
359 }
360
361 /**
Romain Guy889f8d12010-07-29 14:37:42 -0700362 * Binds the program with the specified projection, modelView and
363 * transform matrices.
364 */
365 void set(const mat4& projectionMatrix, const mat4& modelViewMatrix,
Chet Haase8a5cc922011-04-26 07:28:09 -0700366 const mat4& transformMatrix, bool offset = false);
Romain Guy889f8d12010-07-29 14:37:42 -0700367
368 /**
Romain Guy707b2f72010-10-11 16:34:59 -0700369 * Sets the color associated with this shader.
370 */
Chris Craik0519c8102015-02-11 13:17:06 -0800371 void setColor(FloatColor color);
Romain Guy707b2f72010-10-11 16:34:59 -0700372
373 /**
Chris Craik6c15ffa2015-02-02 13:50:55 -0800374 * Name of the texCoords attribute if it exists (kBindingTexCoords), -1 otherwise.
Romain Guyf3a910b42011-12-12 20:35:21 -0800375 */
376 int texCoords;
377
378 /**
Romain Guy889f8d12010-07-29 14:37:42 -0700379 * Name of the transform uniform.
380 */
381 int transform;
382
Romain Guy39284b72012-09-26 16:39:40 -0700383 /**
384 * Name of the projection uniform.
385 */
386 int projection;
387
Romain Guy5cbbce52010-06-27 22:59:20 -0700388protected:
389 /**
390 * Adds an attribute with the specified name.
391 *
392 * @return The OpenGL name of the attribute.
393 */
394 int addAttrib(const char* name);
Romain Guy5cbbce52010-06-27 22:59:20 -0700395
396 /**
Romain Guy3e263fa2011-12-12 16:47:48 -0800397 * Binds the specified attribute name to the specified slot.
398 */
399 int bindAttrib(const char* name, ShaderBindings bindingSlot);
400
401 /**
Romain Guy5cbbce52010-06-27 22:59:20 -0700402 * Adds a uniform with the specified name.
403 *
404 * @return The OpenGL name of the uniform.
405 */
406 int addUniform(const char* name);
Romain Guy5cbbce52010-06-27 22:59:20 -0700407
408private:
409 /**
410 * Compiles the specified shader of the specified type.
411 *
412 * @return The name of the compiled shader.
413 */
414 GLuint buildShader(const char* source, GLenum type);
415
Romain Guy3e263fa2011-12-12 16:47:48 -0800416 // Name of the OpenGL program and shaders
Romain Guy05bbde72011-12-09 12:55:37 -0800417 GLuint mProgramId;
Romain Guy3e263fa2011-12-12 16:47:48 -0800418 GLuint mVertexShader;
419 GLuint mFragmentShader;
Romain Guy5cbbce52010-06-27 22:59:20 -0700420
421 // Keeps track of attributes and uniforms slots
Romain Guy05bbde72011-12-09 12:55:37 -0800422 KeyedVector<const char*, int> mAttributes;
423 KeyedVector<const char*, int> mUniforms;
Romain Guy260e1022010-07-12 14:41:06 -0700424
425 bool mUse;
Romain Guy67f27952010-12-07 20:09:23 -0800426 bool mInitialized;
Romain Guy05bbde72011-12-09 12:55:37 -0800427
Romain Guy3b748a42013-04-17 18:54:38 -0700428 // Uniforms caching
Romain Guy05bbde72011-12-09 12:55:37 -0800429 bool mHasColorUniform;
430 int mColorUniform;
Romain Guy2d4fd362011-12-13 22:00:19 -0800431
432 bool mHasSampler;
Romain Guy3b748a42013-04-17 18:54:38 -0700433
434 mat4 mProjection;
Chris Craikd04a6b12014-01-29 13:00:33 -0800435 bool mOffset;
Romain Guy5cbbce52010-06-27 22:59:20 -0700436}; // class Program
437
Romain Guy5cbbce52010-06-27 22:59:20 -0700438}; // namespace uirenderer
439}; // namespace android
440
Romain Guy5b3b3522010-10-27 18:57:51 -0700441#endif // ANDROID_HWUI_PROGRAM_H