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

Side by Side Diff: src/opts/opts_check_SSE2.cpp

Issue 61643011: SSE2 implementation of RGBA box blurs. This yields ~2X perf improvement on (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixes from review comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/opts/SkBlurImage_opts_none.cpp ('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 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
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 #include "SkBitmapProcState_opts_SSE2.h" 8 #include "SkBitmapProcState_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSSE3.h" 9 #include "SkBitmapProcState_opts_SSSE3.h"
10 #include "SkBitmapFilter_opts_SSE2.h" 10 #include "SkBitmapFilter_opts_SSE2.h"
11 #include "SkBlitMask.h" 11 #include "SkBlitMask.h"
12 #include "SkBlitRow.h" 12 #include "SkBlitRow.h"
13 #include "SkBlitRect_opts_SSE2.h" 13 #include "SkBlitRect_opts_SSE2.h"
14 #include "SkBlitRow_opts_SSE2.h" 14 #include "SkBlitRow_opts_SSE2.h"
15 #include "SkBlurImage_opts_SSE2.h"
15 #include "SkUtils_opts_SSE2.h" 16 #include "SkUtils_opts_SSE2.h"
16 #include "SkUtils.h" 17 #include "SkUtils.h"
17 #include "SkMorphology_opts.h" 18 #include "SkMorphology_opts.h"
18 #include "SkMorphology_opts_SSE2.h" 19 #include "SkMorphology_opts_SSE2.h"
19 20
20 #include "SkRTConf.h" 21 #include "SkRTConf.h"
21 22
22 #if defined(_MSC_VER) && defined(_WIN64) 23 #if defined(_MSC_VER) && defined(_WIN64)
23 #include <intrin.h> 24 #include <intrin.h>
24 #endif 25 #endif
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return SkDilateY_SSE2; 262 return SkDilateY_SSE2;
262 case kErodeX_SkMorphologyProcType: 263 case kErodeX_SkMorphologyProcType:
263 return SkErodeX_SSE2; 264 return SkErodeX_SSE2;
264 case kErodeY_SkMorphologyProcType: 265 case kErodeY_SkMorphologyProcType:
265 return SkErodeY_SSE2; 266 return SkErodeY_SSE2;
266 default: 267 default:
267 return NULL; 268 return NULL;
268 } 269 }
269 } 270 }
270 271
272 bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX,
273 SkBoxBlurProc* boxBlurY,
274 SkBoxBlurProc* boxBlurXY) {
275 #ifdef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION
276 return false;
277 #else
278 if (!cachedHasSSE2()) {
279 return false;
280 }
281 return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurY, boxBlurXY);
282 #endif
283 }
284
271 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning 285 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning
272 286
273 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { 287 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() {
274 if (cachedHasSSE2()) { 288 if (cachedHasSSE2()) {
275 return ColorRect32_SSE2; 289 return ColorRect32_SSE2;
276 } else { 290 } else {
277 return NULL; 291 return NULL;
278 } 292 }
279 } 293 }
OLDNEW
« no previous file with comments | « src/opts/SkBlurImage_opts_none.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698