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

Side by Side Diff: src/effects/gradients/SkTwoPointRadialGradient.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
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 "SkTwoPointRadialGradient.h" 9 #include "SkTwoPointRadialGradient.h"
10 10
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 SkShader::TileMode tm; 535 SkShader::TileMode tm;
536 int colorCount = RandomGradientParams(random, colors, &stops, &tm); 536 int colorCount = RandomGradientParams(random, colors, &stops, &tm);
537 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateTwoPointRadial(center1 , radius1, 537 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateTwoPointRadial(center1 , radius1,
538 center2 , radius2, 538 center2 , radius2,
539 colors, stops, colorCount, 539 colors, stops, colorCount,
540 tm)); 540 tm));
541 SkPaint paint; 541 SkPaint paint;
542 GrFragmentProcessor* fp; 542 GrFragmentProcessor* fp;
543 GrColor paintColor; 543 GrColor paintColor;
544 SkAssertResult(shader->asFragmentProcessor(context, paint, 544 SkAssertResult(shader->asFragmentProcessor(context, paint,
545 GrProcessorUnitTest::TestMatrix(r andom), NULL, 545 GrTest::TestMatrix(random), NULL,
546 &paintColor, &fp)); 546 &paintColor, &fp));
547 return fp; 547 return fp;
548 } 548 }
549 549
550 ///////////////////////////////////////////////////////////////////// 550 /////////////////////////////////////////////////////////////////////
551 551
552 GrGLRadial2Gradient::GrGLRadial2Gradient(const GrProcessor& processor) 552 GrGLRadial2Gradient::GrGLRadial2Gradient(const GrProcessor& processor)
553 : fVSVaryingName(NULL) 553 : fVSVaryingName(NULL)
554 , fFSVaryingName(NULL) 554 , fFSVaryingName(NULL)
555 , fCachedCenter(SK_ScalarMax) 555 , fCachedCenter(SK_ScalarMax)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 #else 715 #else
716 716
717 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c onst SkMatrix&, 717 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c onst SkMatrix&,
718 const SkMatrix*, 718 const SkMatrix*,
719 GrColor*, GrFragmentProcessor **) const { 719 GrColor*, GrFragmentProcessor **) const {
720 SkDEBUGFAIL("Should not call in GPU-less build"); 720 SkDEBUGFAIL("Should not call in GPU-less build");
721 return false; 721 return false;
722 } 722 }
723 723
724 #endif 724 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698