Commit Graph

303 Commits

Author SHA1 Message Date
djsollen
f9deeb66d0 Update android_make to support both --gcc and --clang options.
This CL also fixes all the errors that resulted from compiling
with clang and ccache.

BUG=skia:4948
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1774503004

Review URL: https://codereview.chromium.org/1774503004
2016-03-07 12:30:47 -08:00
mtklein
673748a320 link with -rdynamic on Linux
This lets our tools get symbols when they backtrace themselves.

Here's an example improved stack trace.
Notice there are symbols for some Skia methods now.

Stack trace:
    out/Release/dm() [0x5ec19b]
    out/Release/dm() [0x5ec209]
    /lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7f6ae0ce2d40]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f6ae0ce2cc9]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f6ae0ce60d8]
    out/Release/dm() [0xcd19f9]
    out/Release/dm() [0x8ca959]
    out/Release/dm(_ZN11XfermodesGM16onOnceBeforeDrawEv+0x70) [0x8cb640]
    out/Release/dm(_ZN6skiagm2GM4drawEP8SkCanvas+0x1c) [0x5fc81c]
    out/Release/dm(_ZNK2DM5GMSrc4drawEP8SkCanvas+0x73) [0x5f3563]
    out/Release/dm(_ZNK2DM10RasterSink4drawERKNS_3SrcEP8SkBitmapP9SkWStreamP8SkString+0xcc) [0x5f9eac]
    out/Release/dm(_ZN4Task3RunERKS_+0xd5) [0x5f1685]
    out/Release/dm() [0xa4d320]
    out/Release/dm() [0xcb66ba]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f6ae2667182]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f6ae0da647d]

Today the same crash looks more like this.

Stack trace:
    out/Release/dm() [0x5ec19b]
    out/Release/dm() [0x5ec209]
    /lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7f6ae0ce2d40]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f6ae0ce2cc9]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f6ae0ce60d8]
    out/Release/dm() [0xcd19f9]
    out/Release/dm() [0x8ca959]
    out/Release/dm() [0x8cb640]
    out/Release/dm() [0x5fc81c]
    out/Release/dm() [0x5f3563]
    out/Release/dm() [0x5f9eac]
    out/Release/dm() [0x5f1685]
    out/Release/dm() [0xa4d320]
    out/Release/dm() [0xcb66ba]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f6ae2667182]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f6ae0da647d]

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1774593002

Review URL: https://codereview.chromium.org/1774593002
2016-03-07 11:05:15 -08:00
bsalomon
ad514d00e5 Only modify abort behavior to avoid debugger dialog on windows for bot builds.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1752973003

Review URL: https://codereview.chromium.org/1752973003
2016-03-02 14:44:15 -08:00
ethannicholas
c85d9fbc0a GrAuditTrail can now be enabled/disabled at runtime
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1712753002

TBR=bsalomon@google.com
Doesn't actually change the public API

Review URL: https://codereview.chromium.org/1712753002
2016-02-18 13:45:40 -08:00
joshualitt
6b3cf73af5 Add batch information to json
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1705093002

Review URL: https://codereview.chromium.org/1705093002
2016-02-17 11:20:26 -08:00
bungeman
918090c819 SkTArray to move when moving.
This updates SkTArray to move elements when possible, instead of always
copying them.

TBR=reed
Agreed moving is good. This should also become private.

Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

Review URL: https://codereview.chromium.org/1672063002
2016-02-09 09:14:28 -08:00
mtklein
a861c007fd try -O1 to speed up msan bot
We want it to be a debug build, but it probably doesn't need to be
completely unoptimized.

dm: 27m -> 7m
nanobench: 140m -> 33m

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1678693002

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

Review URL: https://codereview.chromium.org/1678693002
2016-02-07 09:12:29 -08:00
mtklein
e721a8e883 flags and hacks to get MSAN bot going
This disables a few tests in DM:
   - one BlurLargeImage GM maybe is really broken
   - FontMgrAndroidParser uses libexpat, which I've not (yet?) built from source,
     so MSAN can't see into it.

