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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.h

Issue 678953002: Default geometry processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.h
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h
index 4bcf50be6a10913637eb0118c5b1d3a7232b56f4..a44fa91090969622692cb7be284d5abf53f2f915 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
@@ -241,8 +241,7 @@ protected:
// generating stage code.
void nameVariable(SkString* out, char prefix, const char* name);
void setupUniformColorAndCoverageIfNeeded(GrGLSLExpr4* inputColor, GrGLSLExpr1* inputCoverage);
- void emitAndInstallProcs(const GrOptDrawState& optState,
- GrGLSLExpr4* inputColor,
+ void emitAndInstallProcs(GrGLSLExpr4* inputColor,
GrGLSLExpr4* inputCoverage);
void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOut);
template <class Proc>
@@ -259,8 +258,8 @@ protected:
const char* inColor);
void emitAndInstallProc(const GrGeometryProcessor&,
const GrProcessorKey&,
- const char* outColor,
- const char* inColor);
+ const char* outCoverage,
+ const char* inCoverage);
void verify(const GrGeometryProcessor&);
void verify(const GrFragmentProcessor&);
void emitSamplers(const GrProcessor&,
@@ -314,6 +313,22 @@ protected:
void enterStage() { fOutOfStage = false; }
int stageIndex() const { return fStageIndex; }
+ struct TransformVarying {
+ TransformVarying(const GrGLVarying& v, const char* uniName, const char* sourceCoords)
+ : fV(v), fUniName(uniName), fSourceCoords(sourceCoords) {}
+ GrGLVarying fV;
+ SkString fUniName;
+ SkString fSourceCoords;
+ };
+
+ void addCoordVarying(const char* name, GrGLVarying* v, const char* uniName,
+ const char* sourceCoords) {
+ this->addVarying(name, v);
+ fCoordVaryings.push_back(TransformVarying(*v, uniName, sourceCoords));
+ }
+
+ const char* rtAdjustment() const { return "rtAdjustment"; }
+
// number of each input/output type in a single allocation block, used by many builders
static const int kVarsPerBlock;
@@ -331,6 +346,7 @@ protected:
const GrProgramDesc& fDesc;
GrGpuGL* fGpu;
UniformInfoArray fUniforms;
+ SkSTArray<16, TransformVarying, true> fCoordVaryings;
friend class GrGLShaderBuilder;
friend class GrGLVertexBuilder;
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698