| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 SkMatrix inv; | 284 SkMatrix inv; |
| 285 if (!localMatrix->invert(&inv)) { | 285 if (!localMatrix->invert(&inv)) { |
| 286 return nullptr; | 286 return nullptr; |
| 287 } | 287 } |
| 288 matrix.postConcat(inv); | 288 matrix.postConcat(inv); |
| 289 } | 289 } |
| 290 matrix.postConcat(fPtsToUnit); | 290 matrix.postConcat(fPtsToUnit); |
| 291 | 291 |
| 292 SkAutoTUnref<const GrFragmentProcessor> inner( | 292 SkAutoTUnref<const GrFragmentProcessor> inner( |
| 293 GrSweepGradient::Create(context, procDataManager, *this, matrix)); | 293 GrSweepGradient::Create(context, procDataManager, *this, matrix)); |
| 294 return GrFragmentProcessor::MulOuputByInputAlpha(inner); | 294 return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
| 295 } | 295 } |
| 296 | 296 |
| 297 #endif | 297 #endif |
| 298 | 298 |
| 299 #ifndef SK_IGNORE_TO_STRING | 299 #ifndef SK_IGNORE_TO_STRING |
| 300 void SkSweepGradient::toString(SkString* str) const { | 300 void SkSweepGradient::toString(SkString* str) const { |
| 301 str->append("SkSweepGradient: ("); | 301 str->append("SkSweepGradient: ("); |
| 302 | 302 |
| 303 str->append("center: ("); | 303 str->append("center: ("); |
| 304 str->appendScalar(fCenter.fX); | 304 str->appendScalar(fCenter.fX); |
| 305 str->append(", "); | 305 str->append(", "); |
| 306 str->appendScalar(fCenter.fY); | 306 str->appendScalar(fCenter.fY); |
| 307 str->append(") "); | 307 str->append(") "); |
| 308 | 308 |
| 309 this->INHERITED::toString(str); | 309 this->INHERITED::toString(str); |
| 310 | 310 |
| 311 str->append(")"); | 311 str->append(")"); |
| 312 } | 312 } |
| 313 #endif | 313 #endif |
| OLD | NEW |