| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 typedef GrGradientEffect INHERITED; | 240 typedef GrGradientEffect INHERITED; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 ///////////////////////////////////////////////////////////////////// | 243 ///////////////////////////////////////////////////////////////////// |
| 244 | 244 |
| 245 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSweepGradient); | 245 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSweepGradient); |
| 246 | 246 |
| 247 GrFragmentProcessor* GrSweepGradient::TestCreate(SkRandom* random, | 247 GrFragmentProcessor* GrSweepGradient::TestCreate(SkRandom* random, |
| 248 GrContext* context, | 248 GrContext* context, |
| 249 const GrDrawTargetCaps&, | 249 const GrCaps&, |
| 250 GrTexture**) { | 250 GrTexture**) { |
| 251 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; | 251 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; |
| 252 | 252 |
| 253 SkColor colors[kMaxRandomGradientColors]; | 253 SkColor colors[kMaxRandomGradientColors]; |
| 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)); |
| (...skipping 77 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 |