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

Side by Side Diff: src/gpu/effects/GrRRectEffect.cpp

Issue 197823002: Fix unit tests (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrRRectEffect.h" 8 #include "GrRRectEffect.h"
9 9
10 #include "gl/GrGLEffect.h" 10 #include "gl/GrGLEffect.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 const GrDrawTargetCaps& caps, 448 const GrDrawTargetCaps& caps,
449 GrTexture*[]) { 449 GrTexture*[]) {
450 SkScalar w = random->nextRangeScalar(20.f, 1000.f); 450 SkScalar w = random->nextRangeScalar(20.f, 1000.f);
451 SkScalar h = random->nextRangeScalar(20.f, 1000.f); 451 SkScalar h = random->nextRangeScalar(20.f, 1000.f);
452 SkScalar rx = random->nextRangeF(kRadiusMin, 9.f); 452 SkScalar rx = random->nextRangeF(kRadiusMin, 9.f);
453 SkScalar ry = random->nextRangeF(kRadiusMin, 9.f); 453 SkScalar ry = random->nextRangeF(kRadiusMin, 9.f);
454 SkRRect rrect; 454 SkRRect rrect;
455 rrect.setRectXY(SkRect::MakeWH(w, h), rx, ry); 455 rrect.setRectXY(SkRect::MakeWH(w, h), rx, ry);
456 GrEffectRef* effect; 456 GrEffectRef* effect;
457 do { 457 do {
458 GrEffectEdgeType et = (GrEffectEdgeType)random->nextULessThan(kGrEffectE dgeTypeCnt); 458 GrEffectEdgeType et = random->nextBool() ? kFillAA_GrEffectEdgeType :
459 kInverseFillAA_GrEffectEdgeTy pe;
459 effect = EllipticalRRectEffect::Create(et, rrect); 460 effect = EllipticalRRectEffect::Create(et, rrect);
460 } while (NULL == effect); 461 } while (NULL == effect);
461 return effect; 462 return effect;
462 } 463 }
463 464
464 ////////////////////////////////////////////////////////////////////////////// 465 //////////////////////////////////////////////////////////////////////////////
465 466
466 class GLEllipticalRRectEffect : public GrGLEffect { 467 class GLEllipticalRRectEffect : public GrGLEffect {
467 public: 468 public:
468 GLEllipticalRRectEffect(const GrBackendEffectFactory&, const GrDrawEffect&); 469 GLEllipticalRRectEffect(const GrBackendEffectFactory&, const GrDrawEffect&);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 case CircularRRectEffect::kAll_CornerFlags: 629 case CircularRRectEffect::kAll_CornerFlags:
629 break; 630 break;
630 default: 631 default:
631 return NULL; 632 return NULL;
632 } 633 }
633 } else { 634 } else {
634 return NULL; 635 return NULL;
635 } 636 }
636 return CircularRRectEffect::Create(edgeType, cornerFlags, rrect); 637 return CircularRRectEffect::Create(edgeType, cornerFlags, rrect);
637 } 638 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698