| 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 "SkLinearGradient.h" | 8 #include "SkLinearGradient.h" |
| 9 | 9 |
| 10 static inline int repeat_bits(int x, const int bits) { | 10 static inline int repeat_bits(int x, const int bits) { |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 return NULL; | 560 return NULL; |
| 561 } | 561 } |
| 562 matrix.postConcat(inv); | 562 matrix.postConcat(inv); |
| 563 } | 563 } |
| 564 matrix.postConcat(fPtsToUnit); | 564 matrix.postConcat(fPtsToUnit); |
| 565 return GrLinearGradient::Create(context, *this, matrix, fTileMode); | 565 return GrLinearGradient::Create(context, *this, matrix, fTileMode); |
| 566 } | 566 } |
| 567 | 567 |
| 568 #else | 568 #else |
| 569 | 569 |
| 570 GrEffectRef* SkLinearGradient::asNewEffect(GrContext*, const SkPaint&) const { | 570 GrEffectRef* SkLinearGradient::asNewEffect(GrContext*, const SkPaint&, const SkM
atrix*) const { |
| 571 SkDEBUGFAIL("Should not call in GPU-less build"); | 571 SkDEBUGFAIL("Should not call in GPU-less build"); |
| 572 return NULL; | 572 return NULL; |
| 573 } | 573 } |
| 574 | 574 |
| 575 #endif | 575 #endif |
| 576 | 576 |
| 577 #ifndef SK_IGNORE_TO_STRING | 577 #ifndef SK_IGNORE_TO_STRING |
| 578 void SkLinearGradient::toString(SkString* str) const { | 578 void SkLinearGradient::toString(SkString* str) const { |
| 579 str->append("SkLinearGradient ("); | 579 str->append("SkLinearGradient ("); |
| 580 | 580 |
| 581 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); | 581 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); |
| 582 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); | 582 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); |
| 583 | 583 |
| 584 this->INHERITED::toString(str); | 584 this->INHERITED::toString(str); |
| 585 | 585 |
| 586 str->append(")"); | 586 str->append(")"); |
| 587 } | 587 } |
| 588 #endif | 588 #endif |
| OLD | NEW |