aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 17:23:21 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 17:23:21 +0000
commit7534747e631c49680f7199ccf9e71a359cfa647d (patch)
tree1b51964a307b5449217c78e426b2c3c06175ddbb /src/gpu/gl/GrGpuGL.cpp
parent0729b623730983821ef53fad9c988bad030509ed (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.cpp9
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;