From ac670c0433d19397d4e36ced2110475b6f54fe26 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 27 Jul 2010 17:39:27 -0700 Subject: Generate shaders to cover all possible cases. With this change, all the vertex and fragment shaders used by the GL renderer are now generated based on a program description supplied by the caller. This allows the renderer to generate a large number of shaders without having to write all the possible combinations by hand. The generated shaders are stored in a program cache. Change-Id: If54d286e77ae021c724d42090da476df12a18ebb --- libs/hwui/OpenGLRenderer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/hwui/OpenGLRenderer.h') diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 248c9c3c1b6d..975be056b15f 100644 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -41,6 +41,7 @@ #include "PatchCache.h" #include "Vertex.h" #include "FontRenderer.h" +#include "ProgramCache.h" namespace android { namespace uirenderer { @@ -268,7 +269,7 @@ private: SkXfermode::Mode mode); /** - * Resets the texture coordinates stored in mDrawTextureVertices. Setting the values + * Resets the texture coordinates stored in mMeshVertices. Setting the values * back to default is achieved by calling: * * resetDrawTextureTexCoords(0.0f, 0.0f, 1.0f, 1.0f); @@ -337,7 +338,7 @@ private: sp mDrawLinearGradientProgram; // Used to draw textured quads - TextureVertex mDrawTextureVertices[4]; + TextureVertex mMeshVertices[4]; // Current texture state GLuint mLastTexture; @@ -372,6 +373,7 @@ private: TextureCache mTextureCache; LayerCache mLayerCache; GradientCache mGradientCache; + ProgramCache mProgramCache; PatchCache mPatchCache; }; // class OpenGLRenderer -- cgit v1.2.3-59-g8ed1b