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

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

Issue 1870893002: Implement texel buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_texelfetch
Patch Set: GrBuffer(Access) into include/gpu Created 4 years, 8 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/glsl/GrGLSL.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 */ 53 */
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 SamplerArray& texSamplers) 63 const SamplerArray& texSamplers,
64 const SamplerArray& bufferSamplers)
64 : fFragBuilder(fragBuilder) 65 : fFragBuilder(fragBuilder)
65 , fUniformHandler(uniformHandler) 66 , fUniformHandler(uniformHandler)
66 , fGLSLCaps(caps) 67 , fGLSLCaps(caps)
67 , fFp(fp) 68 , fFp(fp)
68 , fOutputColor(outputColor) 69 , fOutputColor(outputColor)
69 , fInputColor(inputColor) 70 , fInputColor(inputColor)
70 , fCoords(coords) 71 , fCoords(coords)
71 , fTexSamplers(texSamplers) {} 72 , fTexSamplers(texSamplers)
73 , fBufferSamplers(bufferSamplers) {}
72 GrGLSLFPFragmentBuilder* fFragBuilder; 74 GrGLSLFPFragmentBuilder* fFragBuilder;
73 GrGLSLUniformHandler* fUniformHandler; 75 GrGLSLUniformHandler* fUniformHandler;
74 const GrGLSLCaps* fGLSLCaps; 76 const GrGLSLCaps* fGLSLCaps;
75 const GrFragmentProcessor& fFp; 77 const GrFragmentProcessor& fFp;
76 const char* fOutputColor; 78 const char* fOutputColor;
77 const char* fInputColor; 79 const char* fInputColor;
78 const GrGLSLTransformedCoordsArray& fCoords; 80 const GrGLSLTransformedCoordsArray& fCoords;
79 const SamplerArray& fTexSamplers; 81 const SamplerArray& fTexSamplers;
82 const SamplerArray& fBufferSamplers;
80 }; 83 };
81 84
82 virtual void emitCode(EmitArgs&) = 0; 85 virtual void emitCode(EmitArgs&) = 0;
83 86
84 void setData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcesso r& processor); 87 void setData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcesso r& processor);
85 88
86 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {} 89 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {}
87 90
88 int numChildProcessors() const { return fChildProcessors.count(); } 91 int numChildProcessors() const { return fChildProcessors.count(); }
89 92
(...skipping 26 matching lines...) Expand all
116 119
117 private: 120 private:
118 void internalEmitChild(int, const char*, const char*, EmitArgs&); 121 void internalEmitChild(int, const char*, const char*, EmitArgs&);
119 122
120 SkTArray<GrGLSLFragmentProcessor*, true> fChildProcessors; 123 SkTArray<GrGLSLFragmentProcessor*, true> fChildProcessors;
121 124
122 friend class GrFragmentProcessor; 125 friend class GrFragmentProcessor;
123 }; 126 };
124 127
125 #endif 128 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698