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

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

Issue 1265033002: IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase (a file was deleted). Created 5 years, 4 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/SkBitmapDevice.cpp ('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
2 /* 1 /*
3 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10 #ifndef SkBitmapFilter_DEFINED 8 #ifndef SkBitmapFilter_DEFINED
11 #define SkBitmapFilter_DEFINED 9 #define SkBitmapFilter_DEFINED
12 10
11 #include "SkFixed.h"
13 #include "SkMath.h" 12 #include "SkMath.h"
13 #include "SkScalar.h"
14 14
15 // size of the precomputed bitmap filter tables for high quality filtering. 15 // size of the precomputed bitmap filter tables for high quality filtering.
16 // Used to precompute the shape of the filter kernel. 16 // Used to precompute the shape of the filter kernel.
17 // Table size chosen from experiments to see where I could start to see a differ ence. 17 // Table size chosen from experiments to see where I could start to see a differ ence.
18 18
19 #define SKBITMAP_FILTER_TABLE_SIZE 128 19 #define SKBITMAP_FILTER_TABLE_SIZE 128
20 20
21 class SkBitmapFilter { 21 class SkBitmapFilter {
22 public: 22 public:
23 SkBitmapFilter(float width) 23 SkBitmapFilter(float width)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return 1.0f; // Special case the discontinuity at the origin. 166 return 1.0f; // Special case the discontinuity at the origin.
167 } 167 }
168 float xpi = x * static_cast<float>(SK_ScalarPI); 168 float xpi = x * static_cast<float>(SK_ScalarPI);
169 return (sk_float_sin(xpi) / xpi) * // sinc(x) 169 return (sk_float_sin(xpi) / xpi) * // sinc(x)
170 sk_float_sin(xpi / fWidth) / (xpi / fWidth); // sinc(x/fWidth ) 170 sk_float_sin(xpi / fWidth) / (xpi / fWidth); // sinc(x/fWidth )
171 } 171 }
172 }; 172 };
173 173
174 174
175 #endif 175 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkBitmapFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698