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

Side by Side Diff: bench/BitmapBench.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « bench/Benchmark.cpp ('k') | bench/BitmapRectBench.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 void setupPaint(SkPaint* paint) SK_OVERRIDE { 250 void setupPaint(SkPaint* paint) SK_OVERRIDE {
251 this->INHERITED::setupPaint(paint); 251 this->INHERITED::setupPaint(paint);
252 252
253 int index = 0; 253 int index = 0;
254 if (fFlags & kBilerp_Flag) { 254 if (fFlags & kBilerp_Flag) {
255 index |= 1; 255 index |= 1;
256 } 256 }
257 if (fFlags & kBicubic_Flag) { 257 if (fFlags & kBicubic_Flag) {
258 index |= 2; 258 index |= 2;
259 } 259 }
260 static const SkPaint::FilterLevel gLevels[] = { 260 static const SkFilterQuality gQualitys[] = {
261 SkPaint::kNone_FilterLevel, 261 kNone_SkFilterQuality,
262 SkPaint::kLow_FilterLevel, 262 kLow_SkFilterQuality,
263 SkPaint::kMedium_FilterLevel, 263 kMedium_SkFilterQuality,
264 SkPaint::kHigh_FilterLevel 264 kHigh_SkFilterQuality
265 }; 265 };
266 paint->setFilterLevel(gLevels[index]); 266 paint->setFilterQuality(gQualitys[index]);
267 } 267 }
268 268
269 private: 269 private:
270 typedef BitmapBench INHERITED; 270 typedef BitmapBench INHERITED;
271 }; 271 };
272 272
273 /** Verify optimizations that test source alpha values. */ 273 /** Verify optimizations that test source alpha values. */
274 274
275 class SourceAlphaBitmapBench : public BitmapBench { 275 class SourceAlphaBitmapBench : public BitmapBench {
276 public: 276 public:
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, t rue, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); ) 381 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, t rue, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); )
382 382
383 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); ) 383 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); )
384 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); ) 384 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); )
385 385
386 // source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon} 386 // source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon}
387 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_Sou rceAlpha, kN32_SkColorType); ) 387 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_Sou rceAlpha, kN32_SkColorType); )
388 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTransparen t_SourceAlpha, kN32_SkColorType); ) 388 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTransparen t_SourceAlpha, kN32_SkColorType); )
389 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTwoStripes _SourceAlpha, kN32_SkColorType); ) 389 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTwoStripes _SourceAlpha, kN32_SkColorType); )
390 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kThreeStrip es_SourceAlpha, kN32_SkColorType); ) 390 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kThreeStrip es_SourceAlpha, kN32_SkColorType); )
OLDNEW
« no previous file with comments | « bench/Benchmark.cpp ('k') | bench/BitmapRectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698