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 | 9 |
10 #include "SkTwoPointConicalGradient_gpu.h" | 10 #include "SkTwoPointConicalGradient_gpu.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
373 this->INHERITED::flatten(buffer); | 373 this->INHERITED::flatten(buffer); |
374 buffer.writePoint(fCenter1); | 374 buffer.writePoint(fCenter1); |
375 buffer.writePoint(fCenter2); | 375 buffer.writePoint(fCenter2); |
376 buffer.writeScalar(fRadius1); | 376 buffer.writeScalar(fRadius1); |
377 buffer.writeScalar(fRadius2); | 377 buffer.writeScalar(fRadius2); |
378 buffer.writeBool(fFlippedGrad); | 378 buffer.writeBool(fFlippedGrad); |
379 } | 379 } |
380 | 380 |
381 #if SK_SUPPORT_GPU | 381 #if SK_SUPPORT_GPU |
382 | 382 |
383 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext* context, const Sk Paint&, | 383 bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& paint, |
384 const SkMatrix* localMatrix) const { | 384 GrColor* grColor, GrEffectRef** grE ffect, |
385 const SkMatrix* localMatrix) const { | |
jvanverth1
2014/06/05 17:36:31
grColor never gets set by this method
dandov
2014/06/06 21:50:43
Done.
| |
385 SkASSERT(NULL != context); | 386 SkASSERT(NULL != context); |
386 SkASSERT(fPtsToUnit.isIdentity()); | 387 SkASSERT(fPtsToUnit.isIdentity()); |
387 | 388 |
388 return Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMa trix); | 389 *grEffect = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, lo calMatrix); |
390 return true; | |
389 } | 391 } |
390 | 392 |
391 #else | 393 #else |
392 | 394 |
393 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext*, const SkPaint&, | 395 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext*, const SkPaint&, |
394 const SkMatrix*) const { | 396 const SkMatrix*) const { |
395 SkDEBUGFAIL("Should not call in GPU-less build"); | 397 SkDEBUGFAIL("Should not call in GPU-less build"); |
396 return NULL; | 398 return NULL; |
397 } | 399 } |
398 | 400 |
(...skipping 17 matching lines...) Expand all Loading... | |
416 str->appendScalar(fCenter2.fY); | 418 str->appendScalar(fCenter2.fY); |
417 str->append(") radius2: "); | 419 str->append(") radius2: "); |
418 str->appendScalar(fRadius2); | 420 str->appendScalar(fRadius2); |
419 str->append(" "); | 421 str->append(" "); |
420 | 422 |
421 this->INHERITED::toString(str); | 423 this->INHERITED::toString(str); |
422 | 424 |
423 str->append(")"); | 425 str->append(")"); |
424 } | 426 } |
425 #endif | 427 #endif |
OLD | NEW |