| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkSweepGradient.h" | 9 #include "SkSweepGradient.h" |
| 10 | 10 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 *grEffect = GrSweepGradient::Create(context, *this, matrix); | 303 *grEffect = GrSweepGradient::Create(context, *this, matrix); |
| 304 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); | 304 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); |
| 305 | 305 |
| 306 return true; | 306 return true; |
| 307 } | 307 } |
| 308 | 308 |
| 309 #else | 309 #else |
| 310 | 310 |
| 311 bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint, | 311 bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint, |
| 312 const SkMatrix* localMatrix, GrColor* grColor, | 312 const SkMatrix* localMatrix, GrColor* grColor, |
| 313 GrEffect** grEffect) const { | 313 GrEffectRef** grEffect) const { |
| 314 SkDEBUGFAIL("Should not call in GPU-less build"); | 314 SkDEBUGFAIL("Should not call in GPU-less build"); |
| 315 return false; | 315 return false; |
| 316 } | 316 } |
| 317 | 317 |
| 318 #endif | 318 #endif |
| 319 | 319 |
| 320 #ifndef SK_IGNORE_TO_STRING | 320 #ifndef SK_IGNORE_TO_STRING |
| 321 void SkSweepGradient::toString(SkString* str) const { | 321 void SkSweepGradient::toString(SkString* str) const { |
| 322 str->append("SkSweepGradient: ("); | 322 str->append("SkSweepGradient: ("); |
| 323 | 323 |
| 324 str->append("center: ("); | 324 str->append("center: ("); |
| 325 str->appendScalar(fCenter.fX); | 325 str->appendScalar(fCenter.fX); |
| 326 str->append(", "); | 326 str->append(", "); |
| 327 str->appendScalar(fCenter.fY); | 327 str->appendScalar(fCenter.fY); |
| 328 str->append(") "); | 328 str->append(") "); |
| 329 | 329 |
| 330 this->INHERITED::toString(str); | 330 this->INHERITED::toString(str); |
| 331 | 331 |
| 332 str->append(")"); | 332 str->append(")"); |
| 333 } | 333 } |
| 334 #endif | 334 #endif |
| OLD | NEW |