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

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

Issue 1333273003: Start trying to collapse path program stuff (Closed) Base URL: https://skia.googlesource.com/skia.git@removebt
Patch Set: windows Created 5 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
11 #include "GrGLFragmentShaderBuilder.h" 11 #include "GrGLFragmentShaderBuilder.h"
12 #include "GrGLGeometryShaderBuilder.h" 12 #include "GrGLGeometryShaderBuilder.h"
13 #include "GrGLVertexShaderBuilder.h" 13 #include "GrGLVertexShaderBuilder.h"
14 #include "../GrGLProgramDataManager.h" 14 #include "../GrGLProgramDataManager.h"
15 #include "../GrGLPathProgramDataManager.h" 15 #include "../GrGLPathProgramDataManager.h"
16 #include "../GrGLUniformHandle.h"
17 #include "../GrGLPrimitiveProcessor.h" 16 #include "../GrGLPrimitiveProcessor.h"
18 #include "../GrGLXferProcessor.h" 17 #include "../GrGLXferProcessor.h"
19 #include "../../GrPipeline.h" 18 #include "../../GrPipeline.h"
20 19
21 class GrFragmentProcessor; 20 class GrFragmentProcessor;
22 21
23 // Enough precision to represent 1 / 2048 accurately in printf 22 // Enough precision to represent 1 / 2048 accurately in printf
24 #define GR_SIGNIFICANT_POW2_DECIMAL_DIG 11 23 #define GR_SIGNIFICANT_POW2_DECIMAL_DIG 11
25 24
26 /* 25 /*
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*); 235 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*);
237 236
238 UniformHandle addUniformArray(uint32_t visibility, 237 UniformHandle addUniformArray(uint32_t visibility,
239 GrSLType type, 238 GrSLType type,
240 GrSLPrecision precision, 239 GrSLPrecision precision,
241 const char* name, 240 const char* name,
242 int arrayCount, 241 int arrayCount,
243 const char** outName) override; 242 const char** outName) override;
244 243
245 const GrGLShaderVar& getUniformVariable(UniformHandle u) const override { 244 const GrGLShaderVar& getUniformVariable(UniformHandle u) const override {
246 return fUniforms[u.toShaderBuilderIndex()].fVariable; 245 return fUniforms[u.toIndex()].fVariable;
247 } 246 }
248 247
249 const char* getUniformCStr(UniformHandle u) const override { 248 const char* getUniformCStr(UniformHandle u) const override {
250 return this->getUniformVariable(u).c_str(); 249 return this->getUniformVariable(u).c_str();
251 } 250 }
252 251
253 const GrGLContextInfo& ctxInfo() const override; 252 const GrGLContextInfo& ctxInfo() const override;
254 253
255 GrGLGpu* gpu() const override { return fGpu; } 254 GrGLGpu* gpu() const override { return fGpu; }
256 255
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; 399 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms;
401 GrGLPrimitiveProcessor::TransformsOut fOutCoords; 400 GrGLPrimitiveProcessor::TransformsOut fOutCoords;
402 SkTArray<UniformHandle> fSamplerUniforms; 401 SkTArray<UniformHandle> fSamplerUniforms;
403 402
404 friend class GrGLShaderBuilder; 403 friend class GrGLShaderBuilder;
405 friend class GrGLVertexBuilder; 404 friend class GrGLVertexBuilder;
406 friend class GrGLFragmentShaderBuilder; 405 friend class GrGLFragmentShaderBuilder;
407 friend class GrGLGeometryBuilder; 406 friend class GrGLGeometryBuilder;
408 }; 407 };
409 #endif 408 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLPathProgramBuilder.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698