| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |