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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 child->fTextureAccesses.begin()); | 198 child->fTextureAccesses.begin()); |
199 } | 199 } |
200 | 200 |
201 int index = fChildProcessors.count(); | 201 int index = fChildProcessors.count(); |
202 fChildProcessors.push_back(GrFragmentStage(child)); | 202 fChildProcessors.push_back(GrFragmentStage(child)); |
203 | 203 |
204 if (child->willReadFragmentPosition()) { | 204 if (child->willReadFragmentPosition()) { |
205 this->setWillReadFragmentPosition(); | 205 this->setWillReadFragmentPosition(); |
206 } | 206 } |
207 | 207 |
| 208 if (child->usesLocalCoords()) { |
| 209 fUsesLocalCoords = true; |
| 210 } |
| 211 |
208 return index; | 212 return index; |
209 } | 213 } |
210 | 214 |
211 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { | 215 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { |
212 if (this->numTransforms() != that.numTransforms()) { | 216 if (this->numTransforms() != that.numTransforms()) { |
213 return false; | 217 return false; |
214 } | 218 } |
215 int count = this->numTransforms(); | 219 int count = this->numTransforms(); |
216 for (int i = 0; i < count; ++i) { | 220 for (int i = 0; i < count; ++i) { |
217 if (this->coordTransform(i) != that.coordTransform(i)) { | 221 if (this->coordTransform(i) != that.coordTransform(i)) { |
(...skipping 16 matching lines...) Expand all Loading... |
234 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 238 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
235 | 239 |
236 // GrProcessorDataManager lives in the same pool | 240 // GrProcessorDataManager lives in the same pool |
237 void* GrProcessorDataManager::operator new(size_t size) { | 241 void* GrProcessorDataManager::operator new(size_t size) { |
238 return MemoryPoolAccessor().pool()->allocate(size); | 242 return MemoryPoolAccessor().pool()->allocate(size); |
239 } | 243 } |
240 | 244 |
241 void GrProcessorDataManager::operator delete(void* target) { | 245 void GrProcessorDataManager::operator delete(void* target) { |
242 return MemoryPoolAccessor().pool()->release(target); | 246 return MemoryPoolAccessor().pool()->release(target); |
243 } | 247 } |
OLD | NEW |