diff options
author | 2011-03-04 20:29:08 +0000 | |
---|---|---|
committer | 2011-03-04 20:29:08 +0000 | |
commit | 5aaa69e4339e229adfb05e96084a8ec0a590238b (patch) | |
tree | 0a4c274694b62f8e908d73adaa0d28215fd9fe7b /gpu/src/GrGpuGLShaders2.cpp | |
parent | f7c2c4544f866ae65cd9a4eee4da563f6d653d20 (diff) |
Fixups for clipstack, convexity test for paths.
Review URL http://codereview.appspot.com/4250056/
git-svn-id: http://skia.googlecode.com/svn/trunk@891 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGLShaders2.cpp')
-rw-r--r-- | gpu/src/GrGpuGLShaders2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gpu/src/GrGpuGLShaders2.cpp b/gpu/src/GrGpuGLShaders2.cpp index 14134e7b6c..77847e9fba 100644 --- a/gpu/src/GrGpuGLShaders2.cpp +++ b/gpu/src/GrGpuGLShaders2.cpp @@ -1257,7 +1257,10 @@ bool GrGpuGLShaders2::flushGraphicsState(GrPrimitiveType type) { // invalidate the immediate mode color fHWDrawState.fColor = GrColor_ILLEGAL; } else { - if (fHWDrawState.fColor != fCurrDrawState.fColor) { + if (fHWDrawState.fColor != fCurrDrawState.fColor && + (!GR_AGGRESSIVE_SHADER_OPTS || 0xffffffff != fCurrDrawState.fColor)) { + // avoid pushing the color attrib if the shader will optimize it out + // OpenGL ES only supports the float varities of glVertexAttrib float c[] = { GrColorUnpackR(fCurrDrawState.fColor) / 255.f, |