| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // TODO(junov): Compute whether the cone fills the plane crbug.com/222380 | 210 // TODO(junov): Compute whether the cone fills the plane crbug.com/222380 |
| 211 return false; | 211 return false; |
| 212 } | 212 } |
| 213 | 213 |
| 214 size_t SkTwoPointConicalGradient::contextSize() const { | 214 size_t SkTwoPointConicalGradient::contextSize() const { |
| 215 return sizeof(TwoPointConicalGradientContext); | 215 return sizeof(TwoPointConicalGradientContext); |
| 216 } | 216 } |
| 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 SkNEW_PLACEMENT_ARGS(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 | 227 // we don't have a span16 proc |
| 228 fFlags &= ~kHasSpan16_Flag; | 228 fFlags &= ~kHasSpan16_Flag; |
| 229 | 229 |
| 230 // in general, we might discard based on computed-radius, so clear | 230 // in general, we might discard based on computed-radius, so clear |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 str->appendScalar(fCenter2.fY); | 406 str->appendScalar(fCenter2.fY); |
| 407 str->append(") radius2: "); | 407 str->append(") radius2: "); |
| 408 str->appendScalar(fRadius2); | 408 str->appendScalar(fRadius2); |
| 409 str->append(" "); | 409 str->append(" "); |
| 410 | 410 |
| 411 this->INHERITED::toString(str); | 411 this->INHERITED::toString(str); |
| 412 | 412 |
| 413 str->append(")"); | 413 str->append(")"); |
| 414 } | 414 } |
| 415 #endif | 415 #endif |
| OLD | NEW |