| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 fEffectRef.reset(SkRef(other.fEffectRef.get())); | 39 fEffectRef.reset(SkRef(other.fEffectRef.get())); |
| 40 memcpy(fVertexAttribIndices, other.fVertexAttribIndices, sizeof(fVertexA
ttribIndices)); | 40 memcpy(fVertexAttribIndices, other.fVertexAttribIndices, sizeof(fVertexA
ttribIndices)); |
| 41 return *this; | 41 return *this; |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool operator== (const GrEffectStage& other) const { | 44 bool operator== (const GrEffectStage& other) const { |
| 45 SkASSERT(NULL != fEffectRef.get()); | 45 SkASSERT(NULL != fEffectRef.get()); |
| 46 SkASSERT(NULL != other.fEffectRef.get()); | 46 SkASSERT(NULL != other.fEffectRef.get()); |
| 47 | 47 |
| 48 if (!(*this->getEffect())->isEqual(*other.getEffect())) { | 48 if (!this->getEffect()->isEqual(*other.getEffect())) { |
| 49 return false; | 49 return false; |
| 50 } | 50 } |
| 51 | 51 |
| 52 if (fCoordChangeMatrixSet != other.fCoordChangeMatrixSet) { | 52 if (fCoordChangeMatrixSet != other.fCoordChangeMatrixSet) { |
| 53 return false; | 53 return false; |
| 54 } | 54 } |
| 55 | 55 |
| 56 if (!fCoordChangeMatrixSet) { | 56 if (!fCoordChangeMatrixSet) { |
| 57 return true; | 57 return true; |
| 58 } | 58 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 * installed in the stage. | 119 * installed in the stage. |
| 120 */ | 120 */ |
| 121 const SkMatrix& getCoordChangeMatrix() const { | 121 const SkMatrix& getCoordChangeMatrix() const { |
| 122 if (fCoordChangeMatrixSet) { | 122 if (fCoordChangeMatrixSet) { |
| 123 return fCoordChangeMatrix; | 123 return fCoordChangeMatrix; |
| 124 } else { | 124 } else { |
| 125 return SkMatrix::I(); | 125 return SkMatrix::I(); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 const GrEffectRef* getEffect() const { return fEffectRef.get(); } | 129 const GrEffect* getEffect() const { return fEffectRef.get()->get(); } |
| 130 | 130 |
| 131 const int* getVertexAttribIndices() const { return fVertexAttribIndices; } | 131 const int* getVertexAttribIndices() const { return fVertexAttribIndices; } |
| 132 int getVertexAttribIndexCount() const { return fEffectRef->get()->numVertexA
ttribs(); } | 132 int getVertexAttribIndexCount() const { return fEffectRef->get()->numVertexA
ttribs(); } |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 bool fCoordChangeMatrixSet; | 135 bool fCoordChangeMatrixSet; |
| 136 SkMatrix fCoordChangeMatrix; | 136 SkMatrix fCoordChangeMatrix; |
| 137 SkAutoTUnref<const GrEffectRef> fEffectRef; | 137 SkAutoTUnref<const GrEffectRef> fEffectRef; |
| 138 int fVertexAttribIndices[2]; | 138 int fVertexAttribIndices[2]; |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 #endif | 141 #endif |
| OLD | NEW |