| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 SkScalar stopsArray[kMaxRandomGradientColors]; | 254 SkScalar stopsArray[kMaxRandomGradientColors]; |
| 255 SkScalar* stops = stopsArray; | 255 SkScalar* stops = stopsArray; |
| 256 SkShader::TileMode tmIgnored; | 256 SkShader::TileMode tmIgnored; |
| 257 int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored); | 257 int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored); |
| 258 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, cente
r.fY, | 258 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, cente
r.fY, |
| 259 colors, stops, c
olorCount)); | 259 colors, stops, c
olorCount)); |
| 260 SkPaint paint; | 260 SkPaint paint; |
| 261 GrFragmentProcessor* fp; | 261 GrFragmentProcessor* fp; |
| 262 GrColor paintColor; | 262 GrColor paintColor; |
| 263 SkAssertResult(shader->asFragmentProcessor(context, paint, | 263 SkAssertResult(shader->asFragmentProcessor(context, paint, |
| 264 GrProcessorUnitTest::TestMatrix(r
andom), NULL, | 264 GrTest::TestMatrix(random), NULL, |
| 265 &paintColor, &fp)); | 265 &paintColor, &fp)); |
| 266 return fp; | 266 return fp; |
| 267 } | 267 } |
| 268 | 268 |
| 269 ///////////////////////////////////////////////////////////////////// | 269 ///////////////////////////////////////////////////////////////////// |
| 270 | 270 |
| 271 void GrGLSweepGradient::emitCode(GrGLFPBuilder* builder, | 271 void GrGLSweepGradient::emitCode(GrGLFPBuilder* builder, |
| 272 const GrFragmentProcessor& fp, | 272 const GrFragmentProcessor& fp, |
| 273 const char* outputColor, | 273 const char* outputColor, |
| 274 const char* inputColor, | 274 const char* inputColor, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 str->appendScalar(fCenter.fX); | 337 str->appendScalar(fCenter.fX); |
| 338 str->append(", "); | 338 str->append(", "); |
| 339 str->appendScalar(fCenter.fY); | 339 str->appendScalar(fCenter.fY); |
| 340 str->append(") "); | 340 str->append(") "); |
| 341 | 341 |
| 342 this->INHERITED::toString(str); | 342 this->INHERITED::toString(str); |
| 343 | 343 |
| 344 str->append(")"); | 344 str->append(")"); |
| 345 } | 345 } |
| 346 #endif | 346 #endif |
| OLD | NEW |