Remove GR_AGGRESSIVE_SHADER_OPTS build option.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7312058
git-svn-id: http://skia.googlecode.com/svn/trunk@7650 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h
index c782c92..0a187a0 100644
--- a/include/gpu/GrConfig.h
+++ b/include/gpu/GrConfig.h
@@ -338,16 +338,6 @@
#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 1
-#endif
-
-/**
* GR_GEOM_BUFFER_LOCK_THRESHOLD gives a threshold (in bytes) for when Gr should
* lock a GrGeometryBuffer to update its contents. It will use lock() if the
* size of the updated region is greater than the threshold. Otherwise it will
diff --git a/include/gpu/GrUserConfig.h b/include/gpu/GrUserConfig.h
index 578350e..d314910 100644
--- a/include/gpu/GrUserConfig.h
+++ b/include/gpu/GrUserConfig.h
@@ -34,12 +34,6 @@
//#define GR_DISABLE_DRAW_BUFFERING 1
/*
- * This causes more aggressive shader optimization. May hurt performance if
- * switching shaders is expensive.
- */
-//#define GR_AGGRESSIVE_SHADER_OPTS 1
-
-/*
* This gives a threshold in bytes of when to lock a GrGeometryBuffer vs using
* updateData. (Note the depending on the underlying 3D API the update functions
* may always be implemented using a lock)
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 873317a..7a3ae4c 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -529,9 +529,9 @@
bool colorIsTransBlack = SkToBool(blendOpts & kEmitTransBlack_BlendOptFlag);
bool colorIsSolidWhite = (blendOpts & kEmitCoverage_BlendOptFlag) ||
(!requiresAttributeColors && 0xffffffff == drawState.getColor());
- if (GR_AGGRESSIVE_SHADER_OPTS && colorIsTransBlack) {
+ if (colorIsTransBlack) {
desc->fColorInput = ProgramDesc::kTransBlack_ColorInput;
- } else if (GR_AGGRESSIVE_SHADER_OPTS && colorIsSolidWhite) {
+ } else if (colorIsSolidWhite) {
desc->fColorInput = ProgramDesc::kSolidWhite_ColorInput;
} else if (GR_GL_NO_CONSTANT_ATTRIBUTES && !requiresAttributeColors) {
desc->fColorInput = ProgramDesc::kUniform_ColorInput;