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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.h

Issue 26190003: Potentially optimize some GrGLEffects for known input color values (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLSL_impl.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 #ifndef GrGLShaderBuilder_DEFINED 8 #ifndef GrGLShaderBuilder_DEFINED
9 #define GrGLShaderBuilder_DEFINED 9 #define GrGLShaderBuilder_DEFINED
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 /** Version of above that appends the result to the fragment shader code ins tead.*/ 83 /** Version of above that appends the result to the fragment shader code ins tead.*/
84 void fsAppendTextureLookup(const TextureSampler&, 84 void fsAppendTextureLookup(const TextureSampler&,
85 const char* coordName, 85 const char* coordName,
86 GrSLType coordType = kVec2f_GrSLType); 86 GrSLType coordType = kVec2f_GrSLType);
87 87
88 88
89 /** Does the work of appendTextureLookup and modulates the result by modulat ion. The result is 89 /** Does the work of appendTextureLookup and modulates the result by modulat ion. The result is
90 always a vec4. modulation and the swizzle specified by TextureSampler mu st both be vec4 or 90 always a vec4. modulation and the swizzle specified by TextureSampler mu st both be vec4 or
91 float. If modulation is "" or NULL it this function acts as though appen dTextureLookup were 91 float. If modulation is "" or NULL it this function acts as though appen dTextureLookup were
92 called. */ 92 called. */
93 void fsAppendTextureLookupAndModulate(const char* modulation, 93 void fsAppendTextureLookupAndModulate(const GrGLSLExpr4& modulation,
94 const TextureSampler&, 94 const TextureSampler&,
95 const char* coordName, 95 const char* coordName,
96 GrSLType coordType = kVec2f_GrSLType); 96 GrSLType coordType = kVec2f_GrSLType);
97 97
98 /** Emits a helper function outside of main() in the fragment shader. */ 98 /** Emits a helper function outside of main() in the fragment shader. */
99 void fsEmitFunction(GrSLType returnType, 99 void fsEmitFunction(GrSLType returnType,
100 const char* name, 100 const char* name,
101 int argCnt, 101 int argCnt,
102 const GrGLShaderVar* args, 102 const GrGLShaderVar* args,
103 const char* body, 103 const char* body,
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 int effectCnt, 447 int effectCnt,
448 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; 448 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
449 449
450 private: 450 private:
451 int fNumTexCoordSets; 451 int fNumTexCoordSets;
452 452
453 typedef GrGLShaderBuilder INHERITED; 453 typedef GrGLShaderBuilder INHERITED;
454 }; 454 };
455 455
456 #endif 456 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLSL_impl.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698