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

Side by Side Diff: src/gpu/GrPrimitiveProcessor.h

Issue 2114993002: 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: Quick rebase fix Created 4 years, 5 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 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 GrPrimitiveProcessor_DEFINED 8 #ifndef GrPrimitiveProcessor_DEFINED
9 #define GrPrimitiveProcessor_DEFINED 9 #define GrPrimitiveProcessor_DEFINED
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 /** 215 /**
216 * If non-null, overrides the dest color returned by GrGLSLFragmentShaderBui lder::dstColor(). 216 * If non-null, overrides the dest color returned by GrGLSLFragmentShaderBui lder::dstColor().
217 */ 217 */
218 virtual const char* getDestColorOverride() const { return nullptr; } 218 virtual const char* getDestColorOverride() const { return nullptr; }
219 219
220 virtual float getSampleShading() const { 220 virtual float getSampleShading() const {
221 return 0.0; 221 return 0.0;
222 } 222 }
223 223
224 /* Sub-class should override and return true if this primitive processor imp lements the distance
225 * vector field, a field of vectors to the nearest point in the edge of the shape. */
226 virtual bool implementsDistanceVector() const { return false; }
227
224 protected: 228 protected:
225 GrPrimitiveProcessor() : fVertexStride(0) {} 229 GrPrimitiveProcessor() : fVertexStride(0) {}
226 230
227 enum { kPreallocAttribCnt = 8 }; 231 enum { kPreallocAttribCnt = 8 };
228 SkSTArray<kPreallocAttribCnt, Attribute> fAttribs; 232 SkSTArray<kPreallocAttribCnt, Attribute> fAttribs;
229 size_t fVertexStride; 233 size_t fVertexStride;
230 234
231 private: 235 private:
232 void notifyRefCntIsZero() const final {}; 236 void notifyRefCntIsZero() const final {};
233 virtual bool hasExplicitLocalCoords() const = 0; 237 virtual bool hasExplicitLocalCoords() const = 0;
234 238
235 typedef GrProcessor INHERITED; 239 typedef GrProcessor INHERITED;
236 }; 240 };
237 241
238 #endif 242 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698