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

Side by Side Diff: gm/occludedrrectblur.cpp

Issue 2201133002: Implement GPU occluded blur mask filter (Closed) Base URL: https://skia.googlesource.com/skia.git@occluded-blur
Patch Set: update to ToT Created 4 years, 4 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 | « bench/BlurOccludedRRectBench.cpp ('k') | include/core/SkMaskFilter.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 "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkRRect.h" 10 #include "SkRRect.h"
(...skipping 28 matching lines...) Expand all
39 strokeColor = SK_ColorYELLOW; 39 strokeColor = SK_ColorYELLOW;
40 occRect = occRect2; 40 occRect = occRect2;
41 } else { 41 } else {
42 strokeColor = SK_ColorCYAN; 42 strokeColor = SK_ColorCYAN;
43 occRect = occRect3; 43 occRect = occRect3;
44 } 44 }
45 } 45 }
46 46
47 // draw the blur 47 // draw the blur
48 SkPaint paint; 48 SkPaint paint;
49 paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, kBlurSigma)) ; //, occRect)); 49 paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, kBlurSigma, occRect));
50 canvas->drawRRect(rr, paint); 50 canvas->drawRRect(rr, paint);
51 51
52 // draw the stroked geometry of the full occluder 52 // draw the stroked geometry of the full occluder
53 SkPaint stroke; 53 SkPaint stroke;
54 stroke.setStyle(SkPaint::kStroke_Style); 54 stroke.setStyle(SkPaint::kStroke_Style);
55 stroke.setColor(SK_ColorBLUE); 55 stroke.setColor(SK_ColorBLUE);
56 canvas->drawRRect(occRR, stroke); 56 canvas->drawRRect(occRR, stroke);
57 57
58 // draw the geometry of the occluding rect 58 // draw the geometry of the occluding rect
59 stroke.setColor(strokeColor); 59 stroke.setColor(strokeColor);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 static const int kWidth = 440; 313 static const int kWidth = 440;
314 static const int kHeight = 440; 314 static const int kHeight = 440;
315 315
316 typedef GM INHERITED; 316 typedef GM INHERITED;
317 }; 317 };
318 318
319 ////////////////////////////////////////////////////////////////////////////// 319 //////////////////////////////////////////////////////////////////////////////
320 320
321 DEF_GM(return new OccludedRRectBlurGM;) 321 DEF_GM(return new OccludedRRectBlurGM;)
322 } 322 }
OLDNEW
« no previous file with comments | « bench/BlurOccludedRRectBench.cpp ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698