diff options
author | 2016-06-01 07:08:56 -0700 | |
---|---|---|
committer | 2016-06-01 07:08:56 -0700 | |
commit | e3fa811657ecf4ab694d026752a81080c6b10611 (patch) | |
tree | 59836ffdb94ac987cd68fb6270e5e3d21cd56273 /tests/SkBlend_optsTest.cpp | |
parent | ba150cc283301a28693a18d4aa9d14b1a1616ab3 (diff) |
[GN] Add support for disabling opts via SK_BUILD_NO_OPTS define.
When targetting iOS and using gyp to generate the build files, it is not
possible to select files to build depending on the architecture. Due to
that, the skia code was disabling all optimisation when SK_BUILD_FOR_IOS
was defined.
Since it is possible to select the correct optimised version when using
gn, this pessimisation is hurting the build. Introduce a new define to
disable the optimisation SK_BUILD_NO_OPTS. It will be used by Chromium
when building skia for iOS with gyp but not gn.
Define SK_BUILD_NO_OPTS along-side SK_BUILD_FOR_IOS for all files that
look like build configuration (Xcode projects, gyp configuration files,
public.bzl) in order to avoid introducing breakage on those builds.
BUG=607933
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002423002
Review-Url: https://codereview.chromium.org/2002423002
Diffstat (limited to 'tests/SkBlend_optsTest.cpp')
-rw-r--r-- | tests/SkBlend_optsTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/SkBlend_optsTest.cpp b/tests/SkBlend_optsTest.cpp index 06b7c1ade2..9142f9d7a1 100644 --- a/tests/SkBlend_optsTest.cpp +++ b/tests/SkBlend_optsTest.cpp @@ -35,7 +35,7 @@ extern void srcover_srgb_srgb( uint32_t* dst, const uint32_t* const srcStart, int ndst, const int nsrc); } -#if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) +#if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS) namespace sk_sse41 { extern void srcover_srgb_srgb( uint32_t* dst, const uint32_t* const srcStart, int ndst, const int nsrc); @@ -104,7 +104,7 @@ DEF_TEST(SkBlend_optsCheck, reporter) { Spec{sk_default::best_non_simd_srcover_srgb_srgb, "best_non_simd"}, Spec{sk_default::srcover_srgb_srgb, "default"}, }; - #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) + #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS) if (SkCpu::Supports(SkCpu::SSE41)) { specs.push_back(Spec{sk_sse41::srcover_srgb_srgb, "sse41", }); } |