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

Side by Side Diff: bench/RectoriBench.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/BlurRoundRectBench.cpp ('k') | gm/bigblurs.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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // TODO: add a color filter to better match what is seen in the wild 80 // TODO: add a color filter to better match what is seen in the wild
81 info.fPaintBits = /* SkLayerDrawLooper::kColorFilter_Bit |*/ 81 info.fPaintBits = /* SkLayerDrawLooper::kColorFilter_Bit |*/
82 SkLayerDrawLooper::kMaskFilter_Bit; 82 SkLayerDrawLooper::kMaskFilter_Bit;
83 info.fColorMode = SkXfermode::kDst_Mode; 83 info.fColorMode = SkXfermode::kDst_Mode;
84 info.fOffset.set(xOff, 0); 84 info.fOffset.set(xOff, 0);
85 info.fPostTranslate = false; 85 info.fPostTranslate = false;
86 86
87 SkPaint* paint = looperBuilder.addLayer(info); 87 SkPaint* paint = looperBuilder.addLayer(info);
88 88
89 SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 89 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma,
90 sigma, 90 SkBlurMaskFilter::kHighQuali ty_BlurFlag));
91 SkBlurMaskFilter::kHighQuali ty_BlurFlag);
92 paint->setMaskFilter(mf)->unref();
93 91
94 //----------------------------------------------- 92 //-----------------------------------------------
95 info.fPaintBits = 0; 93 info.fPaintBits = 0;
96 info.fOffset.set(0, 0); 94 info.fOffset.set(0, 0);
97 95
98 paint = looperBuilder.addLayer(info); 96 paint = looperBuilder.addLayer(info);
99 return looperBuilder.detach(); 97 return looperBuilder.detach();
100 } 98 }
101 99
102 typedef Benchmark INHERITED; 100 typedef Benchmark INHERITED;
103 }; 101 };
104 102
105 DEF_BENCH(return new RectoriBench();) 103 DEF_BENCH(return new RectoriBench();)
OLDNEW
« no previous file with comments | « bench/BlurRoundRectBench.cpp ('k') | gm/bigblurs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698