Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp

Issue 821243003: removing coord change matrices (Closed) Base URL: https://skia.googlesource.com/skia.git@no-coordchange-on-drawstate
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "GrGLNvprProgramBuilder.h" 8 #include "GrGLNvprProgramBuilder.h"
9 #include "../GrGLGpu.h" 9 #include "../GrGLGpu.h"
10 10
11 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X) 11 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X)
12 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X) 12 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X)
13 13
14 GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGLGpu* gpu, 14 GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGLGpu* gpu,
15 const GrOptDrawState& optState) 15 const GrOptDrawState& optState)
16 : INHERITED(gpu, optState) 16 : INHERITED(gpu, optState)
17 , fSeparableVaryingInfos(kVarsPerBlock) { 17 , fSeparableVaryingInfos(kVarsPerBlock) {
18 } 18 }
19 19
20 void GrGLNvprProgramBuilder::emitTransforms(const GrPendingFragmentStage& proces sorStage, 20 void GrGLNvprProgramBuilder::emitTransforms(const GrPendingFragmentStage& proces sorStage,
21 GrGLProcessor::TransformedCoordsArra y* outCoords, 21 GrGLProcessor::TransformedCoordsArra y* outCoords,
22 GrGLInstalledFragProc* ifp) { 22 GrGLInstalledFragProc* ifp) {
23 const GrFragmentProcessor* effect = processorStage.getProcessor(); 23 const GrFragmentProcessor* effect = processorStage.processor();
24 int numTransforms = effect->numTransforms(); 24 int numTransforms = effect->numTransforms();
25 25
26 ifp->fTransforms.push_back_n(numTransforms); 26 ifp->fTransforms.push_back_n(numTransforms);
27 27
28 for (int t = 0; t < numTransforms; t++) { 28 for (int t = 0; t < numTransforms; t++) {
29 GrSLType varyingType = 29 GrSLType varyingType =
30 processorStage.isPerspectiveCoordTransform(t) ? 30 processorStage.isPerspectiveCoordTransform(t) ?
31 kVec3f_GrSLType : 31 kVec3f_GrSLType :
32 kVec2f_GrSLType; 32 kVec2f_GrSLType;
33 33
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 GrGLProgram* GrGLNvprProgramBuilder::createProgram(GrGLuint programID) { 70 GrGLProgram* GrGLNvprProgramBuilder::createProgram(GrGLuint programID) {
71 // this is just for nvpr es, which has separable varyings that are plugged i n after 71 // this is just for nvpr es, which has separable varyings that are plugged i n after
72 // building 72 // building
73 this->resolveSeparableVaryings(programID); 73 this->resolveSeparableVaryings(programID);
74 return SkNEW_ARGS(GrGLNvprProgram, (fGpu, fDesc, fUniformHandles, programID, fUniforms, 74 return SkNEW_ARGS(GrGLNvprProgram, (fGpu, fDesc, fUniformHandles, programID, fUniforms,
75 fGeometryProcessor, 75 fGeometryProcessor,
76 fXferProcessor, fFragmentProcessors.get( ), 76 fXferProcessor, fFragmentProcessors.get( ),
77 fSeparableVaryingInfos)); 77 fSeparableVaryingInfos));
78 } 78 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698