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

Unified Diff: src/gpu/gl/GrGLShaderBuilder.h

Issue 367643004: Implement NVPR on GLES (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 7e71acf901f8e78df6a1bb3c32c89e8c98810b35..724e09fc765c9df71f27e225254afe9c144e994c 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -247,9 +247,6 @@ protected:
const GrGLProgramDesc& desc() const { return fDesc; }
- /** Add input/output variable declarations (i.e. 'varying') to the fragment shader. */
- GrGLShaderVar& fsInputAppend() { return fFSInputs.push_back(); }
-
// Helper for emitEffects().
void createAndEmitEffects(GrGLProgramEffectsBuilder*,
const GrEffectStage* effectStages[],
@@ -272,6 +269,8 @@ protected:
const GenProgramOutput& getOutput() const { return fOutput; }
GenProgramOutput fOutput;
+ VarArray fFSInputs;
+ SkAutoTUnref<GrGLUniformManager> fUniformManager;
private:
class CodeStage : SkNoncopyable {
@@ -396,11 +395,9 @@ private:
const GrGLProgramDesc& fDesc;
GrGpuGL* fGpu;
- SkAutoTUnref<GrGLUniformManager> fUniformManager;
uint32_t fFSFeaturesAddedMask;
SkString fFSFunctions;
SkString fFSExtensions;
- VarArray fFSInputs;
VarArray fFSOutputs;
GrGLUniformManager::BuilderUniformArray fUniforms;
@@ -438,10 +435,12 @@ public:
/** Add a varying variable to the current program to pass values between vertex and fragment
shaders. If the last two parameters are non-NULL, they are filled in with the name
generated. */
- void addVarying(GrSLType type,
- const char* name,
- const char** vsOutName = NULL,
- const char** fsInName = NULL);
+ GrGLUniformManager::FragmentInputHandle addVarying(GrSLType type,
+ const char* name,
+ const char** vsOutName = NULL,
+ const char** fsInName = NULL);
+
+ void addFragmentInput(const char* fsName);
/** Returns a vertex attribute that represents the vertex position in the VS. This is the
pre-matrix position and is commonly used by effects to compute texture coords via a matrix.

Powered by Google App Engine
This is Rietveld 408576698