Xfermode: SSE2 implementation of colordodge&colorburn modes
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 25 Apr 2014 09:44:53 +0000 (09:44 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 25 Apr 2014 09:44:53 +0000 (09:44 +0000)
commite1ba93ee01aa7df27197189ab4d82a7d5387dc8a
tree7bd2594da86c8fcdd281358a601c8fcb6fa0f463
parent6419a5edb8af999623e018b09c3dd88ec371d2e6
Xfermode: SSE2 implementation of colordodge&colorburn modes

With SSE2 optimization, performance of the related benchmarks will improve
about 45% for Xfermode_ColorDodge and little for Xfermode_ColorBurn on
desktop i7-3770. The little performance improvement for
Xfermode_ColorBurn is due to the portable version may mostly go the fast
if branch while the SSE2 version do the calculation for all the three
if-else branches. Here are the data:
before:
Xfermode_ColorDodge   8888:  cmsecs =  73.71   565:  cmsecs =  82.88
 Xfermode_ColorBurn   8888:  cmsecs =  46.46   565:  cmsecs =  52.23
after:
Xfermode_ColorDodge   8888:  cmsecs =  39.70   565:  cmsecs =  47.45
 Xfermode_ColorBurn   8888:  cmsecs =  45.02   565:  cmsecs =  51.15

BUG=skia:
R=mtklein@google.com

Author: qiankun.miao@intel.com

Review URL: https://codereview.chromium.org/224823004

git-svn-id: http://skia.googlecode.com/svn/trunk@14377 2bbb7eff-a529-9590-31e7-b0007b416f81
src/opts/SkMath_opts_SSE2.h
src/opts/SkXfermode_opts_SSE2.cpp