diff options
author | bsalomon <bsalomon@google.com> | 2014-07-11 10:01:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-11 10:01:02 -0700 |
commit | 848faf00ec33d39ab3e31e9a11d805cae6ac6562 (patch) | |
tree | 3bc20e70f262fb5a7864796e890512b8006518ef /src/gpu/gl/GrGpuGL_program.cpp | |
parent | 6ca0b6a46cbe9bef3e2b9b9db813ec864efd62de (diff) |
This moves us towards variable length effect keys. The overall program key now allows for it. After the header it stores an array of offsets to effect keys. This allows us to grab the effect keys to pass to effects when they generate code. It also ensures that we can't get a collision by sets of keys that are different lengths but are the same when appended together.
R=robertphillips@google.com, jvanverth@google.com, egdaniel@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/356513003
Diffstat (limited to 'src/gpu/gl/GrGpuGL_program.cpp')
-rw-r--r-- | src/gpu/gl/GrGpuGL_program.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp index bd4758c856..9e1b6f5c2b 100644 --- a/src/gpu/gl/GrGpuGL_program.cpp +++ b/src/gpu/gl/GrGpuGL_program.cpp @@ -234,7 +234,7 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC SkSTArray<8, const GrEffectStage*, true> colorStages; SkSTArray<8, const GrEffectStage*, true> coverageStages; GrGLProgramDesc desc; - GrGLProgramDesc::Build(this->getDrawState(), + if (!GrGLProgramDesc::Build(this->getDrawState(), type, blendOpts, srcCoeff, @@ -243,7 +243,10 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC dstCopy, &colorStages, &coverageStages, - &desc); + &desc)) { + SkDEBUGFAIL("Failed to generate GL program descriptor"); + return false; + } fCurrentProgram.reset(fProgramCache->getProgram(desc, colorStages.begin(), |