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

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

Issue 1306803003: Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('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
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" 16 #include "../GrGLUniformHandle.h"
17 #include "../GrGLPrimitiveProcessor.h" 17 #include "../GrGLPrimitiveProcessor.h"
18 #include "../GrGLXferProcessor.h" 18 #include "../GrGLXferProcessor.h"
19 #include "../../GrPendingFragmentStage.h"
19 #include "../../GrPipeline.h" 20 #include "../../GrPipeline.h"
20 21
21 class GrFragmentProcessor;
22
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 /*
27 * This is the base class for a series of interfaces. This base class *MUST* re main abstract with 26 * This is the base class for a series of interfaces. This base class *MUST* re main abstract with
28 * NO data members because it is used in multiple interface inheritance. 27 * NO data members because it is used in multiple interface inheritance.
29 * Heirarchy: 28 * Heirarchy:
30 * GrGLUniformBuilder 29 * GrGLUniformBuilder
31 * / \ 30 * / \
32 * GrGLFPBuilder GrGLGPBuilder 31 * GrGLFPBuilder GrGLGPBuilder
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 294
296 // Generates a name for a variable. The generated string will be name prefix ed by the prefix 295 // Generates a name for a variable. The generated string will be name prefix ed by the prefix
297 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp ecific if we're 296 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp ecific if we're
298 // generating stage code. 297 // generating stage code.
299 void nameVariable(SkString* out, char prefix, const char* name); 298 void nameVariable(SkString* out, char prefix, const char* name);
300 // Generates a possibly mangled name for a stage variable and writes it to t he fragment shader. 299 // Generates a possibly mangled name for a stage variable and writes it to t he fragment shader.
301 // If GrGLSLExpr4 has a valid name then it will use that instead 300 // If GrGLSLExpr4 has a valid name then it will use that instead
302 void nameExpression(GrGLSLExpr4*, const char* baseName); 301 void nameExpression(GrGLSLExpr4*, const char* baseName);
303 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage ); 302 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage );
304 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu t); 303 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu t);
305 void emitAndInstallProc(const GrFragmentProcessor&, 304 void emitAndInstallProc(const GrPendingFragmentStage&,
306 int index, 305 int index,
307 const GrGLSLExpr4& input, 306 const GrGLSLExpr4& input,
308 GrGLSLExpr4* output); 307 GrGLSLExpr4* output);
309 308
310 void emitAndInstallProc(const GrPrimitiveProcessor&, 309 void emitAndInstallProc(const GrPrimitiveProcessor&,
311 GrGLSLExpr4* outputColor, 310 GrGLSLExpr4* outputColor,
312 GrGLSLExpr4* outputCoverage); 311 GrGLSLExpr4* outputCoverage);
313 312
314 // these emit functions help to keep the createAndEmitProcessors template ge neral 313 // these emit functions help to keep the createAndEmitProcessors template ge neral
315 void emitAndInstallProc(const GrFragmentProcessor&, 314 void emitAndInstallProc(const GrPendingFragmentStage&,
316 int index, 315 int index,
317 const char* outColor, 316 const char* outColor,
318 const char* inColor); 317 const char* inColor);
319 void emitAndInstallProc(const GrPrimitiveProcessor&, 318 void emitAndInstallProc(const GrPrimitiveProcessor&,
320 const char* outColor, 319 const char* outColor,
321 const char* outCoverage); 320 const char* outCoverage);
322 void emitAndInstallXferProc(const GrXferProcessor&, 321 void emitAndInstallXferProc(const GrXferProcessor&,
323 const GrGLSLExpr4& colorIn, 322 const GrGLSLExpr4& colorIn,
324 const GrGLSLExpr4& coverageIn); 323 const GrGLSLExpr4& coverageIn);
325 324
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; 400 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms;
402 GrGLPrimitiveProcessor::TransformsOut fOutCoords; 401 GrGLPrimitiveProcessor::TransformsOut fOutCoords;
403 SkTArray<UniformHandle> fSamplerUniforms; 402 SkTArray<UniformHandle> fSamplerUniforms;
404 403
405 friend class GrGLShaderBuilder; 404 friend class GrGLShaderBuilder;
406 friend class GrGLVertexBuilder; 405 friend class GrGLVertexBuilder;
407 friend class GrGLFragmentShaderBuilder; 406 friend class GrGLFragmentShaderBuilder;
408 friend class GrGLGeometryBuilder; 407 friend class GrGLGeometryBuilder;
409 }; 408 };
410 #endif 409 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698