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

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

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 | « gyp/core.gypi ('k') | src/core/SkBitmapFilter.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 2013 Google Inc. 2 * Copyright 2013 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 #ifndef SkBitmapFilter_DEFINED 8 #ifndef SkBitmapFilter_DEFINED
9 #define SkBitmapFilter_DEFINED 9 #define SkBitmapFilter_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 for (int index = 0; index < count; index++) { 58 for (int index = 0; index < count; index++) {
59 float filterValue = evaluate(val); 59 float filterValue = evaluate(val);
60 *output++ = filterValue; 60 *output++ = filterValue;
61 sum += filterValue; 61 sum += filterValue;
62 val += diff; 62 val += diff;
63 } 63 }
64 return sum; 64 return sum;
65 } 65 }
66 #endif 66 #endif
67 67
68 static SkBitmapFilter* Allocate();
69
70 protected: 68 protected:
71 float fWidth; 69 float fWidth;
72 float fInvWidth; 70 float fInvWidth;
73 float fLookupMultiplier; 71 float fLookupMultiplier;
74 72
75 mutable bool fPrecomputed; 73 mutable bool fPrecomputed;
76 mutable SkFixed fFilterTable[SKBITMAP_FILTER_TABLE_SIZE]; 74 mutable SkFixed fFilterTable[SKBITMAP_FILTER_TABLE_SIZE];
77 mutable SkScalar fFilterTableScalar[SKBITMAP_FILTER_TABLE_SIZE]; 75 mutable SkScalar fFilterTableScalar[SKBITMAP_FILTER_TABLE_SIZE];
78 76
79 private: 77 private:
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return 1.0f; // Special case the discontinuity at the origin. 243 return 1.0f; // Special case the discontinuity at the origin.
246 } 244 }
247 float xpi = x * static_cast<float>(SK_ScalarPI); 245 float xpi = x * static_cast<float>(SK_ScalarPI);
248 return (sk_float_sin(xpi) / xpi) * // sinc(x) 246 return (sk_float_sin(xpi) / xpi) * // sinc(x)
249 sk_float_sin(xpi / fWidth) / (xpi / fWidth); // sinc(x/fWidth) 247 sk_float_sin(xpi / fWidth) / (xpi / fWidth); // sinc(x/fWidth)
250 } 248 }
251 }; 249 };
252 250
253 251
254 #endif 252 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkBitmapFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698