diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 21:11:55 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 21:11:55 +0000 |
commit | fa30cf0307ba48b538cd5e2561b7fd8419a54ff0 (patch) | |
tree | 5688d218c29526134b41b308fd2c21d328dc1ba8 /skia | |
parent | 98240004f86542ad638b7fc452b80efeecfbf29c (diff) | |
download | chromium_src-fa30cf0307ba48b538cd5e2561b7fd8419a54ff0.zip chromium_src-fa30cf0307ba48b538cd5e2561b7fd8419a54ff0.tar.gz chromium_src-fa30cf0307ba48b538cd5e2561b7fd8419a54ff0.tar.bz2 |
Roll DEPS for Skia 424:428, and enable Skia SSE2 optimizations for Linux and Mac. Due to unfortunate limitations in gcc and gyp, this required creating a new static library target, skia_sse2 (see skia.gyp for the gory details). I did a search-and-replace in all .gyp files in the tree, but if there are other projects outside this tree which refer to skia.gyp, they will have to be modified as well.
This also required rolling DEPS for O3D Skia 376:428, since O3D uses chrome's skia.gyp file. Since this update brings ~25M of HTML docs, I pared the DEPS file down to just src/ and include/ (as we do in Chrome). I built O3D on 32bit Linux to test; hopefully other platforms will be ok.
BUG=none
TEST=green bots
Review URL: http://codereview.chromium.org/402016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/skia.gyp | 58 |
1 files changed, 50 insertions, 8 deletions
diff --git a/skia/skia.gyp b/skia/skia.gyp index 4caa5dc..17237e3 100644 --- a/skia/skia.gyp +++ b/skia/skia.gyp @@ -349,8 +349,7 @@ '../third_party/skia/src/images/SkScaledBitmapSampler.cpp', '../third_party/skia/src/images/SkScaledBitmapSampler.h', - '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', - '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', + '../third_party/skia/src/opts/opts_check_SSE2.cpp', #'../third_party/skia/src/ports/SkFontHost_FONTPATH.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', @@ -587,12 +586,12 @@ '-mthumb', ], 'sources!': [ - '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', - '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', + '../third_party/skia/src/opts/opts_check_SSE2.cpp' ], 'sources': [ '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', '../third_party/skia/src/opts/SkBlitRow_opts_arm.cpp', + '../third_party/skia/src/opts/SkUtils_opts_none.cpp', ], }], [ 'OS == "linux" or OS == "freebsd"', { @@ -642,16 +641,15 @@ '../third_party/skia/src/core/SkMMapStream.cpp', '../third_party/skia/src/ports/SkThread_pthread.cpp', '../third_party/skia/src/ports/SkTime_Unix.cc', - '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', - ], - 'sources': [ - '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp', ], 'include_dirs': [ 'config/win', ], },], ], + 'dependencies': [ + 'skia_sse2' + ], 'direct_dependent_settings': { 'include_dirs': [ 'config', @@ -664,6 +662,50 @@ ], }, }, + + # Due to an unfortunate intersection of lameness between gcc and gyp, + # we have to build the *_SSE2.cpp files in a separate target. The + # gcc lameness is that, in order to compile SSE2 intrinsics code, it + # must be passed the -msse2 flag. However, with this flag, it may + # emit SSE2 instructions even for scalar code, such as the CPUID + # test used to test for the presence of SSE2. So that, and all other + # code must be compiled *without* -msse2. The gyp lameness is that it + # does not allow file-specific CFLAGS, so we must create this extra + # target for those files to be compiled with -msse2. + # + # This is actually only a problem on 32-bit Linux (all Intel Macs have + # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit + # SSE2 from instrinsics, which generating plain ol' 386 for everything + # else). However, to keep the .gyp file simple and avoid platform-specific + # build breakage, we do this on all platforms. + + { + 'target_name': 'skia_sse2', + 'type': '<(library)', + 'include_dirs': [ + '..', + 'config', + '../third_party/skia/include/core', + '../third_party/skia/include/effects', + '../third_party/skia/include/images', + '../third_party/skia/include/utils', + '../third_party/skia/src/core', + ], + 'conditions': [ + [ 'OS == "linux" and target_arch != "arm"', { + 'cflags': [ + '-msse2', + ], + }], + [ 'target_arch != "arm"', { + 'sources': [ + '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', + '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp', + '../third_party/skia/src/opts/SkUtils_opts_SSE2.cpp', + ], + }], + ], + }, ], } |