summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Program.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-07-12 20:20:03 -0700
committerRomain Guy <romainguy@google.com>2010-07-12 20:20:03 -0700
commit6926c72e25b8dec3dd4b84af0819fa1937ae7296 (patch)
treeb59a3b01ddbc9ae8c0b5f11eaa6fcf27a9f9511d /libs/hwui/Program.h
parent260e102162322958cf17dbd895cd6bd30dc87e32 (diff)
downloadframeworks_base-6926c72e25b8dec3dd4b84af0819fa1937ae7296.zip
frameworks_base-6926c72e25b8dec3dd4b84af0819fa1937ae7296.tar.gz
frameworks_base-6926c72e25b8dec3dd4b84af0819fa1937ae7296.tar.bz2
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
Diffstat (limited to 'libs/hwui/Program.h')
-rw-r--r--libs/hwui/Program.h28
1 files changed, 25 insertions, 3 deletions
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 @@ public:
* 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 @@ public:
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 @@ public:
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;