Refactoring the GrGpuGLShaders2 into 2 classes: GrGpuGLShaders
and GrGLProgram.  The change also contains stubs and placeholders for GrEffect
(work in progress), which will extend shader and rendering capabilities in
Ganesh.  The hash keys for the program cache table have been modified to be able
to accomodate variable-length keys, which will be required for GrEffect support.

Code review: http://codereview.appspot.com/4309045/



git-svn-id: http://skia.googlecode.com/svn/trunk@1031 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuFactory.cpp b/gpu/src/GrGpuFactory.cpp
index 0030656..eb024f7 100644
--- a/gpu/src/GrGpuFactory.cpp
+++ b/gpu/src/GrGpuFactory.cpp
@@ -14,7 +14,6 @@
     limitations under the License.
  */
 
-
 #include "GrTypes.h"
 
 // must be before GrGLConfig.h
@@ -24,10 +23,10 @@
 
 #include "GrGLConfig.h"
 
-#include "GrGpuGLFixed.h"
-#include "GrGpuGLShaders2.h"
-
 #include "GrGpu.h"
+#include "GrGpuGLFixed.h"
+#include "GrGpuGLShaders.h"
+#include "GrGpuGLShaders2.h"
 
 GrGpu* GrGpu::Create(Engine engine, Platform3DContext context3D) {
     // If no GL bindings have been installed, fall-back to calling the
@@ -40,7 +39,13 @@
     switch (engine) {
         case kOpenGL_Shaders_Engine:
             GrAssert(NULL == context3D);
-            gpu = new GrGpuGLShaders2;
+            {
+#if GR_USE_NEW_GLSHADERS
+                gpu = new GrGpuGLShaders;
+#else
+                gpu = new GrGpuGLShaders2;
+#endif
+            }
             break;
         case kOpenGL_Fixed_Engine:
             GrAssert(NULL == context3D);