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 "GrContext.h" | 9 #include "GrContext.h" |
10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return false; | 142 return false; |
143 } | 143 } |
144 } | 144 } |
145 return true; | 145 return true; |
146 } | 146 } |
147 | 147 |
148 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 148 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
149 | 149 |
150 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { | 150 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { |
151 fCoordTransforms.push_back(transform); | 151 fCoordTransforms.push_back(transform); |
| 152 fUsesLocalCoords = fUsesLocalCoords || transform->sourceCoords() == kLocal_G
rCoordSet; |
152 SkDEBUGCODE(transform->setInProcessor();) | 153 SkDEBUGCODE(transform->setInProcessor();) |
153 } | 154 } |
154 | 155 |
155 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { | 156 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { |
156 if (fCoordTransforms.count() != that.fCoordTransforms.count()) { | 157 if (fCoordTransforms.count() != that.fCoordTransforms.count()) { |
157 return false; | 158 return false; |
158 } | 159 } |
159 int count = fCoordTransforms.count(); | 160 int count = fCoordTransforms.count(); |
160 for (int i = 0; i < count; ++i) { | 161 for (int i = 0; i < count; ++i) { |
161 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { | 162 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { |
(...skipping 18 matching lines...) Expand all Loading... |
180 | 181 |
181 void GrGeometryData::operator delete(void* target) { | 182 void GrGeometryData::operator delete(void* target) { |
182 GrProcessor_Globals::GetTLS()->release(target); | 183 GrProcessor_Globals::GetTLS()->release(target); |
183 } | 184 } |
184 | 185 |
185 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 186 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
186 | 187 |
187 // Initial static variable from GrXPFactory | 188 // Initial static variable from GrXPFactory |
188 int32_t GrXPFactory::gCurrXPFClassID = | 189 int32_t GrXPFactory::gCurrXPFClassID = |
189 GrXPFactory::kIllegalXPFClassID; | 190 GrXPFactory::kIllegalXPFClassID; |
OLD | NEW |