| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |