sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
tfarina | f168b86 | 2014-06-19 12:32:29 -0700 | [diff] [blame] | 7 | #include "Benchmark.h" |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 8 | #include "SkCanvas.h" |
| 9 | #include "SkColorFilterImageFilter.h" |
| 10 | #include "SkColorMatrixFilter.h" |
commit-bot@chromium.org | 6c1ee2d | 2013-10-07 18:00:17 +0000 | [diff] [blame] | 11 | #include "SkLumaColorFilter.h" |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 12 | #include "SkTableColorFilter.h" |
| 13 | |
| 14 | #define FILTER_WIDTH_SMALL SkIntToScalar(32) |
| 15 | #define FILTER_HEIGHT_SMALL SkIntToScalar(32) |
| 16 | #define FILTER_WIDTH_LARGE SkIntToScalar(256) |
| 17 | #define FILTER_HEIGHT_LARGE SkIntToScalar(256) |
| 18 | |
tfarina | f168b86 | 2014-06-19 12:32:29 -0700 | [diff] [blame] | 19 | class ColorFilterBaseBench : public Benchmark { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 20 | |
| 21 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 22 | ColorFilterBaseBench(bool small) : fIsSmall(small) { } |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 23 | |
| 24 | protected: |
| 25 | SkRect getFilterRect() const { |
| 26 | return isSmall() ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGHT_SMALL) : |
| 27 | SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGHT_LARGE); |
| 28 | } |
| 29 | |
| 30 | static SkImageFilter* make_brightness(float amount, SkImageFilter* input = NULL) { |
commit-bot@chromium.org | 4b413c8 | 2013-11-25 19:44:07 +0000 | [diff] [blame] | 31 | SkScalar amount255 = SkScalarMul(amount, SkIntToScalar(255)); |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 32 | SkScalar matrix[20] = { 1, 0, 0, 0, amount255, |
| 33 | 0, 1, 0, 0, amount255, |
| 34 | 0, 0, 1, 0, amount255, |
| 35 | 0, 0, 0, 1, 0 }; |
commit-bot@chromium.org | 727a352 | 2014-02-21 18:46:30 +0000 | [diff] [blame] | 36 | SkAutoTUnref<SkColorFilter> filter(SkColorMatrixFilter::Create(matrix)); |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 37 | return SkColorFilterImageFilter::Create(filter, input); |
| 38 | } |
| 39 | |
| 40 | static SkImageFilter* make_grayscale(SkImageFilter* input = NULL) { |
| 41 | SkScalar matrix[20]; |
| 42 | memset(matrix, 0, 20 * sizeof(SkScalar)); |
commit-bot@chromium.org | 4b413c8 | 2013-11-25 19:44:07 +0000 | [diff] [blame] | 43 | matrix[0] = matrix[5] = matrix[10] = 0.2126f; |
| 44 | matrix[1] = matrix[6] = matrix[11] = 0.7152f; |
| 45 | matrix[2] = matrix[7] = matrix[12] = 0.0722f; |
| 46 | matrix[18] = 1.0f; |
commit-bot@chromium.org | 727a352 | 2014-02-21 18:46:30 +0000 | [diff] [blame] | 47 | SkAutoTUnref<SkColorFilter> filter(SkColorMatrixFilter::Create(matrix)); |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 48 | return SkColorFilterImageFilter::Create(filter, input); |
| 49 | } |
| 50 | |
| 51 | static SkImageFilter* make_mode_blue(SkImageFilter* input = NULL) { |
| 52 | SkAutoTUnref<SkColorFilter> filter( |
| 53 | SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode)); |
| 54 | return SkColorFilterImageFilter::Create(filter, input); |
| 55 | } |
| 56 | |
| 57 | inline bool isSmall() const { return fIsSmall; } |
| 58 | private: |
| 59 | bool fIsSmall; |
| 60 | |
tfarina | f168b86 | 2014-06-19 12:32:29 -0700 | [diff] [blame] | 61 | typedef Benchmark INHERITED; |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | class ColorFilterDimBrightBench : public ColorFilterBaseBench { |
| 65 | |
| 66 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 67 | ColorFilterDimBrightBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | protected: |
| 71 | virtual const char* onGetName() SK_OVERRIDE { |
| 72 | return isSmall() ? "colorfilter_dim_bright_small" : "colorfilter_dim_bright_large"; |
| 73 | } |
| 74 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 75 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 76 | SkRect r = getFilterRect(); |
| 77 | SkPaint paint; |
| 78 | paint.setColor(SK_ColorRED); |
mtklein@google.com | c289743 | 2013-09-10 19:23:38 +0000 | [diff] [blame] | 79 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 80 | for (int i = 0; i < loops; i++) { |
mtklein@google.com | c289743 | 2013-09-10 19:23:38 +0000 | [diff] [blame] | 81 | for (float brightness = -1.0f; brightness <= 1.0f; brightness += 0.4f) { |
| 82 | SkAutoTUnref<SkImageFilter> dim(make_brightness(-brightness)); |
| 83 | SkAutoTUnref<SkImageFilter> bright(make_brightness(brightness, dim)); |
| 84 | paint.setImageFilter(bright); |
| 85 | canvas->drawRect(r, paint); |
| 86 | } |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 87 | } |
| 88 | } |
| 89 | |
| 90 | private: |
| 91 | typedef ColorFilterBaseBench INHERITED; |
| 92 | }; |
| 93 | |
| 94 | class ColorFilterBrightGrayBench : public ColorFilterBaseBench { |
| 95 | |
| 96 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 97 | ColorFilterBrightGrayBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | protected: |
| 101 | virtual const char* onGetName() SK_OVERRIDE { |
| 102 | return isSmall() ? "colorfilter_bright_gray_small" : "colorfilter_bright_gray_large"; |
| 103 | } |
| 104 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 105 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 106 | SkRect r = getFilterRect(); |
| 107 | SkPaint paint; |
| 108 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 109 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 110 | SkAutoTUnref<SkImageFilter> brightness(make_brightness(0.9f)); |
| 111 | SkAutoTUnref<SkImageFilter> grayscale(make_grayscale(brightness)); |
| 112 | paint.setImageFilter(grayscale); |
| 113 | canvas->drawRect(r, paint); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | private: |
| 118 | typedef ColorFilterBaseBench INHERITED; |
| 119 | }; |
| 120 | |
| 121 | class ColorFilterGrayBrightBench : public ColorFilterBaseBench { |
| 122 | |
| 123 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 124 | ColorFilterGrayBrightBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 125 | } |
| 126 | |
| 127 | protected: |
| 128 | virtual const char* onGetName() SK_OVERRIDE { |
| 129 | return isSmall() ? "colorfilter_gray_bright_small" : "colorfilter_gray_bright_large"; |
| 130 | } |
| 131 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 132 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 133 | SkRect r = getFilterRect(); |
| 134 | SkPaint paint; |
| 135 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 136 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 137 | SkAutoTUnref<SkImageFilter> grayscale(make_grayscale()); |
| 138 | SkAutoTUnref<SkImageFilter> brightness(make_brightness(0.9f, grayscale)); |
| 139 | paint.setImageFilter(brightness); |
| 140 | canvas->drawRect(r, paint); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | private: |
| 145 | typedef ColorFilterBaseBench INHERITED; |
| 146 | }; |
| 147 | |
| 148 | class ColorFilterBlueBrightBench : public ColorFilterBaseBench { |
| 149 | |
| 150 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 151 | ColorFilterBlueBrightBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | protected: |
| 155 | virtual const char* onGetName() SK_OVERRIDE { |
| 156 | return isSmall() ? "colorfilter_blue_bright_small" : "colorfilter_blue_bright_large"; |
| 157 | } |
| 158 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 159 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 160 | SkRect r = getFilterRect(); |
| 161 | SkPaint paint; |
| 162 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 163 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 164 | SkAutoTUnref<SkImageFilter> blue(make_mode_blue()); |
| 165 | SkAutoTUnref<SkImageFilter> brightness(make_brightness(1.0f, blue)); |
| 166 | paint.setImageFilter(brightness); |
| 167 | canvas->drawRect(r, paint); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | private: |
| 172 | typedef ColorFilterBaseBench INHERITED; |
| 173 | }; |
| 174 | |
| 175 | class ColorFilterBrightBlueBench : public ColorFilterBaseBench { |
| 176 | |
| 177 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 178 | ColorFilterBrightBlueBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 179 | } |
| 180 | |
| 181 | protected: |
| 182 | virtual const char* onGetName() SK_OVERRIDE { |
| 183 | return isSmall() ? "colorfilter_bright_blue_small" : "colorfilter_bright_blue_large"; |
| 184 | } |
| 185 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 186 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 187 | SkRect r = getFilterRect(); |
| 188 | SkPaint paint; |
| 189 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 190 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 191 | SkAutoTUnref<SkImageFilter> brightness(make_brightness(1.0f)); |
| 192 | SkAutoTUnref<SkImageFilter> blue(make_mode_blue(brightness)); |
| 193 | paint.setImageFilter(blue); |
| 194 | canvas->drawRect(r, paint); |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | private: |
| 199 | typedef ColorFilterBaseBench INHERITED; |
| 200 | }; |
| 201 | |
| 202 | class ColorFilterBrightBench : public ColorFilterBaseBench { |
| 203 | |
| 204 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 205 | ColorFilterBrightBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | protected: |
| 209 | virtual const char* onGetName() SK_OVERRIDE { |
| 210 | return isSmall() ? "colorfilter_bright_small" : "colorfilter_bright_large"; |
| 211 | } |
| 212 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 213 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 214 | SkRect r = getFilterRect(); |
| 215 | SkPaint paint; |
| 216 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 217 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 218 | SkAutoTUnref<SkImageFilter> brightness(make_brightness(1.0f)); |
| 219 | paint.setImageFilter(brightness); |
| 220 | canvas->drawRect(r, paint); |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | private: |
| 225 | typedef ColorFilterBaseBench INHERITED; |
| 226 | }; |
| 227 | |
| 228 | class ColorFilterBlueBench : public ColorFilterBaseBench { |
| 229 | |
| 230 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 231 | ColorFilterBlueBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 232 | } |
| 233 | |
| 234 | protected: |
| 235 | virtual const char* onGetName() SK_OVERRIDE { |
| 236 | return isSmall() ? "colorfilter_blue_small" : "colorfilter_blue_large"; |
| 237 | } |
| 238 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 239 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 240 | SkRect r = getFilterRect(); |
| 241 | SkPaint paint; |
| 242 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 243 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 244 | SkAutoTUnref<SkImageFilter> blue(make_mode_blue()); |
| 245 | paint.setImageFilter(blue); |
| 246 | canvas->drawRect(r, paint); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | private: |
| 251 | typedef ColorFilterBaseBench INHERITED; |
| 252 | }; |
| 253 | |
| 254 | class ColorFilterGrayBench : public ColorFilterBaseBench { |
| 255 | |
| 256 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 257 | ColorFilterGrayBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 258 | } |
| 259 | |
| 260 | protected: |
| 261 | virtual const char* onGetName() SK_OVERRIDE { |
| 262 | return isSmall() ? "colorfilter_gray_small" : "colorfilter_gray_large"; |
| 263 | } |
| 264 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 265 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 266 | SkRect r = getFilterRect(); |
| 267 | SkPaint paint; |
| 268 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 269 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 270 | SkAutoTUnref<SkImageFilter> grayscale(make_grayscale()); |
| 271 | paint.setImageFilter(grayscale); |
| 272 | canvas->drawRect(r, paint); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | private: |
| 277 | typedef ColorFilterBaseBench INHERITED; |
| 278 | }; |
| 279 | |
| 280 | class TableColorFilterBench : public ColorFilterBaseBench { |
| 281 | |
| 282 | public: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 283 | TableColorFilterBench(bool small) : INHERITED(small) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | protected: |
| 287 | virtual const char* onGetName() SK_OVERRIDE { |
| 288 | return isSmall() ? "table_colorfilter_small" : "table_colorfilter_large"; |
| 289 | } |
| 290 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 291 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 292 | SkRect r = getFilterRect(); |
| 293 | SkPaint paint; |
| 294 | paint.setColor(SK_ColorRED); |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 295 | for (int i = 0; i < loops; i++) { |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 296 | SkAutoTUnref<SkColorFilter> table_filter(make_table_filter()); |
| 297 | paint.setColorFilter(table_filter); |
| 298 | canvas->drawRect(r, paint); |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | private: |
| 303 | static void fill_table_data(uint8_t table[]) { |
| 304 | for (int i = 0; i < 256; ++i) { |
| 305 | int n = i >> 5; |
| 306 | table[i] = (n << 5) | (n << 2) | (n >> 1); |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | static SkColorFilter* make_table_filter() { |
| 311 | uint8_t table[256]; fill_table_data(table); |
| 312 | return SkTableColorFilter::Create(table); |
| 313 | } |
| 314 | |
| 315 | typedef ColorFilterBaseBench INHERITED; |
| 316 | }; |
| 317 | |
commit-bot@chromium.org | 6c1ee2d | 2013-10-07 18:00:17 +0000 | [diff] [blame] | 318 | class LumaColorFilterBench : public ColorFilterBaseBench { |
| 319 | |
| 320 | public: |
| 321 | LumaColorFilterBench(bool small) : INHERITED(small) { |
| 322 | } |
| 323 | |
| 324 | protected: |
| 325 | virtual const char* onGetName() SK_OVERRIDE { |
| 326 | return isSmall() ? "luma_colorfilter_small" : "luma_colorfilter_large"; |
| 327 | } |
| 328 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 329 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
commit-bot@chromium.org | 6c1ee2d | 2013-10-07 18:00:17 +0000 | [diff] [blame] | 330 | SkRect r = getFilterRect(); |
| 331 | SkPaint paint; |
| 332 | paint.setColor(SK_ColorRED); |
| 333 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 334 | for (int i = 0; i < loops; i++) { |
commit-bot@chromium.org | 6c1ee2d | 2013-10-07 18:00:17 +0000 | [diff] [blame] | 335 | SkAutoTUnref<SkColorFilter> luma_filter(SkLumaColorFilter::Create()); |
| 336 | paint.setColorFilter(luma_filter); |
| 337 | canvas->drawRect(r, paint); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | private: |
| 342 | typedef ColorFilterBaseBench INHERITED; |
| 343 | }; |
| 344 | |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 345 | /////////////////////////////////////////////////////////////////////////////// |
| 346 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 347 | DEF_BENCH( return new ColorFilterDimBrightBench(true); ) |
| 348 | DEF_BENCH( return new ColorFilterBrightGrayBench(true); ) |
| 349 | DEF_BENCH( return new ColorFilterGrayBrightBench(true); ) |
| 350 | DEF_BENCH( return new ColorFilterBlueBrightBench(true); ) |
| 351 | DEF_BENCH( return new ColorFilterBrightBlueBench(true); ) |
| 352 | DEF_BENCH( return new ColorFilterBrightBench(true); ) |
| 353 | DEF_BENCH( return new ColorFilterBlueBench(true); ) |
| 354 | DEF_BENCH( return new ColorFilterGrayBench(true); ) |
| 355 | DEF_BENCH( return new TableColorFilterBench(true); ) |
commit-bot@chromium.org | 6c1ee2d | 2013-10-07 18:00:17 +0000 | [diff] [blame] | 356 | DEF_BENCH( return new LumaColorFilterBench(true); ) |
sugoi@google.com | 580a172 | 2013-04-23 14:20:45 +0000 | [diff] [blame] | 357 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 358 | DEF_BENCH( return new ColorFilterDimBrightBench(false); ) |
| 359 | DEF_BENCH( return new ColorFilterBrightGrayBench(false); ) |
| 360 | DEF_BENCH( return new ColorFilterGrayBrightBench(false); ) |
| 361 | DEF_BENCH( return new ColorFilterBlueBrightBench(false); ) |
| 362 | DEF_BENCH( return new ColorFilterBrightBlueBench(false); ) |
| 363 | DEF_BENCH( return new ColorFilterBrightBench(false); ) |
| 364 | DEF_BENCH( return new ColorFilterBlueBench(false); ) |
| 365 | DEF_BENCH( return new ColorFilterGrayBench(false); ) |
| 366 | DEF_BENCH( return new TableColorFilterBench(false); ) |
commit-bot@chromium.org | 6c1ee2d | 2013-10-07 18:00:17 +0000 | [diff] [blame] | 367 | DEF_BENCH( return new LumaColorFilterBench(false); ) |