Correctly support pre-multiplied alpha, optimizations, more stuff.
Add support for the following drawing functions:
- drawBitmap(int[]...)
- drawPaint()
Optimizes shader state changes by enabling/disabling attribute arrays
only when needed.
Adds quick rejects when drawing trivial shapes to avoid unnecessary
OpenGL operations.
Change-Id: Ic2c6c2ed1523d08a63a8c95601a1ec40b6c7fbc9
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index 652befe1..d90bcaf 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -39,18 +39,18 @@
* shaders sources.
*/
Program(const char* vertex, const char* fragment);
- ~Program();
+ virtual ~Program();
/**
* Binds this program to the GL context.
*/
- void use();
+ virtual void use();
/**
* Marks this program as unused. This will not unbind
* the program from the GL context.
*/
- void remove();
+ virtual void remove();
/**
* Indicates whether this program is currently in use with
@@ -129,6 +129,17 @@
const mat4& transformMatrix);
/**
+ * Binds this program to the GL context.
+ */
+ virtual void use();
+
+ /**
+ * Marks this program as unused. This will not unbind
+ * the program from the GL context.
+ */
+ virtual void remove();
+
+ /**
* Name of the position attribute.
*/
int position;
@@ -157,6 +168,17 @@
DrawTextureProgram();
/**
+ * Binds this program to the GL context.
+ */
+ virtual void use();
+
+ /**
+ * Marks this program as unused. This will not unbind
+ * the program from the GL context.
+ */
+ virtual void remove();
+
+ /**
* Name of the texture sampler uniform.
*/
int sampler;