| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 | 340 |
| 341 return SkGradientShader::MakeTwoPointConical(c1, r1, c2, r2, desc.fColors, d
esc.fPos, | 341 return SkGradientShader::MakeTwoPointConical(c1, r1, c2, r2, desc.fColors, d
esc.fPos, |
| 342 desc.fCount, desc.fTileMode, de
sc.fGradFlags, | 342 desc.fCount, desc.fTileMode, de
sc.fGradFlags, |
| 343 desc.fLocalMatrix); | 343 desc.fLocalMatrix); |
| 344 } | 344 } |
| 345 | 345 |
| 346 void SkTwoPointConicalGradient::flatten(SkWriteBuffer& buffer) const { | 346 void SkTwoPointConicalGradient::flatten(SkWriteBuffer& buffer) const { |
| 347 this->INHERITED::flatten(buffer); | 347 this->INHERITED::flatten(buffer); |
| 348 buffer.writePoint(fCenter1); | 348 buffer.writePoint("fCenter1", fCenter1); |
| 349 buffer.writePoint(fCenter2); | 349 buffer.writePoint("fCenter2", fCenter2); |
| 350 buffer.writeScalar(fRadius1); | 350 buffer.writeScalar("fRadius1", fRadius1); |
| 351 buffer.writeScalar(fRadius2); | 351 buffer.writeScalar("fRadius2", fRadius2); |
| 352 buffer.writeBool(fFlippedGrad); | 352 buffer.writeBool("fFlippedGrad", fFlippedGrad); |
| 353 } | 353 } |
| 354 | 354 |
| 355 #if SK_SUPPORT_GPU | 355 #if SK_SUPPORT_GPU |
| 356 | 356 |
| 357 #include "SkGr.h" | 357 #include "SkGr.h" |
| 358 | 358 |
| 359 const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor( | 359 const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor( |
| 360 GrContext* context, | 360 GrContext* context, |
| 361 const SkMatrix& viewM, | 361 const SkMatrix& viewM, |
| 362 const SkMatrix* localMatrix, | 362 const SkMatrix* localMatrix, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 388 str->appendScalar(fCenter2.fY); | 388 str->appendScalar(fCenter2.fY); |
| 389 str->append(") radius2: "); | 389 str->append(") radius2: "); |
| 390 str->appendScalar(fRadius2); | 390 str->appendScalar(fRadius2); |
| 391 str->append(" "); | 391 str->append(" "); |
| 392 | 392 |
| 393 this->INHERITED::toString(str); | 393 this->INHERITED::toString(str); |
| 394 | 394 |
| 395 str->append(")"); | 395 str->append(")"); |
| 396 } | 396 } |
| 397 #endif | 397 #endif |
| OLD | NEW |