diff options
author | 2012-09-17 17:23:21 +0000 | |
---|---|---|
committer | 2012-09-17 17:23:21 +0000 | |
commit | 7534747e631c49680f7199ccf9e71a359cfa647d (patch) | |
tree | 1b51964a307b5449217c78e426b2c3c06175ddbb /src/gpu/gl/GrGpuGL.cpp | |
parent | 0729b623730983821ef53fad9c988bad030509ed (diff) |
Add GrColor to RGBA float helper func
Review URL: https://codereview.appspot.com/6518044/
git-svn-id: http://skia.googlecode.com/svn/trunk@5572 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 442bbb42a0..1cca043ee9 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -1986,13 +1986,8 @@ void GrGpuGL::flushBlend(bool isLines, BlendCoeffReferencesConstant(dstCoeff)) && (!fHWBlendState.fConstColorValid || fHWBlendState.fConstColor != blendConst)) { - - float c[] = { - GrColorUnpackR(blendConst) / 255.f, - GrColorUnpackG(blendConst) / 255.f, - GrColorUnpackB(blendConst) / 255.f, - GrColorUnpackA(blendConst) / 255.f - }; + GrGLfloat c[4]; + GrColorToRGBAFloat(blendConst, c); GL_CALL(BlendColor(c[0], c[1], c[2], c[3])); fHWBlendState.fConstColor = blendConst; fHWBlendState.fConstColorValid = true; |