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

Side by Side Diff: src/gpu/gl/GrGLProgram.h

Issue 1186113007: Refactor separable varying location info to be stored in GrGLProgram subclass (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 5 years, 6 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/GrGLPrimitiveProcessor.h ('k') | src/gpu/gl/GrGLProgram.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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #ifndef GrGLProgram_DEFINED 9 #ifndef GrGLProgram_DEFINED
10 #define GrGLProgram_DEFINED 10 #define GrGLProgram_DEFINED
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 GrProgramDesc fDesc; 145 GrProgramDesc fDesc;
146 GrGLGpu* fGpu; 146 GrGLGpu* fGpu;
147 GrGLProgramDataManager fProgramDataManager; 147 GrGLProgramDataManager fProgramDataManager;
148 SkTArray<UniformHandle> fSamplerUniforms; 148 SkTArray<UniformHandle> fSamplerUniforms;
149 149
150 friend class GrGLProgramBuilder; 150 friend class GrGLProgramBuilder;
151 151
152 typedef SkRefCnt INHERITED; 152 typedef SkRefCnt INHERITED;
153 }; 153 };
154 154
155 /*
156 * Below are slight specializations of the program object for the different type s of programs
157 * The default GrGL programs consist of at the very least a vertex and fragment shader.
158 * Legacy Nvpr only has a fragment shader, 1.3+ Nvpr ignores the vertex shader, but both require
159 * specialized methods for setting transform data. Both types of NVPR also requi re setting the
160 * projection matrix through a special function call
161 */
162 class GrGLNvprProgram : public GrGLProgram {
163 protected:
164 GrGLNvprProgram(GrGLGpu*,
165 const GrProgramDesc&,
166 const BuiltinUniformHandles&,
167 GrGLuint programID,
168 const UniformInfoArray&,
169 GrGLInstalledGeoProc*,
170 GrGLInstalledXferProc* xferProcessor,
171 GrGLInstalledFragProcs* fragmentProcessors,
172 SkTArray<UniformHandle>* passSamplerUniforms);
173
174 private:
175 void didSetData() override;
176 virtual void setTransformData(const GrPrimitiveProcessor&,
177 const GrPendingFragmentStage&,
178 int index,
179 GrGLInstalledFragProc*) override;
180 virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPip eline&);
181
182 friend class GrGLNvprProgramBuilder;
183
184 typedef GrGLProgram INHERITED;
185 };
186
187 #endif 155 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPrimitiveProcessor.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698