OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "GrProcessor.h" | 8 #include "GrProcessor.h" |
9 #include "GrBackendProcessorFactory.h" | 9 #include "GrBackendProcessorFactory.h" |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 return true; | 165 return true; |
166 } | 166 } |
167 #endif // end DEBUG | 167 #endif // end DEBUG |
168 | 168 |
169 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 169 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
170 | 170 |
171 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { | 171 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { |
172 fCoordTransforms.push_back(transform); | 172 fCoordTransforms.push_back(transform); |
173 SkDEBUGCODE(transform->setInProcessor();) | 173 SkDEBUGCODE(transform->setInProcessor();) |
174 } | 174 } |
| 175 |
| 176 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { |
| 177 if (fCoordTransforms.count() != that.fCoordTransforms.count()) { |
| 178 return false; |
| 179 } |
| 180 int count = fCoordTransforms.count(); |
| 181 for (int i = 0; i < count; ++i) { |
| 182 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { |
| 183 return false; |
| 184 } |
| 185 } |
| 186 return true; |
| 187 } |
OLD | NEW |