diff options
| author | joshualitt <joshualitt@chromium.org> | 2014-10-07 16:43:25 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2014-10-07 16:43:25 -0700 |
| commit | 47bb38283072dc87dc93220cd2f370ca109972ff (patch) | |
| tree | 973cb20bb7c4cb4f865b4977b7b218829a7bf1ab /tests/GLProgramsTest.cpp | |
| parent | e6efd39a33a9efa5e20c3289384c0e08ef8c9287 (diff) | |
Cleanup of shader building system
this is a huge refactor and cleanup of the gl shader building system in
Skia. The entire shader building pipeline is now part of
GrGLProgramCreator, which takes a gp, and some fps, and creates a
program. I added some subclasses of GrGLProgram to handle the
eccentricities of Nvpr/Nvpres. Outside of the builders folder
and GrGLPrograms, this change is basically just a rename
solo gp
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/fe1233c3f12f81bb675718516bbb32f72af726ec
Review URL: https://codereview.chromium.org/611653002
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index d8ce3fdc9f..c31aa1e0da 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -16,6 +16,7 @@ #include "GrContextFactory.h" #include "GrOptDrawState.h" #include "effects/GrConfigConversionEffect.h" +#include "gl/builders/GrGLProgramBuilder.h" #include "gl/GrGLPathRendering.h" #include "gl/GrGpuGL.h" #include "SkChecksum.h" @@ -24,7 +25,7 @@ static void get_stage_stats(const GrFragmentStage stage, bool* readsDst, bool* readsFragPosition, bool* requiresVertexShader) { - if (stage.getFragmentProcessor()->willReadDstColor()) { + if (stage.getProcessor()->willReadDstColor()) { *readsDst = true; } if (stage.getProcessor()->willReadFragmentPosition()) { @@ -335,12 +336,14 @@ bool GrGpuGL::programUnitTest(int maxStages) { SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(this->getDrawState(), *this->caps(), drawType)); - SkAutoTUnref<GrGLProgram> program(GrGLProgram::Create(this, - *optState.get(), - pdesc, - geometryProcessor.get(), - stages, - stages + numColorStages)); + SkAutoTUnref<GrGLProgram> program( + GrGLProgramBuilder::CreateProgram(*optState, + pdesc, + drawType, + geometryProcessor, + stages, + stages + numColorStages, + this)); for (int s = 0; s < numStages; ++s) { SkDELETE(stages[s]); } |
