From e6ea606fb92cd611b965806cb005f87495b261f2 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 7 Jul 2011 19:12:50 +0000 Subject: re-enable SSE2 blitmask procs, only excluding if we're black (in which case the protable version is still faster) git-svn-id: http://skia.googlecode.com/svn/trunk@1819 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/opts/opts_check_SSE2.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/opts') diff --git a/src/opts/opts_check_SSE2.cpp b/src/opts/opts_check_SSE2.cpp index 749117a1a2..09d99e9e7a 100644 --- a/src/opts/opts_check_SSE2.cpp +++ b/src/opts/opts_check_SSE2.cpp @@ -107,17 +107,16 @@ SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) { SkBlitMask::Proc SkBlitMask::PlatformProcs(SkBitmap::Config dstConfig, - SkColor color) -{ - + SkColor color) { SkBlitMask::Proc proc = NULL; if (hasSSE2()) { switch (dstConfig) { case SkBitmap::kARGB_8888_Config: - // TODO: is our current SSE2 faster than the portable, even in - // the case of black or opaque? If so, no need for this check. - if ( SK_ColorBLACK != color && 0xFF != SkColorGetA(color)) + // The SSE2 version is not (yet) faster for black, so we check + // for that. + if (SK_ColorBLACK != color) { proc = SkARGB32_BlitMask_SSE2; + } break; default: break; -- cgit v1.2.3