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

Side by Side Diff: src/gpu/glsl/GrGLSLFragmentProcessor.h

Issue 2201613002: Revert of GrFP can express distance vector field req., program builder declares variable for it (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-bevel-api-change
Patch Set: Created 4 years, 4 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/GrPrimitiveProcessor.h ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.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 2013 Google Inc. 2 * Copyright 2013 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 GrGLSLFragmentProcessor_DEFINED 8 #ifndef GrGLSLFragmentProcessor_DEFINED
9 #define GrGLSLFragmentProcessor_DEFINED 9 #define GrGLSLFragmentProcessor_DEFINED
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 struct EmitArgs { 55 struct EmitArgs {
56 EmitArgs(GrGLSLFPFragmentBuilder* fragBuilder, 56 EmitArgs(GrGLSLFPFragmentBuilder* fragBuilder,
57 GrGLSLUniformHandler* uniformHandler, 57 GrGLSLUniformHandler* uniformHandler,
58 const GrGLSLCaps* caps, 58 const GrGLSLCaps* caps,
59 const GrFragmentProcessor& fp, 59 const GrFragmentProcessor& fp,
60 const char* outputColor, 60 const char* outputColor,
61 const char* inputColor, 61 const char* inputColor,
62 const GrGLSLTransformedCoordsArray& coords, 62 const GrGLSLTransformedCoordsArray& coords,
63 const SamplerHandle* texSamplers, 63 const SamplerHandle* texSamplers,
64 const SamplerHandle* bufferSamplers, 64 const SamplerHandle* bufferSamplers)
65 bool gpImplementsDistanceVector)
66 : fFragBuilder(fragBuilder) 65 : fFragBuilder(fragBuilder)
67 , fUniformHandler(uniformHandler) 66 , fUniformHandler(uniformHandler)
68 , fGLSLCaps(caps) 67 , fGLSLCaps(caps)
69 , fFp(fp) 68 , fFp(fp)
70 , fOutputColor(outputColor) 69 , fOutputColor(outputColor)
71 , fInputColor(inputColor) 70 , fInputColor(inputColor)
72 , fCoords(coords) 71 , fCoords(coords)
73 , fTexSamplers(texSamplers) 72 , fTexSamplers(texSamplers)
74 , fBufferSamplers(bufferSamplers) 73 , fBufferSamplers(bufferSamplers) {}
75 , fGpImplementsDistanceVector(gpImplementsDistanceVector){}
76 GrGLSLFPFragmentBuilder* fFragBuilder; 74 GrGLSLFPFragmentBuilder* fFragBuilder;
77 GrGLSLUniformHandler* fUniformHandler; 75 GrGLSLUniformHandler* fUniformHandler;
78 const GrGLSLCaps* fGLSLCaps; 76 const GrGLSLCaps* fGLSLCaps;
79 const GrFragmentProcessor& fFp; 77 const GrFragmentProcessor& fFp;
80 const char* fOutputColor; 78 const char* fOutputColor;
81 const char* fInputColor; 79 const char* fInputColor;
82 const GrGLSLTransformedCoordsArray& fCoords; 80 const GrGLSLTransformedCoordsArray& fCoords;
83 const SamplerHandle* fTexSamplers; 81 const SamplerHandle* fTexSamplers;
84 const SamplerHandle* fBufferSamplers; 82 const SamplerHandle* fBufferSamplers;
85 bool fGpImplementsDistanceVector;
86 }; 83 };
87 84
88 virtual void emitCode(EmitArgs&) = 0; 85 virtual void emitCode(EmitArgs&) = 0;
89 86
90 void setData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcesso r& processor); 87 void setData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcesso r& processor);
91 88
92 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {} 89 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {}
93 90
94 int numChildProcessors() const { return fChildProcessors.count(); } 91 int numChildProcessors() const { return fChildProcessors.count(); }
95 92
(...skipping 26 matching lines...) Expand all
122 119
123 private: 120 private:
124 void internalEmitChild(int, const char*, const char*, EmitArgs&); 121 void internalEmitChild(int, const char*, const char*, EmitArgs&);
125 122
126 SkTArray<GrGLSLFragmentProcessor*, true> fChildProcessors; 123 SkTArray<GrGLSLFragmentProcessor*, true> fChildProcessors;
127 124
128 friend class GrFragmentProcessor; 125 friend class GrFragmentProcessor;
129 }; 126 };
130 127
131 #endif 128 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPrimitiveProcessor.h ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698