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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 return true; | 165 return true; |
166 } | 166 } |
167 | 167 |
168 void GrFragmentProcessor::computeInvariantOutput(GrInvariantOutput* inout) const
{ | 168 void GrFragmentProcessor::computeInvariantOutput(GrInvariantOutput* inout) const
{ |
169 this->onComputeInvariantOutput(inout); | 169 this->onComputeInvariantOutput(inout); |
170 } | 170 } |
171 | 171 |
172 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 172 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
173 | 173 |
174 void GrGeometryProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) co
nst { | |
175 if (fHasVertexColor) { | |
176 if (fOpaqueVertexColors) { | |
177 out->setUnknownOpaqueFourComponents(); | |
178 } else { | |
179 out->setUnknownFourComponents(); | |
180 } | |
181 } else { | |
182 out->setKnownFourComponents(fColor); | |
183 } | |
184 this->onGetInvariantOutputColor(out); | |
185 } | |
186 | |
187 void GrGeometryProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out)
const { | |
188 this->onGetInvariantOutputCoverage(out); | |
189 } | |
190 | |
191 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | |
192 | |
193 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const
{ | |
194 out->setKnownFourComponents(fColor); | |
195 } | |
196 | |
197 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con
st { | |
198 out->setKnownSingleComponent(0xff); | |
199 } | |
200 | |
201 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | |
202 | |
203 /* | 174 /* |
204 * GrGeometryData shares the same pool so it lives in this file too | 175 * GrGeometryData shares the same pool so it lives in this file too |
205 */ | 176 */ |
206 void* GrGeometryData::operator new(size_t size) { | 177 void* GrGeometryData::operator new(size_t size) { |
207 return GrProcessor_Globals::GetTLS()->allocate(size); | 178 return GrProcessor_Globals::GetTLS()->allocate(size); |
208 } | 179 } |
209 | 180 |
210 void GrGeometryData::operator delete(void* target) { | 181 void GrGeometryData::operator delete(void* target) { |
211 GrProcessor_Globals::GetTLS()->release(target); | 182 GrProcessor_Globals::GetTLS()->release(target); |
212 } | 183 } |
213 | 184 |
214 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 185 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
215 | 186 |
216 // Initial static variable from GrXPFactory | 187 // Initial static variable from GrXPFactory |
217 int32_t GrXPFactory::gCurrXPFClassID = | 188 int32_t GrXPFactory::gCurrXPFClassID = |
218 GrXPFactory::kIllegalXPFClassID; | 189 GrXPFactory::kIllegalXPFClassID; |
OLD | NEW |