OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLProgramBuilder.h" | 8 #include "GrGLProgramBuilder.h" |
9 | 9 |
10 #include "gl/GrGLGeometryProcessor.h" | 10 #include "gl/GrGLGeometryProcessor.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X) | 24 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X) |
25 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X) | 25 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X) |
26 | 26 |
27 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 27 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
28 | 28 |
29 class GrGLNvprProgramBuilder : public GrGLProgramBuilder { | 29 class GrGLNvprProgramBuilder : public GrGLProgramBuilder { |
30 public: | 30 public: |
31 GrGLNvprProgramBuilder(GrGLGpu* gpu, const DrawArgs& args) | 31 GrGLNvprProgramBuilder(GrGLGpu* gpu, const DrawArgs& args) |
32 : INHERITED(gpu, args) {} | 32 : INHERITED(gpu, args) {} |
33 | 33 |
34 GrGLProgram* createProgram(GrGLuint programID) SK_OVERRIDE { | 34 GrGLProgram* createProgram(GrGLuint programID) override { |
35 // this is just for nvpr es, which has separable varyings that are plugg
ed in after | 35 // this is just for nvpr es, which has separable varyings that are plugg
ed in after |
36 // building | 36 // building |
37 GrGLPathProcessor* pathProc = | 37 GrGLPathProcessor* pathProc = |
38 static_cast<GrGLPathProcessor*>(fGeometryProcessor->fGLProc.get(
)); | 38 static_cast<GrGLPathProcessor*>(fGeometryProcessor->fGLProc.get(
)); |
39 pathProc->resolveSeparableVaryings(fGpu, programID); | 39 pathProc->resolveSeparableVaryings(fGpu, programID); |
40 return SkNEW_ARGS(GrGLNvprProgram, (fGpu, this->desc(), fUniformHandles,
programID, | 40 return SkNEW_ARGS(GrGLNvprProgram, (fGpu, this->desc(), fUniformHandles,
programID, |
41 fUniforms, | 41 fUniforms, |
42 fGeometryProcessor, | 42 fGeometryProcessor, |
43 fXferProcessor, fFragmentProcessors.
get())); | 43 fXferProcessor, fFragmentProcessors.
get())); |
44 } | 44 } |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 } | 496 } |
497 | 497 |
498 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 498 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
499 | 499 |
500 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 500 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
501 int numProcs = fProcs.count(); | 501 int numProcs = fProcs.count(); |
502 for (int e = 0; e < numProcs; ++e) { | 502 for (int e = 0; e < numProcs; ++e) { |
503 SkDELETE(fProcs[e]); | 503 SkDELETE(fProcs[e]); |
504 } | 504 } |
505 } | 505 } |
OLD | NEW |