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

Side by Side Diff: src/opts/SkBlurImageFilter_opts.h

Issue 1419573011: move reinterpret_cast into SK_PREFETCH (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « include/core/SkPostConfig.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
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 SkBlurImageFilter_opts_DEFINED 8 #ifndef SkBlurImageFilter_opts_DEFINED
9 #define SkBlurImageFilter_opts_DEFINED 9 #define SkBlurImageFilter_opts_DEFINED
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (x >= leftOffset) { 202 if (x >= leftOffset) {
203 SkColor l = *(sptr - leftOffset * srcStrideX); 203 SkColor l = *(sptr - leftOffset * srcStrideX);
204 DECREMENT_SUMS(l); 204 DECREMENT_SUMS(l);
205 } 205 }
206 if (x + rightOffset + 1 < width) { 206 if (x + rightOffset + 1 < width) {
207 SkColor r = *(sptr + (rightOffset + 1) * srcStrideX); 207 SkColor r = *(sptr + (rightOffset + 1) * srcStrideX);
208 INCREMENT_SUMS(r); 208 INCREMENT_SUMS(r);
209 } 209 }
210 sptr += srcStrideX; 210 sptr += srcStrideX;
211 if (srcDirection == BlurDirection::kY) { 211 if (srcDirection == BlurDirection::kY) {
212 SK_PREFETCH(reinterpret_cast<const char*>(sptr + (rightOffset + 1) * srcStrideX)); 212 SK_PREFETCH(sptr + (rightOffset + 1) * srcStrideX);
213 } 213 }
214 dptr += dstStrideX; 214 dptr += dstStrideX;
215 } 215 }
216 src += srcStrideY; 216 src += srcStrideY;
217 dst += dstStrideY; 217 dst += dstStrideY;
218 } 218 }
219 } 219 }
220 220
221 static auto box_blur_xx = &box_blur<BlurDirection::kX, BlurDirection::kX>, 221 static auto box_blur_xx = &box_blur<BlurDirection::kX, BlurDirection::kX>,
222 box_blur_xy = &box_blur<BlurDirection::kX, BlurDirection::kY>, 222 box_blur_xy = &box_blur<BlurDirection::kX, BlurDirection::kY>,
223 box_blur_yx = &box_blur<BlurDirection::kY, BlurDirection::kX>; 223 box_blur_yx = &box_blur<BlurDirection::kY, BlurDirection::kX>;
224 224
225 } // namespace SK_OPTS_NS 225 } // namespace SK_OPTS_NS
226 226
227 #endif 227 #endif
OLDNEW
« no previous file with comments | « include/core/SkPostConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698