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

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: 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
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 GrProgramDesc fDesc; 150 GrProgramDesc fDesc;
151 GrGLGpu* fGpu; 151 GrGLGpu* fGpu;
152 GrGLProgramDataManager fProgramDataManager; 152 GrGLProgramDataManager fProgramDataManager;
153 153
154 friend class GrGLProgramBuilder; 154 friend class GrGLProgramBuilder;
155 155
156 typedef SkRefCnt INHERITED; 156 typedef SkRefCnt INHERITED;
157 }; 157 };
158 158
159 /*
160 * Below are slight specializations of the program object for the different type s of programs
161 * The default GrGL programs consist of at the very least a vertex and fragment shader.
162 * Legacy Nvpr only has a fragment shader, 1.3+ Nvpr ignores the vertex shader, but both require
163 * specialized methods for setting transform data. Both types of NVPR also requi re setting the
164 * projection matrix through a special function call
165 */
166 class GrGLNvprProgram : public GrGLProgram {
167 protected:
168 GrGLNvprProgram(GrGLGpu*,
169 const GrProgramDesc&,
170 const BuiltinUniformHandles&,
171 GrGLuint programID,
172 const UniformInfoArray&,
173 GrGLInstalledGeoProc*,
174 GrGLInstalledXferProc* xferProcessor,
175 GrGLInstalledFragProcs* fragmentProcessors);
176
177 private:
178 void didSetData() override;
179 virtual void setTransformData(const GrPrimitiveProcessor&,
180 const GrPendingFragmentStage&,
181 int index,
182 GrGLInstalledFragProc*) override;
183 virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPip eline&);
184
185 friend class GrGLNvprProgramBuilder;
186
187 typedef GrGLProgram INHERITED;
188 };
189
190 #endif 159 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698