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

Side by Side Diff: gm/reveal.cpp

Issue 2344963002: Fix color bug in SkRRectsGaussianEdgeShader (Closed)
Patch Set: Fix Created 4 years, 3 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 | « no previous file | include/effects/SkRRectsGaussianEdgeShader.h » ('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 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "gm.h" 8 #include "gm.h"
9 #include "SkAnimTimer.h" 9 #include "SkAnimTimer.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 SkASSERT(kRRectsGaussianEdge_Mode == fMode); 374 SkASSERT(kRRectsGaussianEdge_Mode == fMode);
375 375
376 SkRect cover = drawObj->bounds(); 376 SkRect cover = drawObj->bounds();
377 SkAssertResult(cover.intersect(clipObj->bounds())); 377 SkAssertResult(cover.intersect(clipObj->bounds()));
378 378
379 SkPaint paint; 379 SkPaint paint;
380 380
381 SkRRect clipRR, drawnRR; 381 SkRRect clipRR, drawnRR;
382 382
383 if (clipObj->asRRect(&clipRR) && drawObj->asRRect(&drawnRR)) { 383 if (clipObj->asRRect(&clipRR) && drawObj->asRRect(&drawnRR)) {
384 paint.setShader(SkRRectsGaussianEdgeShader::Make(clipRR, drawnRR, 384 paint.setShader(SkRRectsGaussianEdgeShader::Make(clipRR, drawnRR, kPad));
jvanverth1 2016/09/15 19:52:09 Can this be named something other than kPad? It's
robertphillips 2016/09/15 19:53:20 Done.
robertphillips 2016/09/15 19:53:20 Done.
385 kPad, 0 .0f));
386 } 385 }
387 386
388 canvas->drawRect(cover, paint); 387 canvas->drawRect(cover, paint);
389 } 388 }
390 389
391 // Draw the clip and draw objects for reference 390 // Draw the clip and draw objects for reference
392 SkPaint strokePaint; 391 SkPaint strokePaint;
393 strokePaint.setStyle(SkPaint::kStroke_Style); 392 strokePaint.setStyle(SkPaint::kStroke_Style);
394 strokePaint.setStrokeWidth(0); 393 strokePaint.setStrokeWidth(0);
395 strokePaint.setColor(SK_ColorRED); 394 strokePaint.setColor(SK_ColorRED);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 Mode fMode; 426 Mode fMode;
428 bool fPause; 427 bool fPause;
429 428
430 typedef GM INHERITED; 429 typedef GM INHERITED;
431 }; 430 };
432 431
433 ////////////////////////////////////////////////////////////////////////////// 432 //////////////////////////////////////////////////////////////////////////////
434 433
435 DEF_GM(return new RevealGM;) 434 DEF_GM(return new RevealGM;)
436 } 435 }
OLDNEW
« no previous file with comments | « no previous file | include/effects/SkRRectsGaussianEdgeShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698