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

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

Issue 12462008: Add GrEllipseEdgeEffect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: rebase again Created 7 years, 9 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
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.h
===================================================================
--- src/gpu/gl/GrGLShaderBuilder.h (revision 8091)
+++ src/gpu/gl/GrGLShaderBuilder.h (working copy)
@@ -184,7 +184,11 @@
return this->getUniformVariable(u).c_str();
}
- /** Add a varying variable to the current program to pass values between vertex and fragment
+ /** Add a vertex attribute to the current program that is passed in from the vertex data.
+ Returns false if the attribute was already there, true otherwise. */
+ bool addAttribute(GrSLType type, const char* name);
+
+ /** 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,
@@ -222,6 +226,19 @@
const char* vsInCoord,
SkTArray<GrGLUniformManager::UniformHandle, true>* samplerHandles);
GrGLUniformManager::UniformHandle getRTHeightUniform() const { return fRTHeightUniform; }
+
+ struct AttributePair {
+ void set(int index, const SkString& name) {
+ fIndex = index; fName = name;
+ }
+ int fIndex;
+ SkString fName;
+ };
+ const SkSTArray<10, AttributePair, true>& getEffectAttributes() const {
+ return fEffectAttributes;
+ }
+ const SkString* getEffectAttributeName(int attributeIndex) const;
+
// TODO: Make this do all the compiling, linking, etc.
void finished(GrGLuint programID);
@@ -270,6 +287,8 @@
bool fSetupFragPosition;
GrGLUniformManager::UniformHandle fRTHeightUniform;
+ SkSTArray<10, AttributePair, true> fEffectAttributes;
+
GrGLShaderVar* fPositionVar;
};
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698