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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 | 549 |
550 #else | 550 #else |
551 | 551 |
552 GrEffectRef* SkLinearGradient::asNewEffect(GrContext*, const SkPaint&) const { | 552 GrEffectRef* SkLinearGradient::asNewEffect(GrContext*, const SkPaint&) const { |
553 SkDEBUGFAIL("Should not call in GPU-less build"); | 553 SkDEBUGFAIL("Should not call in GPU-less build"); |
554 return NULL; | 554 return NULL; |
555 } | 555 } |
556 | 556 |
557 #endif | 557 #endif |
558 | 558 |
559 #ifdef SK_DEVELOPER | 559 #ifndef SK_IGNORE_TO_STRING |
560 void SkLinearGradient::toString(SkString* str) const { | 560 void SkLinearGradient::toString(SkString* str) const { |
561 str->append("SkLinearGradient ("); | 561 str->append("SkLinearGradient ("); |
562 | 562 |
563 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); | 563 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); |
564 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); | 564 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); |
565 | 565 |
566 this->INHERITED::toString(str); | 566 this->INHERITED::toString(str); |
567 | 567 |
568 str->append(")"); | 568 str->append(")"); |
569 } | 569 } |
570 #endif | 570 #endif |
OLD | NEW |