senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2009 The Android Open Source Project |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
senorblanco@chromium.org | dc7de74 | 2009-11-30 20:00:29 +0000 | [diff] [blame] | 8 | #include "SkBitmapProcState_opts_SSE2.h" |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 9 | #include "SkBitmapProcState_opts_SSSE3.h" |
humper@google.com | b088947 | 2013-07-09 21:37:14 +0000 | [diff] [blame] | 10 | #include "SkBitmapFilter_opts_SSE2.h" |
reed@google.com | 58af9a6 | 2011-10-12 13:43:52 +0000 | [diff] [blame] | 11 | #include "SkBlitMask.h" |
tomhudson@google.com | 8dd90a9 | 2012-03-19 13:49:50 +0000 | [diff] [blame] | 12 | #include "SkBlitRow.h" |
| 13 | #include "SkBlitRect_opts_SSE2.h" |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 14 | #include "SkBlitRow_opts_SSE2.h" |
senorblanco@chromium.org | 27eec46 | 2013-11-08 20:49:04 +0000 | [diff] [blame] | 15 | #include "SkBlurImage_opts_SSE2.h" |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 16 | #include "SkUtils_opts_SSE2.h" |
| 17 | #include "SkUtils.h" |
senorblanco@chromium.org | 7a47ad3 | 2013-10-30 21:57:04 +0000 | [diff] [blame] | 18 | #include "SkMorphology_opts.h" |
| 19 | #include "SkMorphology_opts_SSE2.h" |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 20 | |
humper@google.com | b088947 | 2013-07-09 21:37:14 +0000 | [diff] [blame] | 21 | #include "SkRTConf.h" |
| 22 | |
tomhudson@google.com | ea85494 | 2012-05-17 15:09:17 +0000 | [diff] [blame] | 23 | #if defined(_MSC_VER) && defined(_WIN64) |
| 24 | #include <intrin.h> |
| 25 | #endif |
| 26 | |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 27 | /* 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 |
| 29 | instruction on Pentium3 on the code below). Only files named *_SSE2.cpp |
| 30 | in this directory should be compiled with -msse2. */ |
| 31 | |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 32 | |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 33 | #ifdef _MSC_VER |
| 34 | static inline void getcpuid(int info_type, int info[4]) { |
tomhudson@google.com | ea85494 | 2012-05-17 15:09:17 +0000 | [diff] [blame] | 35 | #if defined(_WIN64) |
| 36 | __cpuid(info, info_type); |
| 37 | #else |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 38 | __asm { |
| 39 | mov eax, [info_type] |
| 40 | cpuid |
| 41 | mov edi, [info] |
| 42 | mov [edi], eax |
| 43 | mov [edi+4], ebx |
| 44 | mov [edi+8], ecx |
| 45 | mov [edi+12], edx |
| 46 | } |
tomhudson@google.com | ea85494 | 2012-05-17 15:09:17 +0000 | [diff] [blame] | 47 | #endif |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 48 | } |
| 49 | #else |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 50 | #if defined(__x86_64__) |
| 51 | static inline void getcpuid(int info_type, int info[4]) { |
| 52 | asm volatile ( |
| 53 | "cpuid \n\t" |
| 54 | : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) |
| 55 | : "a"(info_type) |
| 56 | ); |
| 57 | } |
| 58 | #else |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 59 | static inline void getcpuid(int info_type, int info[4]) { |
| 60 | // We save and restore ebx, so this code can be compatible with -fPIC |
| 61 | asm volatile ( |
| 62 | "pushl %%ebx \n\t" |
| 63 | "cpuid \n\t" |
| 64 | "movl %%ebx, %1 \n\t" |
| 65 | "popl %%ebx \n\t" |
| 66 | : "=a"(info[0]), "=r"(info[1]), "=c"(info[2]), "=d"(info[3]) |
| 67 | : "a"(info_type) |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 68 | ); |
| 69 | } |
| 70 | #endif |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 71 | #endif |
| 72 | |
reed@google.com | 70d1be5 | 2012-07-16 16:07:42 +0000 | [diff] [blame] | 73 | #if defined(__x86_64__) || defined(_WIN64) || SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
| 74 | /* All x86_64 machines have SSE2, or we know it's supported at compile time, so don't even bother checking. */ |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 75 | static inline bool hasSSE2() { |
| 76 | return true; |
| 77 | } |
| 78 | #else |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 79 | |
| 80 | static inline bool hasSSE2() { |
| 81 | int cpu_info[4] = { 0 }; |
| 82 | getcpuid(1, cpu_info); |
| 83 | return (cpu_info[3] & (1<<26)) != 0; |
| 84 | } |
| 85 | #endif |
| 86 | |
reed@google.com | 70d1be5 | 2012-07-16 16:07:42 +0000 | [diff] [blame] | 87 | #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 |
| 88 | /* If we know SSSE3 is supported at compile time, don't even bother checking. */ |
| 89 | static inline bool hasSSSE3() { |
| 90 | return true; |
| 91 | } |
| 92 | #else |
| 93 | |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 94 | static inline bool hasSSSE3() { |
| 95 | int cpu_info[4] = { 0 }; |
| 96 | getcpuid(1, cpu_info); |
| 97 | return (cpu_info[2] & 0x200) != 0; |
| 98 | } |
reed@google.com | 70d1be5 | 2012-07-16 16:07:42 +0000 | [diff] [blame] | 99 | #endif |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 100 | |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 101 | static bool cachedHasSSE2() { |
| 102 | static bool gHasSSE2 = hasSSE2(); |
| 103 | return gHasSSE2; |
| 104 | } |
| 105 | |
tomhudson@google.com | 95ad155 | 2012-02-14 18:28:54 +0000 | [diff] [blame] | 106 | static bool cachedHasSSSE3() { |
| 107 | static bool gHasSSSE3 = hasSSSE3(); |
| 108 | return gHasSSSE3; |
| 109 | } |
| 110 | |
humper@google.com | b088947 | 2013-07-09 21:37:14 +0000 | [diff] [blame] | 111 | SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", false, "Use SSE optimized version of high quality image filters"); |
| 112 | |
reed@google.com | fed04b3 | 2013-09-05 20:31:17 +0000 | [diff] [blame] | 113 | void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) { |
humper@google.com | 138ebc3 | 2013-07-19 20:20:04 +0000 | [diff] [blame] | 114 | if (cachedHasSSE2()) { |
reed@google.com | fed04b3 | 2013-09-05 20:31:17 +0000 | [diff] [blame] | 115 | procs->fExtraHorizontalReads = 3; |
| 116 | procs->fConvolveVertically = &convolveVertically_SSE2; |
| 117 | procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2; |
| 118 | procs->fConvolveHorizontally = &convolveHorizontally_SSE2; |
| 119 | procs->fApplySIMDPadding = &applySIMDPadding_SSE2; |
humper@google.com | 138ebc3 | 2013-07-19 20:20:04 +0000 | [diff] [blame] | 120 | } |
| 121 | } |
| 122 | |
senorblanco@chromium.org | dc7de74 | 2009-11-30 20:00:29 +0000 | [diff] [blame] | 123 | void SkBitmapProcState::platformProcs() { |
tomhudson@google.com | 06a7313 | 2012-02-22 18:30:43 +0000 | [diff] [blame] | 124 | if (cachedHasSSSE3()) { |
| 125 | if (fSampleProc32 == S32_opaque_D32_filter_DX) { |
| 126 | fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3; |
| 127 | } else if (fSampleProc32 == S32_alpha_D32_filter_DX) { |
| 128 | fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3; |
| 129 | } |
tomhudson@google.com | ae29b88 | 2012-03-06 14:59:04 +0000 | [diff] [blame] | 130 | |
| 131 | if (fSampleProc32 == S32_opaque_D32_filter_DXDY) { |
| 132 | fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3; |
| 133 | } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) { |
| 134 | fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3; |
| 135 | } |
tomhudson@google.com | 06a7313 | 2012-02-22 18:30:43 +0000 | [diff] [blame] | 136 | } else if (cachedHasSSE2()) { |
senorblanco@chromium.org | dc7de74 | 2009-11-30 20:00:29 +0000 | [diff] [blame] | 137 | if (fSampleProc32 == S32_opaque_D32_filter_DX) { |
| 138 | fSampleProc32 = S32_opaque_D32_filter_DX_SSE2; |
senorblanco@chromium.org | f3f0bd7 | 2009-12-10 22:46:31 +0000 | [diff] [blame] | 139 | } else if (fSampleProc32 == S32_alpha_D32_filter_DX) { |
| 140 | fSampleProc32 = S32_alpha_D32_filter_DX_SSE2; |
senorblanco@chromium.org | dc7de74 | 2009-11-30 20:00:29 +0000 | [diff] [blame] | 141 | } |
reed@google.com | 7866228 | 2012-07-24 13:53:23 +0000 | [diff] [blame] | 142 | |
| 143 | if (fSampleProc16 == S32_D16_filter_DX) { |
| 144 | fSampleProc16 = S32_D16_filter_DX_SSE2; |
| 145 | } |
senorblanco@chromium.org | dc7de74 | 2009-11-30 20:00:29 +0000 | [diff] [blame] | 146 | } |
tomhudson@google.com | 06a7313 | 2012-02-22 18:30:43 +0000 | [diff] [blame] | 147 | |
| 148 | if (cachedHasSSSE3() || cachedHasSSE2()) { |
| 149 | if (fMatrixProc == ClampX_ClampY_filter_scale) { |
| 150 | fMatrixProc = ClampX_ClampY_filter_scale_SSE2; |
| 151 | } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) { |
| 152 | fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2; |
| 153 | } |
tomhudson@google.com | 5efaf26 | 2012-02-28 15:41:49 +0000 | [diff] [blame] | 154 | |
| 155 | if (fMatrixProc == ClampX_ClampY_filter_affine) { |
| 156 | fMatrixProc = ClampX_ClampY_filter_affine_SSE2; |
| 157 | } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { |
| 158 | fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; |
| 159 | } |
humper@google.com | b088947 | 2013-07-09 21:37:14 +0000 | [diff] [blame] | 160 | if (c_hqfilter_sse) { |
mtklein@google.com | 0dc546c | 2013-08-26 16:21:35 +0000 | [diff] [blame] | 161 | if (fShaderProc32 == highQualityFilter32) { |
humper@google.com | b088947 | 2013-07-09 21:37:14 +0000 | [diff] [blame] | 162 | fShaderProc32 = highQualityFilter_SSE2; |
| 163 | } |
humper@google.com | b088947 | 2013-07-09 21:37:14 +0000 | [diff] [blame] | 164 | } |
tomhudson@google.com | 06a7313 | 2012-02-22 18:30:43 +0000 | [diff] [blame] | 165 | } |
senorblanco@chromium.org | dc7de74 | 2009-11-30 20:00:29 +0000 | [diff] [blame] | 166 | } |
| 167 | |
commit-bot@chromium.org | 4759107 | 2014-02-19 03:09:52 +0000 | [diff] [blame^] | 168 | static SkBlitRow::Proc platform_16_procs[] = { |
| 169 | NULL, // S32_D565_Opaque |
| 170 | NULL, // S32_D565_Blend |
| 171 | S32A_D565_Opaque_SSE2, // S32A_D565_Opaque |
| 172 | NULL, // S32A_D565_Blend |
| 173 | NULL, // S32_D565_Opaque_Dither |
| 174 | NULL, // S32_D565_Blend_Dither |
| 175 | NULL, // S32A_D565_Opaque_Dither |
| 176 | NULL, // S32A_D565_Blend_Dither |
| 177 | }; |
| 178 | |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 179 | static SkBlitRow::Proc32 platform_32_procs[] = { |
| 180 | NULL, // S32_Opaque, |
| 181 | S32_Blend_BlitRow32_SSE2, // S32_Blend, |
| 182 | S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque |
| 183 | S32A_Blend_BlitRow32_SSE2, // S32A_Blend, |
| 184 | }; |
| 185 | |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 186 | SkBlitRow::Proc SkBlitRow::PlatformProcs565(unsigned flags) { |
commit-bot@chromium.org | 4759107 | 2014-02-19 03:09:52 +0000 | [diff] [blame^] | 187 | if (cachedHasSSE2()) { |
| 188 | return platform_16_procs[flags]; |
| 189 | } else { |
| 190 | return NULL; |
| 191 | } |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 192 | } |
| 193 | |
senorblanco@chromium.org | c385638 | 2010-12-13 15:27:20 +0000 | [diff] [blame] | 194 | SkBlitRow::ColorProc SkBlitRow::PlatformColorProc() { |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 195 | if (cachedHasSSE2()) { |
senorblanco@chromium.org | c385638 | 2010-12-13 15:27:20 +0000 | [diff] [blame] | 196 | return Color32_SSE2; |
| 197 | } else { |
| 198 | return NULL; |
| 199 | } |
| 200 | } |
| 201 | |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 202 | SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) { |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 203 | if (cachedHasSSE2()) { |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 204 | return platform_32_procs[flags]; |
| 205 | } else { |
| 206 | return NULL; |
| 207 | } |
| 208 | } |
| 209 | |
reed@google.com | 981d479 | 2011-03-09 12:55:47 +0000 | [diff] [blame] | 210 | |
reed@google.com | e901b4c | 2011-11-14 21:56:45 +0000 | [diff] [blame] | 211 | SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkBitmap::Config dstConfig, |
| 212 | SkMask::Format maskFormat, |
| 213 | SkColor color) { |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 214 | if (SkMask::kA8_Format != maskFormat) { |
| 215 | return NULL; |
| 216 | } |
rmistry@google.com | fbfcd56 | 2012-08-23 18:09:54 +0000 | [diff] [blame] | 217 | |
reed@google.com | e901b4c | 2011-11-14 21:56:45 +0000 | [diff] [blame] | 218 | ColorProc proc = NULL; |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 219 | if (cachedHasSSE2()) { |
reed@google.com | 981d479 | 2011-03-09 12:55:47 +0000 | [diff] [blame] | 220 | switch (dstConfig) { |
| 221 | case SkBitmap::kARGB_8888_Config: |
reed@google.com | e6ea606 | 2011-07-07 19:12:50 +0000 | [diff] [blame] | 222 | // The SSE2 version is not (yet) faster for black, so we check |
| 223 | // for that. |
| 224 | if (SK_ColorBLACK != color) { |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 225 | proc = SkARGB32_A8_BlitMask_SSE2; |
reed@google.com | e6ea606 | 2011-07-07 19:12:50 +0000 | [diff] [blame] | 226 | } |
reed@google.com | 981d479 | 2011-03-09 12:55:47 +0000 | [diff] [blame] | 227 | break; |
| 228 | default: |
reed@google.com | e901b4c | 2011-11-14 21:56:45 +0000 | [diff] [blame] | 229 | break; |
reed@google.com | 981d479 | 2011-03-09 12:55:47 +0000 | [diff] [blame] | 230 | } |
| 231 | } |
| 232 | return proc; |
| 233 | } |
| 234 | |
tomhudson@google.com | d6770e6 | 2012-02-14 16:01:15 +0000 | [diff] [blame] | 235 | SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { |
| 236 | if (cachedHasSSE2()) { |
| 237 | if (isOpaque) { |
| 238 | return SkBlitLCD16OpaqueRow_SSE2; |
| 239 | } else { |
| 240 | return SkBlitLCD16Row_SSE2; |
| 241 | } |
| 242 | } else { |
| 243 | return NULL; |
| 244 | } |
| 245 | |
| 246 | } |
reed@google.com | e901b4c | 2011-11-14 21:56:45 +0000 | [diff] [blame] | 247 | SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkBitmap::Config dstConfig, |
reed@google.com | 1750bf1 | 2011-11-15 19:51:02 +0000 | [diff] [blame] | 248 | SkMask::Format maskFormat, |
| 249 | RowFlags flags) { |
reed@google.com | e901b4c | 2011-11-14 21:56:45 +0000 | [diff] [blame] | 250 | return NULL; |
| 251 | } |
| 252 | |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 253 | SkMemset16Proc SkMemset16GetPlatformProc() { |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 254 | if (cachedHasSSE2()) { |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 255 | return sk_memset16_SSE2; |
| 256 | } else { |
| 257 | return NULL; |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | SkMemset32Proc SkMemset32GetPlatformProc() { |
reed@google.com | edb606c | 2011-10-18 13:56:50 +0000 | [diff] [blame] | 262 | if (cachedHasSSE2()) { |
senorblanco@chromium.org | 4e75355 | 2009-11-16 21:09:00 +0000 | [diff] [blame] | 263 | return sk_memset32_SSE2; |
| 264 | } else { |
| 265 | return NULL; |
| 266 | } |
| 267 | } |
tomhudson@google.com | 8dd90a9 | 2012-03-19 13:49:50 +0000 | [diff] [blame] | 268 | |
senorblanco@chromium.org | 0ded88d | 2014-01-24 15:43:50 +0000 | [diff] [blame] | 269 | SkMorphologyImageFilter::Proc SkMorphologyGetPlatformProc(SkMorphologyProcType type) { |
senorblanco@chromium.org | 7a47ad3 | 2013-10-30 21:57:04 +0000 | [diff] [blame] | 270 | if (!cachedHasSSE2()) { |
| 271 | return NULL; |
| 272 | } |
| 273 | switch (type) { |
| 274 | case kDilateX_SkMorphologyProcType: |
| 275 | return SkDilateX_SSE2; |
| 276 | case kDilateY_SkMorphologyProcType: |
| 277 | return SkDilateY_SSE2; |
| 278 | case kErodeX_SkMorphologyProcType: |
| 279 | return SkErodeX_SSE2; |
| 280 | case kErodeY_SkMorphologyProcType: |
| 281 | return SkErodeY_SSE2; |
| 282 | default: |
| 283 | return NULL; |
| 284 | } |
| 285 | } |
| 286 | |
senorblanco@chromium.org | 27eec46 | 2013-11-08 20:49:04 +0000 | [diff] [blame] | 287 | bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX, |
| 288 | SkBoxBlurProc* boxBlurY, |
senorblanco@chromium.org | 05edd02 | 2013-11-11 20:12:34 +0000 | [diff] [blame] | 289 | SkBoxBlurProc* boxBlurXY, |
| 290 | SkBoxBlurProc* boxBlurYX) { |
senorblanco@chromium.org | 27eec46 | 2013-11-08 20:49:04 +0000 | [diff] [blame] | 291 | #ifdef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION |
| 292 | return false; |
| 293 | #else |
| 294 | if (!cachedHasSSE2()) { |
| 295 | return false; |
| 296 | } |
senorblanco@chromium.org | 05edd02 | 2013-11-11 20:12:34 +0000 | [diff] [blame] | 297 | return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX); |
senorblanco@chromium.org | 27eec46 | 2013-11-08 20:49:04 +0000 | [diff] [blame] | 298 | #endif |
| 299 | } |
| 300 | |
caryclark@google.com | 83ecdc3 | 2012-06-06 12:10:26 +0000 | [diff] [blame] | 301 | SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning |
| 302 | |
tomhudson@google.com | 8dd90a9 | 2012-03-19 13:49:50 +0000 | [diff] [blame] | 303 | SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { |
| 304 | if (cachedHasSSE2()) { |
| 305 | return ColorRect32_SSE2; |
| 306 | } else { |
| 307 | return NULL; |
| 308 | } |
| 309 | } |