Increase number of stages from 1 to 2
Move GrTextContext from stage 0 to stage 1 so it doesn't conflict with GrPaint (allow textured text)
Switch to dynamically generated shaders



git-svn-id: http://skia.googlecode.com/svn/trunk@721 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuGLShaders2.cpp b/gpu/src/GrGpuGLShaders2.cpp
index 1218a36..25d0aeb 100644
--- a/gpu/src/GrGpuGLShaders2.cpp
+++ b/gpu/src/GrGpuGLShaders2.cpp
@@ -236,13 +236,17 @@
     return (x >> 8) | (x << 24);
 }
 
+static uint32_t rol(uint32_t x) {
+    return (x << 8) | (x >> 24);
+}
+
 GrGpuGLShaders2::ProgramCache::HashKey::HashKey(const ProgramDesc& desc) {
     fDesc = desc;
     // if you change the size of the desc, need to update the hash function
-    GR_STATIC_ASSERT(8 == sizeof(ProgramDesc));
+    GR_STATIC_ASSERT(12 == sizeof(ProgramDesc));
 
     uint32_t* d = (uint32_t*) &fDesc;
-    fHash = d[0] ^ ror(d[1]);
+    fHash = d[0] ^ ror(d[1]) ^ rol(d[2]);
 }
 
 bool GrGpuGLShaders2::ProgramCache::HashKey::EQ(const Entry& entry,
@@ -267,7 +271,6 @@
     return fHash;
 }
 
-
 struct GrGpuGLShaders2::ShaderCodeSegments {
     GrSStringBuilder<256> fVSUnis;
     GrSStringBuilder<256> fVSAttrs;