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

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

Issue 678953002: Default geometry processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 1 month 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 | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexPathRenderer.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 GrGeometryProcessor_DEFINED 8 #ifndef GrGeometryProcessor_DEFINED
9 #define GrGeometryProcessor_DEFINED 9 #define GrGeometryProcessor_DEFINED
10 10
(...skipping 25 matching lines...) Expand all
36 static const int kMaxVertexAttribs = 2; 36 static const int kMaxVertexAttribs = 2;
37 typedef SkTArray<GrShaderVar, true> VertexAttribArray; 37 typedef SkTArray<GrShaderVar, true> VertexAttribArray;
38 38
39 const VertexAttribArray& getVertexAttribs() const { return fVertexAttribs; } 39 const VertexAttribArray& getVertexAttribs() const { return fVertexAttribs; }
40 40
41 bool willUseGeoShader() const { return fWillUseGeoShader; } 41 bool willUseGeoShader() const { return fWillUseGeoShader; }
42 42
43 /** Returns true if this and other processor conservatively draw identically . It can only return 43 /** Returns true if this and other processor conservatively draw identically . It can only return
44 true when the two prcoessors are of the same subclass (i.e. they return the same object from 44 true when the two prcoessors are of the same subclass (i.e. they return the same object from
45 from getFactory()). 45 from getFactory()).
46 A return value of true from isEqual() should not be used to test whether the prcoessors 46 A return value of true from isEqual() should not be used to test whether the processors
47 would generate the same shader code. To test for identical code generati on use the 47 would generate the same shader code. To test for identical code generati on use the
48 processors' keys computed by the GrBackendEffectFactory. */ 48 processors' keys computed by the GrBackendEffectFactory. */
49 bool isEqual(const GrGeometryProcessor& that) const { 49 bool isEqual(const GrGeometryProcessor& that) const {
50 if (&this->getFactory() != &that.getFactory() || !this->hasSameTextureAc cesses(that)) { 50 if (&this->getFactory() != &that.getFactory() || !this->hasSameTextureAc cesses(that)) {
51 return false; 51 return false;
52 } 52 }
53 return this->onIsEqual(that); 53 return this->onIsEqual(that);
54 } 54 }
55 55
56 protected: 56 protected:
(...skipping 12 matching lines...) Expand all
69 private: 69 private:
70 virtual bool onIsEqual(const GrGeometryProcessor&) const = 0; 70 virtual bool onIsEqual(const GrGeometryProcessor&) const = 0;
71 71
72 SkSTArray<kMaxVertexAttribs, GrShaderVar, true> fVertexAttribs; 72 SkSTArray<kMaxVertexAttribs, GrShaderVar, true> fVertexAttribs;
73 bool fWillUseGeoShader; 73 bool fWillUseGeoShader;
74 74
75 typedef GrProcessor INHERITED; 75 typedef GrProcessor INHERITED;
76 }; 76 };
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698