Glop ColorFilter & VertexBuffer support, initial enable
Enables Glop rendering for supported Rects and VertexBuffers
Also removes unused Query object
Change-Id: Ibe227bc362685a153159f75077664f0947764e06
diff --git a/libs/hwui/Glop.h b/libs/hwui/Glop.h
index bbeb19e..9150869 100644
--- a/libs/hwui/Glop.h
+++ b/libs/hwui/Glop.h
@@ -38,11 +38,13 @@
*/
enum VertexAttribFlags {
// NOTE: position attribute always enabled
+ kNone_Attrib = 0,
kTextureCoord_Attrib = 1 << 0,
kColor_Attrib = 1 << 1,
kAlpha_Attrib = 1 << 2,
};
+
/**
* Structure containing all data required to issue a single OpenGL draw
*
@@ -53,40 +55,53 @@
*/
// TODO: PREVENT_COPY_AND_ASSIGN(...) or similar
struct Glop {
+ struct FloatColor {
+ float a, r, g, b;
+ };
+
Rect bounds;
+ /*
+ * Stores mesh - vertex and index data.
+ *
+ * buffer objects and void*s are mutually exclusive
+ * indices are optional
+ */
struct Mesh {
VertexAttribFlags vertexFlags;
GLuint primitiveMode; // GL_TRIANGLES and GL_TRIANGLE_STRIP supported
GLuint vertexBufferObject;
GLuint indexBufferObject;
+ const void* vertices;
+ const void* indices;
int vertexCount;
GLsizei stride;
} mesh;
struct Fill {
Program* program;
-
- struct Color {
- float a, r, g, b;
- } color;
+ FloatColor color;
/* TODO
union shader {
//...
}; TODO
- union filter {
- //color
- //matrix + vector
- };
*/
+ ProgramDescription::ColorFilterMode filterMode;
+ union Filter {
+ struct Matrix {
+ float matrix[16];
+ float vector[4];
+ } matrix;
+ FloatColor color;
+ } filter;
} fill;
struct Transform {
Matrix4 ortho; // TODO: out of op, since this is static per FBO
Matrix4 modelView;
Matrix4 canvas;
- bool offset;
+ bool fudgingOffset;
} transform;
struct Blend {