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

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

Issue 1417123002: Move GrGLShaderVar to GrGLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gyp Created 5 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 virtual UniformHandle addUniformArray( 62 virtual UniformHandle addUniformArray(
63 uint32_t visibility, 63 uint32_t visibility,
64 GrSLType type, 64 GrSLType type,
65 GrSLPrecision precision, 65 GrSLPrecision precision,
66 const char* name, 66 const char* name,
67 int arrayCount, 67 int arrayCount,
68 const char** outName = nullptr) = 0; 68 const char** outName = nullptr) = 0;
69 69
70 virtual const GrGLShaderVar& getUniformVariable(UniformHandle u) const = 0; 70 virtual const GrGLSLShaderVar& getUniformVariable(UniformHandle u) const = 0 ;
71 71
72 /** 72 /**
73 * Shortcut for getUniformVariable(u).c_str() 73 * Shortcut for getUniformVariable(u).c_str()
74 */ 74 */
75 virtual const char* getUniformCStr(UniformHandle u) const = 0; 75 virtual const char* getUniformCStr(UniformHandle u) const = 0;
76 76
77 virtual const GrGLContextInfo& ctxInfo() const = 0; 77 virtual const GrGLContextInfo& ctxInfo() const = 0;
78 78
79 virtual const GrGLSLCaps* glslCaps() const = 0; 79 virtual const GrGLSLCaps* glslCaps() const = 0;
80 80
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 */ 236 */
237 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*); 237 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*);
238 238
239 UniformHandle addUniformArray(uint32_t visibility, 239 UniformHandle addUniformArray(uint32_t visibility,
240 GrSLType type, 240 GrSLType type,
241 GrSLPrecision precision, 241 GrSLPrecision precision,
242 const char* name, 242 const char* name,
243 int arrayCount, 243 int arrayCount,
244 const char** outName) override; 244 const char** outName) override;
245 245
246 const GrGLShaderVar& getUniformVariable(UniformHandle u) const override { 246 const GrGLSLShaderVar& getUniformVariable(UniformHandle u) const override {
247 return fUniforms[u.toIndex()].fVariable; 247 return fUniforms[u.toIndex()].fVariable;
248 } 248 }
249 249
250 const char* getUniformCStr(UniformHandle u) const override { 250 const char* getUniformCStr(UniformHandle u) const override {
251 return this->getUniformVariable(u).c_str(); 251 return this->getUniformVariable(u).c_str();
252 } 252 }
253 253
254 const GrGLContextInfo& ctxInfo() const override; 254 const GrGLContextInfo& ctxInfo() const override;
255 255
256 const GrGLSLCaps* glslCaps() const override; 256 const GrGLSLCaps* glslCaps() const override;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 GrGLPrimitiveProcessor::TransformsOut fOutCoords; 404 GrGLPrimitiveProcessor::TransformsOut fOutCoords;
405 SkTArray<UniformHandle> fSamplerUniforms; 405 SkTArray<UniformHandle> fSamplerUniforms;
406 SeparableVaryingInfoArray fSeparableVaryingInfos; 406 SeparableVaryingInfoArray fSeparableVaryingInfos;
407 407
408 friend class GrGLShaderBuilder; 408 friend class GrGLShaderBuilder;
409 friend class GrGLVertexBuilder; 409 friend class GrGLVertexBuilder;
410 friend class GrGLFragmentShaderBuilder; 410 friend class GrGLFragmentShaderBuilder;
411 friend class GrGLGeometryBuilder; 411 friend class GrGLGeometryBuilder;
412 }; 412 };
413 #endif 413 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698