| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 #if SK_SUPPORT_GPU | 388 #if SK_SUPPORT_GPU |
| 389 | 389 |
| 390 #include "SkGr.h" | 390 #include "SkGr.h" |
| 391 | 391 |
| 392 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context, | 392 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context, |
| 393 const SkPaint& paint, | 393 const SkPaint& paint, |
| 394 const SkMatrix& viewM, | 394 const SkMatrix& viewM, |
| 395 const SkMatrix* localMatrix, | 395 const SkMatrix* localMatrix, |
| 396 GrColor* paintColor, | 396 GrColor* paintColor, |
| 397 GrShaderDataManager* shaderD
ataManager, |
| 397 GrFragmentProcessor** fp) c
onst { | 398 GrFragmentProcessor** fp) c
onst { |
| 398 SkASSERT(context); | 399 SkASSERT(context); |
| 399 SkASSERT(fPtsToUnit.isIdentity()); | 400 SkASSERT(fPtsToUnit.isIdentity()); |
| 400 | 401 |
| 401 *fp = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMat
rix); | 402 *fp = Gr2PtConicalGradientEffect::Create(context, shaderDataManager, *this,
fTileMode, |
| 403 localMatrix); |
| 402 *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); | 404 *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); |
| 403 return true; | 405 return true; |
| 404 } | 406 } |
| 405 | 407 |
| 406 #else | 408 #else |
| 407 | 409 |
| 408 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&, | 410 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&, |
| 409 const SkMatrix&, const SkMat
rix*, | 411 const SkMatrix&, const SkMat
rix*, |
| 410 GrColor*, GrFragmentProcesso
r**) const { | 412 GrColor*, GrFragmentProcesso
r**) const { |
| 411 SkDEBUGFAIL("Should not call in GPU-less build"); | 413 SkDEBUGFAIL("Should not call in GPU-less build"); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 432 str->appendScalar(fCenter2.fY); | 434 str->appendScalar(fCenter2.fY); |
| 433 str->append(") radius2: "); | 435 str->append(") radius2: "); |
| 434 str->appendScalar(fRadius2); | 436 str->appendScalar(fRadius2); |
| 435 str->append(" "); | 437 str->append(" "); |
| 436 | 438 |
| 437 this->INHERITED::toString(str); | 439 this->INHERITED::toString(str); |
| 438 | 440 |
| 439 str->append(")"); | 441 str->append(")"); |
| 440 } | 442 } |
| 441 #endif | 443 #endif |
| OLD | NEW |