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

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

Issue 202903004: Xfermode: SSE2 implementation of multiply_modeproc (Closed) Base URL: https://skia.googlesource.com/skia.git@xfermode
Patch Set: add SkGetPacked(A/R/G/B)32_SSE2 function Created 6 years, 9 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
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 "SkBlurImage_opts_SSE2.h"
16 #include "SkUtils_opts_SSE2.h" 16 #include "SkUtils_opts_SSE2.h"
17 #include "SkUtils.h" 17 #include "SkUtils.h"
18 #include "SkMorphology_opts.h" 18 #include "SkMorphology_opts.h"
19 #include "SkMorphology_opts_SSE2.h" 19 #include "SkMorphology_opts_SSE2.h"
20 #include "SkXfermode.h"
21 #include "SkXfermode_proccoeff.h"
20 22
21 #include "SkRTConf.h" 23 #include "SkRTConf.h"
22 24
23 #if defined(_MSC_VER) && defined(_WIN64) 25 #if defined(_MSC_VER) && defined(_WIN64)
24 #include <intrin.h> 26 #include <intrin.h>
25 #endif 27 #endif
26 28
27 /* This file must *not* be compiled with -msse or -msse2, otherwise 29 /* This file must *not* be compiled with -msse or -msse2, otherwise
28 gcc may generate sse2 even for scalar ops (and thus give an invalid 30 gcc may generate sse2 even for scalar ops (and thus give an invalid
29 instruction on Pentium3 on the code below). Only files named *_SSE2.cpp 31 instruction on Pentium3 on the code below). Only files named *_SSE2.cpp
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 302
301 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning 303 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning
302 304
303 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { 305 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() {
304 if (cachedHasSSE2()) { 306 if (cachedHasSSE2()) {
305 return ColorRect32_SSE2; 307 return ColorRect32_SSE2;
306 } else { 308 } else {
307 return NULL; 309 return NULL;
308 } 310 }
309 } 311 }
312
313 extern SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec,
314 SkXfermode::Mode mode);
315 extern SkXfermodeProc SkPlatformXfermodeProcFactory_impl_SSE2(SkXfermode::Mode m ode);
316
317 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl(const ProcCoeff& rec,
318 SkXfermode::Mode mode) {
319 return NULL;
320 }
321
322 SkXfermodeProc SkPlatformXfermodeProcFactory_impl(SkXfermode::Mode mode) {
323 return NULL;
324 }
325
326 SkProcCoeffXfermode* SkPlatformXfermodeFactory(const ProcCoeff& rec,
327 SkXfermode::Mode mode) {
328 if (cachedHasSSE2()) {
329 return SkPlatformXfermodeFactory_impl_SSE2(rec, mode);
330 } else {
331 return SkPlatformXfermodeFactory_impl(rec, mode);
332 }
333 }
334
335 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) {
336 if (cachedHasSSE2()) {
337 return SkPlatformXfermodeProcFactory_impl_SSE2(mode);
338 } else {
339 return SkPlatformXfermodeProcFactory_impl(mode);
340 }
341 }
OLDNEW
« src/opts/SkXfermode_opts_SSE2.cpp ('K') | « src/opts/SkXfermode_opts_SSE2.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698