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 "SkTwoPointConicalGradient.h" | 8 #include "SkTwoPointConicalGradient.h" |
9 #include "SkTwoPointConicalGradient_gpu.h" | 9 #include "SkTwoPointConicalGradient_gpu.h" |
10 | 10 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 217 |
218 SkShader::Context* SkTwoPointConicalGradient::onCreateContext(const ContextRec&
rec, | 218 SkShader::Context* SkTwoPointConicalGradient::onCreateContext(const ContextRec&
rec, |
219 void* storage) con
st { | 219 void* storage) con
st { |
220 return new (storage) TwoPointConicalGradientContext(*this, rec); | 220 return new (storage) TwoPointConicalGradientContext(*this, rec); |
221 } | 221 } |
222 | 222 |
223 SkTwoPointConicalGradient::TwoPointConicalGradientContext::TwoPointConicalGradie
ntContext( | 223 SkTwoPointConicalGradient::TwoPointConicalGradientContext::TwoPointConicalGradie
ntContext( |
224 const SkTwoPointConicalGradient& shader, const ContextRec& rec) | 224 const SkTwoPointConicalGradient& shader, const ContextRec& rec) |
225 : INHERITED(shader, rec) | 225 : INHERITED(shader, rec) |
226 { | 226 { |
227 // we don't have a span16 proc | |
228 fFlags &= ~kHasSpan16_Flag; | |
229 | |
230 // in general, we might discard based on computed-radius, so clear | 227 // in general, we might discard based on computed-radius, so clear |
231 // this flag (todo: sometimes we can detect that we never discard...) | 228 // this flag (todo: sometimes we can detect that we never discard...) |
232 fFlags &= ~kOpaqueAlpha_Flag; | 229 fFlags &= ~kOpaqueAlpha_Flag; |
233 } | 230 } |
234 | 231 |
235 void SkTwoPointConicalGradient::TwoPointConicalGradientContext::shadeSpan( | 232 void SkTwoPointConicalGradient::TwoPointConicalGradientContext::shadeSpan( |
236 int x, int y, SkPMColor* dstCParam, int count) { | 233 int x, int y, SkPMColor* dstCParam, int count) { |
237 const SkTwoPointConicalGradient& twoPointConicalGradient = | 234 const SkTwoPointConicalGradient& twoPointConicalGradient = |
238 static_cast<const SkTwoPointConicalGradient&>(fShader); | 235 static_cast<const SkTwoPointConicalGradient&>(fShader); |
239 | 236 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 str->appendScalar(fCenter2.fY); | 389 str->appendScalar(fCenter2.fY); |
393 str->append(") radius2: "); | 390 str->append(") radius2: "); |
394 str->appendScalar(fRadius2); | 391 str->appendScalar(fRadius2); |
395 str->append(" "); | 392 str->append(" "); |
396 | 393 |
397 this->INHERITED::toString(str); | 394 this->INHERITED::toString(str); |
398 | 395 |
399 str->append(")"); | 396 str->append(")"); |
400 } | 397 } |
401 #endif | 398 #endif |
OLD | NEW |