Make aggressive shader opts an option in GrUserConfig.h. Currently just controls whether color=white optimization is applied (eliminates reading color varying and modulation by color). This was already a compile time option just not exposed through user config.
git-svn-id: http://skia.googlecode.com/svn/trunk@754 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrConfig.h b/gpu/include/GrConfig.h
index 4c5ddd6..2fa0164 100644
--- a/gpu/include/GrConfig.h
+++ b/gpu/include/GrConfig.h
@@ -305,10 +305,25 @@
#define GR_GL_LOG_CALLS 0
#endif
+/**
+ * GR_STATIC_RECT_VB controls whether rects are drawn by issuing a vertex
+ * for each corner or using a static vb that is positioned by modifying the
+ * view / texture matrix.
+ */
#if !defined(GR_STATIC_RECT_VB)
#define GR_STATIC_RECT_VB 0
#endif
+/**
+ * GR_AGGRESSIVE_SHADER_OPTS controls how aggressively shaders are optimized
+ * for special cases. On systems where program changes are expensive this
+ * may not be advantageous. Consecutive draws may no longer use the same
+ * program.
+ */
+#if !defined(GR_AGGRESSIVE_SHADER_OPTS)
+ #define GR_AGGRESSIVE_SHADER_OPTS 0
+#endif
+
///////////////////////////////////////////////////////////////////////////////
// tail section:
//