This extends some of the MSAN stifling we added around SkImageDecoder_libjpeg to SkCodec, and skips .wbmps, .pngs, and .bmps.  We're only seeing issues in colortables for .png and .bmp.

I think I can probably back out disabling Codec and the RAW image decodes...
they should all be covered by the libjpeg stifles.

BUG=skia:4550,skia:4900
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1673663002

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

TBR=msarett@google.com

Review URL: https://codereview.chromium.org/1673663002
2016-02-06 19:12:23 -08:00
bungeman
1aeac30809 Revert "Factor out xcode c/cpp settings into variables to apply to cmake builds."
This reverts commit 32235eac4b.
This change should no longer be necessary now that gyp has been updated.

Review URL: https://codereview.chromium.org/1664923002
2016-02-03 13:06:28 -08:00
scroggo
1497f9f264 Update SK_IMAGE_VERSION to test RAW
Bump SK_IMAGE_VERSION to test the images in v2 in GoogleStorage, which
includes the images from v1 plus test images for SkRawCodec.

Only define skia_decodes_raw on platforms that support it, rather than
defining it always and checking additional conditions to determine
whether to support raw. Further, define it and SK_CODEC_DECODES_RAW
for all targets, so we can use the compile flag in other targets.

In DM, exclude the raw extensions if SK_CODEC_DECODES_RAW is not defined.

Blacklist raw extensions on NexusPlayer, which was running out of memory
when running them.

BUG=skia:4829

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1612113002

