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

Unified Diff: bench/BicubicBench.cpp

Issue 357793002: Remove SkBicubicImageFilter, and all related tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove all expected results for now-deleted GM Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | expectations/gm/Test-Android-GalaxyNexus-SGX540-Arm7-Debug/expected-results.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BicubicBench.cpp
diff --git a/bench/BicubicBench.cpp b/bench/BicubicBench.cpp
deleted file mode 100644
index 9d03dd15740049dd2d5d0b9dd6b7b74f67fdce75..0000000000000000000000000000000000000000
--- a/bench/BicubicBench.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "Benchmark.h"
-#include "SkBicubicImageFilter.h"
-#include "SkCanvas.h"
-#include "SkShader.h"
-#include "SkString.h"
-
-// This bench exercises SkBicubicImageFilter, upsampling a 40x40 input to
-// 100x100, 400x100, 100x400, and 400x400.
-
-class BicubicBench : public Benchmark {
- SkSize fScale;
- SkString fName;
-
-public:
- BicubicBench(float x, float y)
- : fScale(SkSize::Make(x, y)) {
- fName.printf("bicubic_%gx%g",
- SkScalarToFloat(fScale.fWidth), SkScalarToFloat(fScale.fHeight));
- }
-
-protected:
- virtual const char* onGetName() {
- return fName.c_str();
- }
-
- virtual void onDraw(const int loops, SkCanvas* canvas) {
- SkPaint paint;
- this->setupPaint(&paint);
-
- paint.setAntiAlias(true);
-
- SkRect r = SkRect::MakeWH(40, 40);
- SkAutoTUnref<SkImageFilter> bicubic(SkBicubicImageFilter::CreateMitchell(fScale));
- paint.setImageFilter(bicubic);
-
- for (int i = 0; i < loops; i++) {
- canvas->save();
- canvas->clipRect(r);
- canvas->drawOval(r, paint);
- canvas->restore();
- }
- }
-
-private:
- typedef Benchmark INHERITED;
-};
-
-DEF_BENCH( return new BicubicBench(10.0f, 10.0f); )
-DEF_BENCH( return new BicubicBench(2.5f, 10.0f); )
-DEF_BENCH( return new BicubicBench(10.0f, 2.5f); )
-DEF_BENCH( return new BicubicBench(2.5f, 2.5f); )
« no previous file with comments | « no previous file | expectations/gm/Test-Android-GalaxyNexus-SGX540-Arm7-Debug/expected-results.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698