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

Side by Side Diff: src/gpu/gl/builders/GrGLVertexShaderBuilder.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
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 GrGLVertexShader_DEFINED 8 #ifndef GrGLVertexShader_DEFINED
9 #define GrGLVertexShader_DEFINED 9 #define GrGLVertexShader_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 /* 35 /*
36 * Internal call for GrGLProgramBuilder.addVarying 36 * Internal call for GrGLProgramBuilder.addVarying
37 */ 37 */
38 void addVarying(const char* name, GrGLVarying*); 38 void addVarying(const char* name, GrGLVarying*);
39 39
40 /* 40 /*
41 * private helpers for compilation by GrGLProgramBuilder 41 * private helpers for compilation by GrGLProgramBuilder
42 */ 42 */
43 void setupLocalCoords(); 43 void setupLocalCoords();
44 void transformGLToSkiaCoords(); 44 void transformGLToSkiaCoords();
45 void setupBuiltinVertexAttribute(const char* inName, GrGLSLExpr1* out);
45 void setupBuiltinVertexAttribute(const char* inName, GrGLSLExpr4* out); 46 void setupBuiltinVertexAttribute(const char* inName, GrGLSLExpr4* out);
46 void emitAttributes(const GrGeometryProcessor& gp); 47 void emitAttributes(const GrGeometryProcessor& gp);
47 void transformSkiaToGLCoords(); 48 void transformSkiaToGLCoords();
48 void bindVertexAttributes(GrGLuint programID); 49 void bindVertexAttributes(GrGLuint programID);
49 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader Ids) const; 50 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader Ids) const;
50 51
51 // an internal call which checks for uniquness of a var before adding it to the list of inputs 52 // an internal call which checks for uniquness of a var before adding it to the list of inputs
52 bool addAttribute(const GrShaderVar& var); 53 bool addAttribute(const GrShaderVar& var);
53 struct AttributePair { 54 struct AttributePair {
54 void set(int index, const SkString& name) { 55 void set(int index, const SkString& name) {
55 fIndex = index; fName = name; 56 fIndex = index; fName = name;
56 } 57 }
57 int fIndex; 58 int fIndex;
58 SkString fName; 59 SkString fName;
59 }; 60 };
60 61
61 GrGLShaderVar* fPositionVar; 62 GrGLShaderVar* fPositionVar;
62 GrGLShaderVar* fLocalCoordsVar; 63 GrGLShaderVar* fLocalCoordsVar;
63 int fEffectAttribOffset; 64 int fEffectAttribOffset;
64 65
65 friend class GrGLProgramBuilder; 66 friend class GrGLProgramBuilder;
66 67
67 typedef GrGLShaderBuilder INHERITED; 68 typedef GrGLShaderBuilder INHERITED;
68 }; 69 };
69 70
70 #endif 71 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698