OLD | NEW |
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 "SkBitmapFilter_opts_SSE2.h" | 8 #include "SkBitmapFilter_opts_SSE2.h" |
9 #include "SkBitmapProcState_opts_SSE2.h" | 9 #include "SkBitmapProcState_opts_SSE2.h" |
10 #include "SkBitmapProcState_opts_SSSE3.h" | 10 #include "SkBitmapProcState_opts_SSSE3.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } else | 245 } else |
246 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | 246 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { |
247 return platform_32_procs_SSE2[flags]; | 247 return platform_32_procs_SSE2[flags]; |
248 } else { | 248 } else { |
249 return NULL; | 249 return NULL; |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 //////////////////////////////////////////////////////////////////////////////// | 253 //////////////////////////////////////////////////////////////////////////////// |
254 | 254 |
255 SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkColorType dstCT, | |
256 SkMask::Format maskFormat, | |
257 SkColor color) { | |
258 if (SkMask::kA8_Format != maskFormat) { | |
259 return NULL; | |
260 } | |
261 | |
262 ColorProc proc = NULL; | |
263 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | |
264 switch (dstCT) { | |
265 case kN32_SkColorType: | |
266 // The SSE2 version is not (yet) faster for black, so we check | |
267 // for that. | |
268 if (SK_ColorBLACK != color) { | |
269 proc = SkARGB32_A8_BlitMask_SSE2; | |
270 } | |
271 break; | |
272 default: | |
273 break; | |
274 } | |
275 } | |
276 return proc; | |
277 } | |
278 | |
279 SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { | 255 SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { |
280 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | 256 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { |
281 if (isOpaque) { | 257 if (isOpaque) { |
282 return SkBlitLCD16OpaqueRow_SSE2; | 258 return SkBlitLCD16OpaqueRow_SSE2; |
283 } else { | 259 } else { |
284 return SkBlitLCD16Row_SSE2; | 260 return SkBlitLCD16Row_SSE2; |
285 } | 261 } |
286 } else { | 262 } else { |
287 return NULL; | 263 return NULL; |
288 } | 264 } |
289 | 265 |
290 } | 266 } |
291 | 267 |
292 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro
wFlags) { | 268 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro
wFlags) { |
293 return NULL; | 269 return NULL; |
294 } | 270 } |
OLD | NEW |