aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgramDesc.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-12-10 07:43:49 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-10 07:43:50 -0800
commit4dffc940c430eec66d4707490eace19c9b3f7904 (patch)
treecce5e8c525a5acec67c4398c95c165223320d679 /src/gpu/gl/GrGLProgramDesc.cpp
parent28828d00b20d90b6caf91e4b0b31e80acadf2d57 (diff)
Create xfer processor backend.
This includes: -Having an actual XP stage at the end of the gl pipeline. -All Blending work is handled by XP until actually setting GL blend states -GLPrograms test to test XP BUG=skia: Review URL: https://codereview.chromium.org/764643004
Diffstat (limited to 'src/gpu/gl/GrGLProgramDesc.cpp')
-rw-r--r--src/gpu/gl/GrGLProgramDesc.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 068386c3aa..2476c5532c 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -189,13 +189,21 @@ bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState,
const GrFragmentProcessor& fp = *fps.getProcessor();
GrProcessorKeyBuilder b(&desc->fKey);
fp.getGLProcessorKey(gpu->glCaps(), &b);
- if (!get_meta_key(*fps.getProcessor(), gpu->glCaps(),
- gen_transform_key(fps, requiresLocalCoordAttrib), 0, &b)) {
+ if (!get_meta_key(fp, gpu->glCaps(),
+ gen_transform_key(fps, requiresLocalCoordAttrib), 0, &b)) {
desc->fKey.reset();
return false;
}
}
+ const GrXferProcessor& xp = *optState.getXferProcessor();
+ GrProcessorKeyBuilder b(&desc->fKey);
+ xp.getGLProcessorKey(gpu->glCaps(), &b);
+ if (!get_meta_key(xp, gpu->glCaps(), 0, 0, &b)) {
+ desc->fKey.reset();
+ return false;
+ }
+
// --------DO NOT MOVE HEADER ABOVE THIS LINE--------------------------------------------------
// Because header is a pointer into the dynamic array, we can't push any new data into the key
// below here.
@@ -260,9 +268,6 @@ bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState,
header->fFragPosKey = 0;
}
- header->fPrimaryOutputType = descInfo.fPrimaryOutputType;
- header->fSecondaryOutputType = descInfo.fSecondaryOutputType;
-
header->fColorEffectCnt = optState.numColorStages();
header->fCoverageEffectCnt = optState.numCoverageStages();
desc->finalize();