| 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 GrGLGeometryProcessor_DEFINED | 8 #ifndef GrGLGeometryProcessor_DEFINED |
| 9 #define GrGLGeometryProcessor_DEFINED | 9 #define GrGLGeometryProcessor_DEFINED |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void setTransformDataMatrix(const SkMatrix& localMatrix, | 89 void setTransformDataMatrix(const SkMatrix& localMatrix, |
| 90 const GrGLProgramDataManager& pdman, | 90 const GrGLProgramDataManager& pdman, |
| 91 int index, | 91 int index, |
| 92 const SkTArray<const GrCoordTransform*, true>& t
ransforms) { | 92 const SkTArray<const GrCoordTransform*, true>& t
ransforms) { |
| 93 SkSTArray<2, Transform, true>& procTransforms = fInstalledTransforms[ind
ex]; | 93 SkSTArray<2, Transform, true>& procTransforms = fInstalledTransforms[ind
ex]; |
| 94 int numTransforms = transforms.count(); | 94 int numTransforms = transforms.count(); |
| 95 for (int t = 0; t < numTransforms; ++t) { | 95 for (int t = 0; t < numTransforms; ++t) { |
| 96 SkASSERT(procTransforms[t].fHandle.isValid()); | 96 SkASSERT(procTransforms[t].fHandle.isValid()); |
| 97 const SkMatrix& transform = GetTransformMatrix(localMatrix, *transfo
rms[t]); | 97 const SkMatrix& transform = GetTransformMatrix(localMatrix, *transfo
rms[t]); |
| 98 if (!procTransforms[t].fCurrentValue.cheapEqualTo(transform)) { | 98 if (!procTransforms[t].fCurrentValue.cheapEqualTo(transform)) { |
| 99 pdman.setSkMatrix(procTransforms[t].fHandle.convertToUniformHand
le(), transform); | 99 pdman.setSkMatrix(procTransforms[t].fHandle.toIndex(), transform
); |
| 100 procTransforms[t].fCurrentValue = transform; | 100 procTransforms[t].fCurrentValue = transform; |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 virtual void onEmitCode(EmitArgs&, GrGPArgs*) = 0; | 105 virtual void onEmitCode(EmitArgs&, GrGPArgs*) = 0; |
| 106 | 106 |
| 107 typedef GrGLPrimitiveProcessor INHERITED; | 107 typedef GrGLPrimitiveProcessor INHERITED; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif | 110 #endif |
| OLD | NEW |