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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 child->fCoordTransforms.begin()); | 143 child->fCoordTransforms.begin()); |
144 } | 144 } |
145 if (!child->fTextureAccesses.empty()) { | 145 if (!child->fTextureAccesses.empty()) { |
146 fTextureAccesses.push_back_n(child->fTextureAccesses.count(), | 146 fTextureAccesses.push_back_n(child->fTextureAccesses.count(), |
147 child->fTextureAccesses.begin()); | 147 child->fTextureAccesses.begin()); |
148 } | 148 } |
149 | 149 |
150 int index = fChildProcessors.count(); | 150 int index = fChildProcessors.count(); |
151 fChildProcessors.push_back(GrFragmentStage(child)); | 151 fChildProcessors.push_back(GrFragmentStage(child)); |
152 | 152 |
153 if (child->willReadFragmentPosition()) | 153 if (child->willReadFragmentPosition()) { |
154 this->setWillReadFragmentPosition(); | 154 this->setWillReadFragmentPosition(); |
| 155 } |
155 | 156 |
156 return index; | 157 return index; |
157 } | 158 } |
158 | 159 |
159 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { | 160 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
st { |
160 if (this->numTransforms() != that.numTransforms()) { | 161 if (this->numTransforms() != that.numTransforms()) { |
161 return false; | 162 return false; |
162 } | 163 } |
163 int count = this->numTransforms(); | 164 int count = this->numTransforms(); |
164 for (int i = 0; i < count; ++i) { | 165 for (int i = 0; i < count; ++i) { |
(...skipping 17 matching lines...) Expand all Loading... |
182 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 183 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
183 | 184 |
184 // GrProcessorDataManager lives in the same pool | 185 // GrProcessorDataManager lives in the same pool |
185 void* GrProcessorDataManager::operator new(size_t size) { | 186 void* GrProcessorDataManager::operator new(size_t size) { |
186 return MemoryPoolAccessor().pool()->allocate(size); | 187 return MemoryPoolAccessor().pool()->allocate(size); |
187 } | 188 } |
188 | 189 |
189 void GrProcessorDataManager::operator delete(void* target) { | 190 void GrProcessorDataManager::operator delete(void* target) { |
190 return MemoryPoolAccessor().pool()->release(target); | 191 return MemoryPoolAccessor().pool()->release(target); |
191 } | 192 } |
OLD | NEW |