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

Side by Side Diff: src/gpu/glsl/GrGLSL.h

Issue 2143143002: Add Texture2D and Sampler GrSLTypes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 GrGLSL_DEFINED 8 #ifndef GrGLSL_DEFINED
9 #define GrGLSL_DEFINED 9 #define GrGLSL_DEFINED
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 case kSampler2DRect_GrSLType: 128 case kSampler2DRect_GrSLType:
129 return "sampler2DRect"; 129 return "sampler2DRect";
130 case kSamplerBuffer_GrSLType: 130 case kSamplerBuffer_GrSLType:
131 return "samplerBuffer"; 131 return "samplerBuffer";
132 case kBool_GrSLType: 132 case kBool_GrSLType:
133 return "bool"; 133 return "bool";
134 case kInt_GrSLType: 134 case kInt_GrSLType:
135 return "int"; 135 return "int";
136 case kUint_GrSLType: 136 case kUint_GrSLType:
137 return "uint"; 137 return "uint";
138 case kTexture2D_GrSLType:
139 return "texture2D";
140 case kSampler_GrSLType:
141 return "sampler";
138 default: 142 default:
139 SkFAIL("Unknown shader var type."); 143 SkFAIL("Unknown shader var type.");
140 return ""; // suppress warning 144 return ""; // suppress warning
141 } 145 }
142 } 146 }
143 147
144 /** A generic base-class representing a GLSL expression. 148 /** A generic base-class representing a GLSL expression.
145 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s imple constant 149 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s imple constant
146 * folding with help of 1 and 0. 150 * folding with help of 1 and 0.
147 * 151 *
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 380
377 /** 381 /**
378 * Does an inplace mul, *=, of vec4VarName by mulFactor. 382 * Does an inplace mul, *=, of vec4VarName by mulFactor.
379 * A semicolon is added after the assignment. 383 * A semicolon is added after the assignment.
380 */ 384 */
381 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL Expr4& mulFactor); 385 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL Expr4& mulFactor);
382 386
383 #include "GrGLSL_impl.h" 387 #include "GrGLSL_impl.h"
384 388
385 #endif 389 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698