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

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

Issue 649783003: Force input coverage to be only a byte in gpu shaders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « src/gpu/gl/GrGLVertexArray.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 GrGLProgramBuilder(GrGpuGL*, const GrOptDrawState&); 233 GrGLProgramBuilder(GrGpuGL*, const GrOptDrawState&);
234 234
235 const GrOptDrawState& optState() const { return fOptState; } 235 const GrOptDrawState& optState() const { return fOptState; }
236 const GrProgramDesc& desc() const { return fDesc; } 236 const GrProgramDesc& desc() const { return fDesc; }
237 const GrProgramDesc::KeyHeader& header() const { return fDesc.header(); } 237 const GrProgramDesc::KeyHeader& header() const { return fDesc.header(); }
238 238
239 // Generates a name for a variable. The generated string will be name prefix ed by the prefix 239 // Generates a name for a variable. The generated string will be name prefix ed by the prefix
240 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp ecific if we're 240 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp ecific if we're
241 // generating stage code. 241 // generating stage code.
242 void nameVariable(SkString* out, char prefix, const char* name); 242 void nameVariable(SkString* out, char prefix, const char* name);
243 void setupUniformColorAndCoverageIfNeeded(GrGLSLExpr4* inputColor, GrGLSLExp r4* inputCoverage); 243 void setupUniformColorAndCoverageIfNeeded(GrGLSLExpr4* inputColor, GrGLSLExp r1* inputCoverage);
244 void emitAndInstallProcs(const GrOptDrawState& optState, 244 void emitAndInstallProcs(const GrOptDrawState& optState,
245 GrGLSLExpr4* inputColor, 245 GrGLSLExpr4* inputColor,
246 GrGLSLExpr4* inputCoverage); 246 GrGLSLExpr4* inputCoverage);
247 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu t); 247 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu t);
248 template <class Proc> 248 template <class Proc>
249 void emitAndInstallProc(const Proc&, 249 void emitAndInstallProc(const Proc&,
250 int index, 250 int index,
251 const ProcKeyProvider&, 251 const ProcKeyProvider&,
252 const GrGLSLExpr4& input, 252 const GrGLSLExpr4& input,
253 GrGLSLExpr4* output); 253 GrGLSLExpr4* output);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 SkSTArray<2, Transform, true> fTransforms; 385 SkSTArray<2, Transform, true> fTransforms;
386 bool fLocalCoordAttrib; 386 bool fLocalCoordAttrib;
387 }; 387 };
388 388
389 struct GrGLInstalledFragProcs : public SkRefCnt { 389 struct GrGLInstalledFragProcs : public SkRefCnt {
390 virtual ~GrGLInstalledFragProcs(); 390 virtual ~GrGLInstalledFragProcs();
391 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; 391 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs;
392 }; 392 };
393 393
394 #endif 394 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLVertexArray.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698