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

Side by Side Diff: gm/blurroundrect.cpp

Issue 1821103004: Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « gm/blurredclippedcircle.cpp ('k') | gm/color4f.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 | SkLayerDrawLooper::kColorFilter_Bit; 53 | SkLayerDrawLooper::kColorFilter_Bit;
54 info.fColorMode = SkXfermode::kSrc_Mode; 54 info.fColorMode = SkXfermode::kSrc_Mode;
55 info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0)); 55 info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0));
56 info.fPostTranslate = false; 56 info.fPostTranslate = false;
57 SkPaint* paint = looperBuilder.addLayerOnTop(info); 57 SkPaint* paint = looperBuilder.addLayerOnTop(info);
58 SkMaskFilter* maskFilter = SkBlurMaskFilter::Create( 58 SkMaskFilter* maskFilter = SkBlurMaskFilter::Create(
59 kNormal_SkBlurStyle, 59 kNormal_SkBlurStyle,
60 SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf), 60 SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf),
61 SkBlurMaskFilter::kHighQuality_BlurFlag); 61 SkBlurMaskFilter::kHighQuality_BlurFlag);
62 paint->setMaskFilter(maskFilter)->unref(); 62 paint->setMaskFilter(maskFilter)->unref();
63 paint->setColorFilter(SkColorFilter::MakeModeFilter( 63 SkColorFilter* colorFilter = SkColorFilter::CreateModeFilter(
64 sk_tool_utils::color_to_565(SK_ColorLTGRAY), 64 sk_tool_utils::color_to_565(SK_ColorLTGRAY),
65 SkXfermode::kSrcIn_Mode)); 65 SkXfermode::kSrcIn_Mode);
66 paint->setColorFilter(colorFilter)->unref();
66 paint->setColor(sk_tool_utils::color_to_565(SK_ColorGRAY)); 67 paint->setColor(sk_tool_utils::color_to_565(SK_ColorGRAY));
67 } 68 }
68 { 69 {
69 SkLayerDrawLooper::LayerInfo info; 70 SkLayerDrawLooper::LayerInfo info;
70 looperBuilder.addLayerOnTop(info); 71 looperBuilder.addLayerOnTop(info);
71 } 72 }
72 SkPaint paint; 73 SkPaint paint;
73 canvas->drawRect(fRRect.rect(), paint); 74 canvas->drawRect(fRRect.rect(), paint);
74 75
75 paint.setLooper(looperBuilder.detach()); 76 paint.setLooper(looperBuilder.detach());
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // TODO(scroggo): Disabled in an attempt to rememdy 176 // TODO(scroggo): Disabled in an attempt to rememdy
176 // https://code.google.com/p/skia/issues/detail?id=1801 ('Win7 Test bots all fai ling GenerateGMs: 177 // https://code.google.com/p/skia/issues/detail?id=1801 ('Win7 Test bots all fai ling GenerateGMs:
177 // ran wrong number of tests') 178 // ran wrong number of tests')
178 //DEF_GM(return new BlurRoundRectGM(600, 5514, 6);) 179 //DEF_GM(return new BlurRoundRectGM(600, 5514, 6);)
179 180
180 // Rounded rect with two opposite corners with large radii, the other two 181 // Rounded rect with two opposite corners with large radii, the other two
181 // small. 182 // small.
182 DEF_GM(return new BlurRoundRectGM(100, 100);) 183 DEF_GM(return new BlurRoundRectGM(100, 100);)
183 184
184 DEF_GM(return new SimpleBlurRoundRectGM();) 185 DEF_GM(return new SimpleBlurRoundRectGM();)
OLDNEW
« no previous file with comments | « gm/blurredclippedcircle.cpp ('k') | gm/color4f.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698