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

Side by Side Diff: include/gpu/GrBackendProcessorFactory.h

Issue 751283002: Add XferProcessor factory in GrPaint and GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update gyp Created 6 years 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 2012 Google Inc. 2 * Copyright 2012 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 GrBackendProcessorFactory_DEFINED 8 #ifndef GrBackendProcessorFactory_DEFINED
9 #define GrBackendProcessorFactory_DEFINED 9 #define GrBackendProcessorFactory_DEFINED
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 return id; 134 return id;
135 } 135 }
136 136
137 const uint32_t fProcessorClassID; 137 const uint32_t fProcessorClassID;
138 static int32_t fCurrProcessorClassID; 138 static int32_t fCurrProcessorClassID;
139 }; 139 };
140 140
141 class GrFragmentProcessor; 141 class GrFragmentProcessor;
142 class GrGeometryProcessor; 142 class GrGeometryProcessor;
143 class GrXferProcessor;
143 class GrGLFragmentProcessor; 144 class GrGLFragmentProcessor;
144 class GrGLGeometryProcessor; 145 class GrGLGeometryProcessor;
146 class GrGLXferProcessor;
145 147
146 /** 148 /**
147 * Backend processor factory cannot actually create anything, it is up to subcla sses to implement 149 * Backend processor factory cannot actually create anything, it is up to subcla sses to implement
148 * a create binding which matches Gr to GL in a type safe way 150 * a create binding which matches Gr to GL in a type safe way
149 */ 151 */
150 152
151 class GrBackendFragmentProcessorFactory : public GrBackendProcessorFactory { 153 class GrBackendFragmentProcessorFactory : public GrBackendProcessorFactory {
152 public: 154 public:
153 /** 155 /**
154 * Creates a GrGLProcessor instance that is used both to generate code for t he GrProcessor in a 156 * Creates a GrGLProcessor instance that is used both to generate code for t he GrProcessor in a
155 * GLSL program and to manage updating uniforms for the program when it is u sed. 157 * GLSL program and to manage updating uniforms for the program when it is u sed.
156 */ 158 */
157 virtual GrGLFragmentProcessor* createGLInstance(const GrFragmentProcessor&) const = 0; 159 virtual GrGLFragmentProcessor* createGLInstance(const GrFragmentProcessor&) const = 0;
158 }; 160 };
159 161
162 class GrBackendXferProcessorFactory : public GrBackendProcessorFactory {
163 public:
164 /**
165 * Creates a GrGLProcessor instance that is used both to generate code for t he GrProcessor in a
166 * GLSL program and to manage updating uniforms for the program when it is u sed.
167 */
168 virtual GrGLXferProcessor* createGLInstance(const GrXferProcessor&) const = 0;
169 };
170
160 class GrBackendGeometryProcessorFactory : public GrBackendProcessorFactory { 171 class GrBackendGeometryProcessorFactory : public GrBackendProcessorFactory {
161 public: 172 public:
162 /** 173 /**
163 * Creates a GrGLProcessor instance that is used both to generate code for t he GrProcessor in a 174 * Creates a GrGLProcessor instance that is used both to generate code for t he GrProcessor in a
164 * GLSL program and to manage updating uniforms for the program when it is u sed. 175 * GLSL program and to manage updating uniforms for the program when it is u sed.
165 */ 176 */
166 virtual GrGLGeometryProcessor* createGLInstance(const GrGeometryProcessor&) const = 0; 177 virtual GrGLGeometryProcessor* createGLInstance(const GrGeometryProcessor&) const = 0;
167 }; 178 };
168 179
169 #endif 180 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698