Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Side by Side Diff: src/effects/gradients/SkRadialGradient.cpp

Issue 1117443002: create GrTestUtils.h, move some common functions into it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkRadialGradient.h" 9 #include "SkRadialGradient.h"
10 #include "SkRadialGradient_Table.h" 10 #include "SkRadialGradient_Table.h"
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 SkScalar* stops = stopsArray; 612 SkScalar* stops = stopsArray;
613 SkShader::TileMode tm; 613 SkShader::TileMode tm;
614 int colorCount = RandomGradientParams(random, colors, &stops, &tm); 614 int colorCount = RandomGradientParams(random, colors, &stops, &tm);
615 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, 615 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius,
616 colors, stops, colorCount, 616 colors, stops, colorCount,
617 tm)); 617 tm));
618 SkPaint paint; 618 SkPaint paint;
619 GrColor paintColor; 619 GrColor paintColor;
620 GrFragmentProcessor* fp; 620 GrFragmentProcessor* fp;
621 SkAssertResult(shader->asFragmentProcessor(context, paint, 621 SkAssertResult(shader->asFragmentProcessor(context, paint,
622 GrProcessorUnitTest::TestMatrix(r andom), NULL, 622 GrTest::TestMatrix(random), NULL,
623 &paintColor, &fp)); 623 &paintColor, &fp));
624 return fp; 624 return fp;
625 } 625 }
626 626
627 ///////////////////////////////////////////////////////////////////// 627 /////////////////////////////////////////////////////////////////////
628 628
629 void GrGLRadialGradient::emitCode(GrGLFPBuilder* builder, 629 void GrGLRadialGradient::emitCode(GrGLFPBuilder* builder,
630 const GrFragmentProcessor& fp, 630 const GrFragmentProcessor& fp,
631 const char* outputColor, 631 const char* outputColor,
632 const char* inputColor, 632 const char* inputColor,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 str->appendScalar(fCenter.fY); 688 str->appendScalar(fCenter.fY);
689 str->append(") radius: "); 689 str->append(") radius: ");
690 str->appendScalar(fRadius); 690 str->appendScalar(fRadius);
691 str->append(" "); 691 str->append(" ");
692 692
693 this->INHERITED::toString(str); 693 this->INHERITED::toString(str);
694 694
695 str->append(")"); 695 str->append(")");
696 } 696 }
697 #endif 697 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698