Fix clang static analyzer errors in Gr

Review URL: http://codereview.appspot.com/5433055/


git-svn-id: http://skia.googlecode.com/svn/trunk@2743 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-11-23 16:53:42 +00:00
parent 055af884c8
commit 2cdfade4e8
2 changed files with 8 additions and 3 deletions

View File

@ -1763,8 +1763,13 @@ void GrGpuGL::flushStencil() {
GrAssert(stencilBits ||
(GrStencilSettings::gDisabled ==
fCurrDrawState.fStencilSettings));
GrGLuint clipStencilMask = 1 << (stencilBits - 1);
GrGLuint userStencilMask = clipStencilMask - 1;
GrGLuint clipStencilMask = 0;
GrGLuint userStencilMask = ~0;
if (stencilBits > 0) {
clipStencilMask = 1 << (stencilBits - 1);
userStencilMask = clipStencilMask - 1;
}
unsigned int frontRef = settings->fFrontFuncRef;
unsigned int frontMask = settings->fFrontFuncMask;

View File

@ -546,7 +546,7 @@ void GrGpuGLShaders::flushRadial2(int s) {
// down).
float values[6] = {
GrScalarToFloat(a),
1 / (2.f * values[0]),
1 / (2.f * GrScalarToFloat(a)),
GrScalarToFloat(centerX1),
GrScalarToFloat(radius0),
GrScalarToFloat(GrMul(radius0, radius0)),