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

Unified Diff: gm/bicubicfilter.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 | « experimental/webtry/templates/template.cpp ('k') | gyp/bench.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bicubicfilter.cpp
diff --git a/gm/bicubicfilter.cpp b/gm/bicubicfilter.cpp
deleted file mode 100644
index 0f33b6f8713c3ab207b798a3ab44565bdd94bbbb..0000000000000000000000000000000000000000
--- a/gm/bicubicfilter.cpp
+++ /dev/null
@@ -1,86 +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 "gm.h"
-#include "SkColor.h"
-#include "SkBicubicImageFilter.h"
-
-namespace skiagm {
-
-class BicubicGM : public GM {
-public:
- BicubicGM() : fInitialized(false) {
- this->setBGColor(0x00000000);
- }
-
-protected:
- virtual uint32_t onGetFlags() const SK_OVERRIDE {
- return kSkipTiled_Flag;
- }
-
- virtual SkString onShortName() {
- return SkString("bicubicfilter");
- }
-
- void make_checkerboard(int width, int height) {
- SkASSERT(width % 2 == 0);
- SkASSERT(height % 2 == 0);
- fCheckerboard.allocN32Pixels(width, height);
- for (int y = 0; y < height; y += 2) {
- SkPMColor* s = fCheckerboard.getAddr32(0, y);
- for (int x = 0; x < width; x += 2) {
- *s++ = 0xFFFFFFFF;
- *s++ = 0xFF000000;
- }
- s = fCheckerboard.getAddr32(0, y + 1);
- for (int x = 0; x < width; x += 2) {
- *s++ = 0xFF000000;
- *s++ = 0xFFFFFFFF;
- }
- }
- }
-
- virtual SkISize onISize() {
- return SkISize::Make(400, 300);
- }
-
- virtual void onDraw(SkCanvas* canvas) {
- if (!fInitialized) {
- make_checkerboard(4, 4);
- fInitialized = true;
- }
- SkScalar sk32 = SkIntToScalar(32);
- canvas->clear(0x00000000);
- SkPaint bilinearPaint, bicubicPaint;
- SkSize scale = SkSize::Make(sk32, sk32);
- canvas->save();
- canvas->scale(sk32, sk32);
- bilinearPaint.setFilterLevel(SkPaint::kLow_FilterLevel);
- canvas->drawBitmap(fCheckerboard, 0, 0, &bilinearPaint);
- canvas->restore();
- SkAutoTUnref<SkImageFilter> bicubic(SkBicubicImageFilter::CreateMitchell(scale));
- bicubicPaint.setImageFilter(bicubic);
- SkRect srcBounds;
- fCheckerboard.getBounds(&srcBounds);
- canvas->translate(SkIntToScalar(140), 0);
- canvas->saveLayer(&srcBounds, &bicubicPaint);
- canvas->drawBitmap(fCheckerboard, 0, 0);
- canvas->restore();
- }
-
-private:
- typedef GM INHERITED;
- SkBitmap fCheckerboard;
- bool fInitialized;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-static GM* MyFactory(void*) { return new BicubicGM; }
-static GMRegistry reg(MyFactory);
-
-}
« no previous file with comments | « experimental/webtry/templates/template.cpp ('k') | gyp/bench.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698