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

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

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 "SkLinearGradient.h" 9 #include "SkLinearGradient.h"
10 10
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 506
507 typedef GrGradientEffect INHERITED; 507 typedef GrGradientEffect INHERITED;
508 }; 508 };
509 509
510 ///////////////////////////////////////////////////////////////////// 510 /////////////////////////////////////////////////////////////////////
511 511
512 GR_DEFINE_EFFECT_TEST(GrLinearGradient); 512 GR_DEFINE_EFFECT_TEST(GrLinearGradient);
513 513
514 GrEffectRef* GrLinearGradient::TestCreate(SkMWCRandom* random, 514 GrEffectRef* GrLinearGradient::TestCreate(SkMWCRandom* random,
515 GrContext* context, 515 GrContext* context,
516 const GrDrawTargetCaps&,
516 GrTexture**) { 517 GrTexture**) {
517 SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()}, 518 SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()},
518 {random->nextUScalar1(), random->nextUScalar1()}}; 519 {random->nextUScalar1(), random->nextUScalar1()}};
519 520
520 SkColor colors[kMaxRandomGradientColors]; 521 SkColor colors[kMaxRandomGradientColors];
521 SkScalar stopsArray[kMaxRandomGradientColors]; 522 SkScalar stopsArray[kMaxRandomGradientColors];
522 SkScalar* stops = stopsArray; 523 SkScalar* stops = stopsArray;
523 SkShader::TileMode tm; 524 SkShader::TileMode tm;
524 int colorCount = RandomGradientParams(random, colors, &stops, &tm); 525 int colorCount = RandomGradientParams(random, colors, &stops, &tm);
525 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateLinear(points, 526 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateLinear(points,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 str->append("SkLinearGradient ("); 573 str->append("SkLinearGradient (");
573 574
574 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 575 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
575 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 576 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
576 577
577 this->INHERITED::toString(str); 578 this->INHERITED::toString(str);
578 579
579 str->append(")"); 580 str->append(")");
580 } 581 }
581 #endif 582 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698