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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.h

Issue 522303004: Add option to add precision to varyings in shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change param to fsPrecision Created 6 years, 3 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 2014 Google Inc. 2 * Copyright 2014 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 GrGLProgramBuilder_DEFINED 8 #ifndef GrGLProgramBuilder_DEFINED
9 #define GrGLProgramBuilder_DEFINED 9 #define GrGLProgramBuilder_DEFINED
10 10
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 class GrGLFullProgramBuilder : public GrGLProgramBuilder { 273 class GrGLFullProgramBuilder : public GrGLProgramBuilder {
274 public: 274 public:
275 GrGLFullProgramBuilder(GrGpuGL*, const GrGLProgramDesc&); 275 GrGLFullProgramBuilder(GrGpuGL*, const GrGLProgramDesc&);
276 276
277 /** Add a varying variable to the current program to pass values between vert ex and fragment 277 /** Add a varying variable to the current program to pass values between vert ex and fragment
278 shaders. If the last two parameters are non-NULL, they are filled in wit h the name 278 shaders. If the last two parameters are non-NULL, they are filled in wit h the name
279 generated. */ 279 generated. */
280 void addVarying(GrSLType type, 280 void addVarying(GrSLType type,
281 const char* name, 281 const char* name,
282 const char** vsOutName = NULL, 282 const char** vsOutName = NULL,
283 const char** fsInName = NULL); 283 const char** fsInName = NULL,
284 GrGLShaderVar::Precision fsPrecision=GrGLShaderVar::kDefault _Precision);
284 285
285 /** Add a separable varying input variable to the current program. 286 /** Add a separable varying input variable to the current program.
286 * A separable varying (fragment shader input) is a varying that can be used also when vertex 287 * A separable varying (fragment shader input) is a varying that can be used also when vertex
287 * shaders are not used. With a vertex shader, the operation is same as with other 288 * shaders are not used. With a vertex shader, the operation is same as with other
288 * varyings. Without a vertex shader, such as with NV_path_rendering, GL API s are used to 289 * varyings. Without a vertex shader, such as with NV_path_rendering, GL API s are used to
289 * populate the variable. The APIs can refer to the variable through the ret urned handle. 290 * populate the variable. The APIs can refer to the variable through the ret urned handle.
290 */ 291 */
291 VaryingHandle addSeparableVarying(GrSLType type, 292 VaryingHandle addSeparableVarying(GrSLType type,
292 const char* name, 293 const char* name,
293 const char** vsOutName, 294 const char** vsOutName,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 int effectCnt, 332 int effectCnt,
332 const GrGLProgramDesc::Effe ctKeyProvider&, 333 const GrGLProgramDesc::Effe ctKeyProvider&,
333 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; 334 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
334 335
335 virtual void emitCodeAfterEffects() SK_OVERRIDE {} 336 virtual void emitCodeAfterEffects() SK_OVERRIDE {}
336 337
337 typedef GrGLProgramBuilder INHERITED; 338 typedef GrGLProgramBuilder INHERITED;
338 }; 339 };
339 340
340 #endif 341 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698