Review URL: https://codereview.chromium.org/1612113002
2016-02-02 11:56:33 -08:00
scroggo
ad38ed6003 Revert of Treat bad values passed to --images as a fatal error (patchset #17 id:320001 of https://codereview.chromium.org/1611323004/ )
Reason for revert:
Speculative to fix windows bots

Original issue's description:
> Treat bad values passed to --images as a fatal error
>
> If an option is passed to --images that is either a non-existent path or
> a folder with no images matching the supported types, assume this is
> an error and exit, so they can supply a valid path instead.
>
> Share code between DM and nanobench in SkCommonFlags.
>
> nanobench now behaves more like DM - it will check a directory for
> images that match the supported extensions.
>
> Only consider image paths ending in RAW suffixes as images if
> SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
> to decode errors on platforms that cannot decode it.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611323004
>
> Committed: https://skia.googlesource.com/skia/+/7579786f3bd5a8fda84a1abc45b16213c3371f93

TBR=mtklein@google.com,borenet@google.com,msarett@google.com

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review URL: https://codereview.chromium.org/1653543002
2016-01-29 14:41:55 -08:00
scroggo
7579786f3b Treat bad values passed to --images as a fatal error
If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

Only consider image paths ending in RAW suffixes as images if
SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
to decode errors on platforms that cannot decode it.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611323004

Review URL: https://codereview.chromium.org/1611323004
2016-01-28 08:41:10 -08:00
bsalomon
32235eac4b Factor out xcode c/cpp settings into variables to apply to cmake builds.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1619243003

Review URL: https://codereview.chromium.org/1619243003
2016-01-22 12:54:58 -08:00
mtklein
632199ec6e Make skia_sanitizer work on Macs too.
This is of course limited by what the compiler suppports.
-fsanitize=address seems to work OK.

BUG=skia:

Review URL: https://codereview.chromium.org/1512853005
2015-12-09 12:39:01 -08:00
herb
55462e5f50 Add RTTI to all sanitizers.
BUG=skia:

Review URL: https://codereview.chromium.org/1510843003
2015-12-08 18:49:04 -08:00
mtklein
bb5b77db51 Disable sanitizers with a blacklist.
We think this might be more flexible.  It allows, e.g, function-level blacklisting,
and here an easy one-stop-shop blacklist for all of third_party/externals.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1509733003
2015-12-08 14:26:17 -08:00
mtklein
cc881dafcb Add sk_careful_memcpy to catch undefined behavior in memcpy.
It's undefined behavior to pass null as src or dst to memcpy, even if len is 0.
This currently triggers -fsanitize=attribute-nonnull warnings, but also can
lead to very unexpected code generation with GCC.

sk_careful_memcpy() checks len first before calling memcpy(),
which prevents that weird undefined situation.

This allows me to mark all sanitizers as no-recover, i.e. make-the-bots-red fatal.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot

BUG=skia:4641
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1510683002
2015-12-08 11:55:17 -08:00
mtklein
b5f7d778a1 When was SkPDiff last used?
BUG=skia:1451,skia:1463,skia:1798,skia:1859,skia:2710,skia:2711,skia:2712,skia:2713

Review URL: https://codereview.chromium.org/1502173003
2015-12-07 13:27:32 -08:00
joshualitt
f16f88b779 Create a define for nanobench builds to dump stats
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1499453002
2015-12-02 13:00:37 -08:00
mtklein
1e5cbf2af7 update iOS build flags
This makes it match OS X build more closely.
The most important change is that CLANG_CXX_LIBRARY sets -stdlib=libc++
for both the compiler and the linker.

BUG=skia:

Review URL: https://codereview.chromium.org/1451913002
2015-11-16 16:20:34 -08:00
mtklein
d28ada7fd6 turn on libc++ for iOS
BUG=skia:

Review URL: https://codereview.chromium.org/1442103002
2015-11-13 11:22:04 -08:00
mtklein
d7b25c734e Target Mac bots at 10.7+libc++ to approximate Chrome's 10.6+libc++.
This is necessary if we want to start using C++11 library features.

Chrome's got their own custom libc++-for-10.6.
This is a somewhat lazy approximation of that.

Chrome should still guard us from using 10.7-specific features
until 10.6-10.8 all go away.

BUG=skia:

Review URL: https://codereview.chromium.org/1437173002
2015-11-12 08:41:40 -08:00
joshualitt
47fdae9807 Wire up SDL on mac
BUG=skia:

Review URL: https://codereview.chromium.org/1428633003
2015-11-09 12:30:05 -08:00
halcanary
6950de6c41 Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
2015-11-07 05:29:00 -08:00
hendrikw
9a7404188e skia: Add ANGLE support on Mac
I want to be able to compare ANGLE vs CommandBuffer for
dm and nanobench on Mac, so enabling ANGLE on mac.

Review URL: https://codereview.chromium.org/1395783003
2015-10-28 08:42:29 -07:00
hendrikw
855dc9395f skia: Fix command buffer support on the mac
The extension on the mac is .dylib, updated the name.

EGL.h isn't available on mac (unless we include skia_angle.h).
I've got a somewhat bad hack of defining the types that I need
to get this running.

GetProcedureAddress was somehow successfully grabbing gl
functions from another lib.  Removed this call, I copied it
from ANGLE impl, but it isn't required.

lib load path works differently, fixed in GYP

BUG=skia:2992

Review URL: https://codereview.chromium.org/1403153002
2015-10-27 10:04:34 -07:00
jvanverth
338047e21f Clean up iOS build files
Review URL: https://codereview.chromium.org/1409663002
2015-10-15 13:20:35 -07:00
hendrikw
b1ac52fb0f Skia: Add Command Buffer support to Linux/Mac
Code added to load libcommand_buffer_gles2.so on linux or
mac.

Review URL: https://codereview.chromium.org/1346423002
2015-10-01 18:29:34 -07:00
hendrikw
03ba61436b skia: roll ANGLE and remove compile flags
Recent angle change allows us to remove some of the ANGLE specific
compile flags

Review URL: https://codereview.chromium.org/1376803003
2015-09-29 10:30:31 -07:00
hendrikw
6f0fdac9e7 skia: Add support for ANGLE on linux
This will allow the ANGLE guys to test the ANGLE gl backend
with nanobench and DM

Review URL: https://codereview.chromium.org/1343193005
2015-09-23 11:35:55 -07:00
mtklein
b1c56ec01e unplumb sknx_no_simd
BUG=skia:

Review URL: https://codereview.chromium.org/1355833002
2015-09-18 06:50:38 -07:00
mtklein
61a81e3947 Mimic Chrome better in our GYPs.
To match Chrome, make sure we've disabled thread-safe statics, RTTI, and exceptions.  Linux needed -fno-threadsafe-statics, Mac needed all three.

Nothing important triggered this CL.  I just got confused when I saw exception handling (calls to delete, stack unwinding) in some generated code on my laptop.

BUG=skia:

Review URL: https://codereview.chromium.org/1323533003
2015-09-09 10:46:20 -07:00
bungeman
afd7c74972 Remove SK_OFFSETOF from SkTypes, clean up offsetof usage.
The motivation for this was to remove SK_OFFSETOF from SkTypes, but
this CL is mostly about cleaning up our use of offsetof generally.

SK_OFFSETOF is removed to SkTypes and added to the two places it is
actually used (for the non standard behavior of finding the offset of
fields in types which are not standard layout).

Older versions of gcc required POD for offsetof to be used without
warning. Newer versions require the more relaxed standard layout.
Now that we no longer build on older versions of gcc, remove the
old warning suppressions.

PODMatrix is renamed to AggregateMatrix. SkMatrix is already POD
(trivial and standard layout). The PODMatrix name implies that the
POD-ness is needed for the offsetof, but it is actually the aggregate
attribute which is needed for compile time constant initialization.
This makes it more obvious that this can be revisited after we can
rely on constexpr constructors.

This also adds skstd::declval since this allows removal of existing
awkward code which casts a constant to a pointer to find the size of
a field.

TBR=reed@google.com
No API change, only removes unused macro.

Review URL: https://codereview.chromium.org/1309523003
2015-08-25 12:05:55 -07:00
mtklein
9a106ba2dd A bit of misc cleanup.
- Update comments about skia_shared_lib
 - Remove dead code (system_preferences)
 - Remove non-building code (techtalk1)
 - Turn gm/annotated_text back on.

BUG=skia:

Review URL: https://codereview.chromium.org/1286133004
2015-08-14 10:03:45 -07:00
mtklein
f62833d9c9 Detect MIPS DSP and DSPR2 programattically.
Procedure:

$ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -dM -E - < /dev/null | sort > vanilla.mips
$ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -mdsp -dM -E - < /dev/null | sort > dsp.mips
$ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -mdspr2 -dM -E - < /dev/null | sort > dspr2.mips

$ diff vanilla.mips dsp.mips
239a240,241
> #define __mips_dsp 1
> #define __mips_dsp_rev 1

$ diff vanilla.mips dspr2.mips
239a240,242
> #define __mips_dsp 1
> #define __mips_dsp_rev 2
> #define __mips_dspr2 1

So, defined(__mips_dsp) -> SK_MIPS_HAS_DSP, defined(__mips_dspr2) -> SK_MIPS_HAS_DSPR2.

BUG=skia:

Review URL: https://codereview.chromium.org/1274873002
2015-08-05 14:17:32 -07:00
robertphillips
fae010266f Remove IGNORE_ROT_AA_RECT_OPT flag
It looks like the positive version was added (SHADER_AA_FILL_RECT) but the negative version wasn't removed.

Review URL: https://codereview.chromium.org/1271903003
2015-08-04 08:04:29 -07:00
Brian Salomon
4239fc2f69 Remove skia_arch_width, fold into skia_arch_type.
DOCS_PREVIEW= https://skia.org/?cl=1228553010

BUG=skia:4042
R=borenet@google.com, mtklein@google.com

Review URL: https://codereview.chromium.org/1228553010
2015-07-27 09:10:36 -04:00
borenet
243406e580 Add skia_use_android_framework_defines GYP_DEFINE
BUG=skia:4082

Review URL: https://codereview.chromium.org/1243383002
2015-07-22 13:29:25 -07:00
bungeman
b7069e9c1f Compile with VS2015.
Visual Studio 2015 has additional warnings around noexcept and
disabling exceptions, which can be worked around with the
(undocumented) _HAS_EXCEPTIONS macro.

Visual Studio 2013 and 2015 have roundf in math.h, so use it to
avoid extra work and casts.

We avoid using cmath, as it undefs isfinite on gcc, but Visual Studio
2015 no longer provides overloads of copysign from math.h (which is
actually correct). As a result, use copysignf (which is available in
math.h in 2013 and 2015) directly.

Review URL: https://codereview.chromium.org/1244173005
2015-07-21 14:14:30 -07:00
mtklein
4abc186d02 Add a GYP flag to define SKNX_NO_SIMD when set.
Will use this with a new -SKNX_NO_SIMD bot.

BUG=skia:

Review URL: https://codereview.chromium.org/1227163016
2015-07-14 05:52:52 -07:00
borenet
11271fe3a4 Add scripts for running LLVM coverage
BUG=skia:2430

Review URL: https://codereview.chromium.org/1213063009
2015-07-06 07:43:58 -07:00
mtklein
ea6075e3ea Default iOS builds to our code signing identity.
It's super tedious to keep setting it every time I rerun ./gyp_skia.
Doesn't look like it'll bother the bots.

BUG=skia:

Review URL: https://codereview.chromium.org/1053493005
2015-04-16 13:29:59 -07:00
borenet
4808757d7a Remove all code related to NaCl
BUG=skia:3600
DOCS_PREVIEW= https://skia.org/?cl=1036283002

Review URL: https://codereview.chromium.org/1036283002
2015-04-02 12:16:36 -07:00
mtklein
2d33a1d0b0 Streamline Thumb config.
Enable Thumb2 iff ARM v7.  (We don't turn it on today for ARM <v7, and ARM v8 doesn't support it.)

BUG=skia:

Review URL: https://codereview.chromium.org/1054993002
2015-04-02 10:47:57 -07:00
scroggo
230d4ac701 Use a wrapper for SkDebugf in SkCodec.
It can be silenced or not with one flag.
Always print when building for the android framework.

Also remove the meaningless define of override to override.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1032093004
2015-03-26 07:15:55 -07:00
mtklein
dee3df930b Add a go-fast button to Skia GYP configs.
./gyp_skia -Dskia_fast=1 will
  - always optimize for the current machine as much as possible
  - drop the frame pointer
  - optimize floating point arithmetic ignoring IEEE compliance

This allows things like 3-argument VEX prefix SSE instructions and
NEON autovectorization, and can give some seriously helpful clues
about how to rearrange floating point math for speed.

I've been having trouble with LTO linking, so I'll leave that out for now.

I don't think we should set up bots with this mode.  -ffast-math means
I'm forced to run DM with --match ~Blend ~Path ~Rect ~Math ~Scalar
~Matrix ~Point before it passes, which is a disconcerting chunk of tests
to disable (including all of PathOps).

BUG=skia:

Review URL: https://codereview.chromium.org/1036533003
2015-03-26 05:30:44 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
scroggo
3e5622764a Add copyright headers to remaining gyp files.
Prevents some PRESUBMIT errors.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/1035523003
2015-03-25 10:22:41 -07:00
bungeman
d709ea8d14 Remove SkLONGLONG.
All users now define SkLONGLONG.
This fixes a long outstanding TODO now that int64_t is required.

BUG=skia:179

Review URL: https://codereview.chromium.org/1000933003
2015-03-17 07:23:39 -07:00
mtklein
172b45518a Clean up SkDynamicAnnotations.
Unprotected reads -> relaxed reads.
    Unprotected write -> relaxed write.

The only unprotected write we had was in SkTraceEvent, which it looks like we nabbed from Chrome at some point and changed only to silence TSAN.  Chrome's version uses AtomicWord / NoBarrier_Load / NoBarrier_Store, which boils down to the same as here, intptr_t / relaxed load / relaxed store.

This leaves one place where we're lying a bit to TSAN, in include/core/SkLazyPtr.h where we're doing a data-dependent consume load.  We're telling TSAN it's consume, but telling any other compiler to compile it as relaxed, given how they all upgrade consume to acquire.  This eliminates a barrier for us on ARM.  How do you guys deal with this?  Just use a consume memory order, take the hit, and hope compilers get smarter one day?

BUG=chromium:465721

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/996763002
2015-03-12 05:27:46 -07:00