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

Side by Side Diff: src/core/SkBitmapFilter.cpp

Issue 1589683004: remove unused SkBitmapFilter::Allocate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « src/core/SkBitmapFilter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 */
7
8 #include "SkBitmapFilter.h"
9 #include "SkRTConf.h"
10 #include "SkTypes.h"
11
12 #include <string.h>
13
14 // These are the per-scanline callbacks that are used when we must resort to
15 // resampling an image as it is blitted. Typically these are used only when
16 // the image is rotated or has some other complex transformation applied.
17 // Scaled images will usually be rescaled directly before rasterization.
18
19 SK_CONF_DECLARE(const char *, c_bitmapFilter, "bitmap.filter", "mitchell", "Whic h scanline bitmap filter to use [mitchell, lanczos, hamming, gaussian, triangle, box]");
20
21 SkBitmapFilter *SkBitmapFilter::Allocate() {
22 if (!strcmp(c_bitmapFilter, "mitchell")) {
23 return new SkMitchellFilter;
24 } else if (!strcmp(c_bitmapFilter, "lanczos")) {
25 return new SkLanczosFilter;
26 } else if (!strcmp(c_bitmapFilter, "hamming")) {
27 return new SkHammingFilter;
28 } else if (!strcmp(c_bitmapFilter, "gaussian")) {
29 return new SkGaussianFilter(2);
30 } else if (!strcmp(c_bitmapFilter, "triangle")) {
31 return new SkTriangleFilter;
32 } else if (!strcmp(c_bitmapFilter, "box")) {
33 return new SkBoxFilter;
34 } else {
35 SkDEBUGFAIL("Unknown filter type");
36 }
37
38 return nullptr;
39 }
40
OLDNEW
« no previous file with comments | « src/core/SkBitmapFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698