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

Side by Side Diff: bench/ColorFilterBench.cpp

Issue 1852123002: Update SkXfermodeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Overload Make methods 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 | « no previous file | gm/imagefiltersgraph.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorFilterImageFilter.h" 10 #include "SkColorFilterImageFilter.h"
(...skipping 27 matching lines...) Expand all
38 38
39 static sk_sp<SkImageFilter> make_mode_blue(sk_sp<SkImageFilter> input) { 39 static sk_sp<SkImageFilter> make_mode_blue(sk_sp<SkImageFilter> input) {
40 sk_sp<SkColorFilter> filter(SkColorFilter::MakeModeFilter(SK_ColorBLUE, 40 sk_sp<SkColorFilter> filter(SkColorFilter::MakeModeFilter(SK_ColorBLUE,
41 SkXfermode::kSrcIn _Mode)); 41 SkXfermode::kSrcIn _Mode));
42 return SkColorFilterImageFilter::Make(std::move(filter), std::move(input)); 42 return SkColorFilterImageFilter::Make(std::move(filter), std::move(input));
43 } 43 }
44 44
45 class ColorFilterBaseBench : public Benchmark { 45 class ColorFilterBaseBench : public Benchmark {
46 46
47 public: 47 public:
48 ColorFilterBaseBench(bool small) : fIsSmall(small) {} 48 ColorFilterBaseBench(bool small) : fIsSmall(small) { }
49 49
50 protected: 50 protected:
51 SkRect getFilterRect() const { 51 SkRect getFilterRect() const {
52 return this->isSmall() ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGH T_SMALL) : 52 return this->isSmall() ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGH T_SMALL) :
53 SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGH T_LARGE); 53 SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGH T_LARGE);
54 } 54 }
55 55
56 inline bool isSmall() const { return fIsSmall; } 56 inline bool isSmall() const { return fIsSmall; }
57 57
58 private: 58 private:
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 DEF_BENCH( return new ColorFilterGrayBench(true); ) 273 DEF_BENCH( return new ColorFilterGrayBench(true); )
274 274
275 DEF_BENCH( return new ColorFilterDimBrightBench(false); ) 275 DEF_BENCH( return new ColorFilterDimBrightBench(false); )
276 DEF_BENCH( return new ColorFilterBrightGrayBench(false); ) 276 DEF_BENCH( return new ColorFilterBrightGrayBench(false); )
277 DEF_BENCH( return new ColorFilterGrayBrightBench(false); ) 277 DEF_BENCH( return new ColorFilterGrayBrightBench(false); )
278 DEF_BENCH( return new ColorFilterBlueBrightBench(false); ) 278 DEF_BENCH( return new ColorFilterBlueBrightBench(false); )
279 DEF_BENCH( return new ColorFilterBrightBlueBench(false); ) 279 DEF_BENCH( return new ColorFilterBrightBlueBench(false); )
280 DEF_BENCH( return new ColorFilterBrightBench(false); ) 280 DEF_BENCH( return new ColorFilterBrightBench(false); )
281 DEF_BENCH( return new ColorFilterBlueBench(false); ) 281 DEF_BENCH( return new ColorFilterBlueBench(false); )
282 DEF_BENCH( return new ColorFilterGrayBench(false); ) 282 DEF_BENCH( return new ColorFilterGrayBench(false); )
OLDNEW
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698