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

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

Issue 98893006: Make texture domain a helper so that it can be incorporated into other effects. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rename GrTextureDomainEffect.[h|cpp] to GrTextureDomain.[h|cpp] Created 7 years 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/GrGLEffect.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 52c24ae3acc0dfa931479d96b72735e01ebda019..103efa5aabcbde7e8d6a87ee9be5820a0ea76ce5 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -208,6 +208,25 @@ public:
const GrGLContextInfo& ctxInfo() const;
+ /**
+ * Helper for begining and ending a block in the fragment code. TODO: Make GrGLShaderBuilder
+ * aware of all blocks and turn single \t's into the correct number of tabs (or spaces) so that
+ * our shaders print pretty without effect writers tracking indentation.
+ */
+ class FSBlock {
+ public:
+ FSBlock(GrGLShaderBuilder* builder) : fBuilder(builder) {
+ SkASSERT(NULL != builder);
+ fBuilder->fsCodeAppend("\t{\n");
+ }
+
+ ~FSBlock() {
+ fBuilder->fsCodeAppend("\t}\n");
+ }
+ private:
+ GrGLShaderBuilder* fBuilder;
+ };
+
protected:
GrGpuGL* gpu() const { return fGpu; }
« no previous file with comments | « src/gpu/gl/GrGLEffect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698