Commit Graph

99 Commits

Author SHA1 Message Date
Ben Wagner
d5def99232 Remove SK_SUPPORT_LEGACY_SHADER_ASALOCALMATRIXSHADER
This is no longer used and can be removed.

Change-Id: I6aab1cf243aa1f09bdcd26517a392bbcf11c9444
Reviewed-on: https://skia-review.googlesource.com/4360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-02 21:20:43 +00:00
Mike Klein
df707567a0 For debug builds, -O0 by default, adding -O1 only on bots.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4344

Change-Id: Idc1435d75e51ea0b54d369efa91993d369aa74c0
Reviewed-on: https://skia-review.googlesource.com/4344
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-02 16:12:12 +00:00
Mike Reed
5e25717ab6 hide setImageFilter(ptr)
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4184

Change-Id: Iad792cfdf54087ad4c424fd268559c162a9a5f5c
Reviewed-on: https://skia-review.googlesource.com/4184
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-01 16:05:41 +00:00
Jim Van Verth
3c1b7db243 Add SkShadowMaskFilter
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3824

Change-Id: Idde7f7d6a61583a8be26df7a7c4b293c4710bccf
Reviewed-on: https://skia-review.googlesource.com/3824
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-10-31 20:29:30 +00:00
Mike Reed
6ff1f33eba remove legacy xfermode build flag
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4201

Change-Id: Id60623220daf5a600d8143dedc46714c8dd9896d
Reviewed-on: https://skia-review.googlesource.com/4201
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-31 17:14:55 +00:00
Matt Sarett
a9fd106d0c Draw Alpha8 + color filter correctly in software
This makes the behavior match our gpu backend.

BUG=android:31019366

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3979

Change-Id: I941623d0bdf54f61aafb1383de46bbedceb7578d
Reviewed-on: https://skia-review.googlesource.com/3979
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-10-31 14:42:52 +00:00
Mike Klein
d280d425bd SkFixed15
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3981

Change-Id: I811b22004e8e2d5b7135f574caea296ffdff7011
Reviewed-on: https://skia-review.googlesource.com/3981
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-31 13:41:39 +00:00
Mike Reed
7d954ad797 remove xfermode from public api
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4020

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-28 20:06:17 +00:00
Ben Wagner
187a771f59 Add support for lib_dirs to gn_to_cmake.py.
The vulcan code uses lib_dirs to point to the libs in the SDK.

Change-Id: I4a1a4235b8534f3f937640b10f9758b0c70434c9
Reviewed-on: https://skia-review.googlesource.com/4003
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-10-28 15:07:10 +00:00
Brian Osman
1105224f97 Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030

Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-27 19:14:09 +00:00
Mike Klein
6e74412a9c Create .gni files for samples, tests, gms, and benches.
Calling Python to find all these files is convenient, but error-prone.  It's easy to forget to call GN again when adding a file.  Each of these calls to Python also adds ~50ms to the run time of gn gen, which is small but adds up.

On my desktop, gn gen drops from 600ms to 150ms, noticeably faster.

This leaves one call to find.py for generating skia.h for fiddle.  We're not quite sure how to automate that process to happen entirely inside the :skia.h action while maintaining correct dependencies, so I'm leaving it for now.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4036

Change-Id: Ib9d355b97900f29afebc65311ceef50537e46dda
Reviewed-on: https://skia-review.googlesource.com/4036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-27 18:14:06 +00:00
Mike Klein
eb94e56882 opts.gypi -> opts.gni
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4026

Change-Id: Ib687bd7ce87ddbbc60f95e7a30e20575971e5c59
Reviewed-on: https://skia-review.googlesource.com/4026
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 23:23:09 +00:00
Mike Klein
9034b13764 gpu.gypi -> gpu.gni
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4025

Change-Id: I55a6d58458500ccfb009382eab4c90a6e4217b2c
Reviewed-on: https://skia-review.googlesource.com/4025
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-26 22:14:31 +00:00
Mike Klein
cfc4f44aeb gypi -> gni: core, effects, android framework defines
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4023

Change-Id: I29a26c1716a319156a34a64999756ed7dba1e603
Reviewed-on: https://skia-review.googlesource.com/4023
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 21:44:49 +00:00
Mike Klein
a5fb6157e5 Split SkSL and utils apart again into .gni files.
Also extend GN format presubmit check to .gni files.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3976

Change-Id: I292f3136437101e3e2c3271e260536ab7a24b192
Reviewed-on: https://skia-review.googlesource.com/3976
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 18:56:37 +00:00
Mike Klein
552cd1335f Start inverting GN reading .gypis to GYP reading .gnis.
This canaries the idea by converting gyp/pdf.gypi to gn/pdf.gni.
If this lands and rolls quietly, I'll flesh out the rest.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3972

Change-Id: Iecaf1ccce7891679904c585946272bfb25eea299
Reviewed-on: https://skia-review.googlesource.com/3972
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 17:47:00 +00:00
Mike Klein
6e55fef07f GN: spin off :no_exceptions as its own config.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4001

Change-Id: Ibaa10b9b6f566958b7e6622eedbc30a7010260b3
Reviewed-on: https://skia-review.googlesource.com/4001
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 17:08:53 +00:00
Mike Klein
6ad9909fb7 Turn on -Wrange-loop-analysis.
-Wrange-loop-analysis triggers when we use a new-style for loop in a way that appears to unintentionally call a copy constructor on each non-trivial loop element instead of operating on them by reference.


BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4000

Change-Id: If9e1b7fcc1f2789ae03c41c17abb17e60d564a8b
Reviewed-on: https://skia-review.googlesource.com/4000
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 15:57:09 +00:00
Mike Klein
82364bae16 Build for Android from Windows, work in progress.
Pretty vanilla stuff here, mostly just making the gcc-like toolchain Windows friendly.

I was having trouble getting rm -r {{output}} && $ar rcs {{output}} @$rspfile to work without deleting my ar.exe, so I chickened out the usual way by adding gn/ar.py.

I've also updated bin/droid to work with Git Bash on Windows.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3751

Change-Id: I04c34ccc91e6a291c11ac4e7a7a0ffe41d879fe6
Reviewed-on: https://skia-review.googlesource.com/3751
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 14:37:43 +00:00
Mike Klein
8ffb26051f Turn off buffer security checking in Release builds.
I'm seeing /GS's _security_check_cookie() show up as a signficant piece of time when profiling.  That's mostly just annoying noise.  We generally use our Release builds for performance testing and Debug for correctness, so it seems like a fair thing to disable in Release builds... it's a sort of ASAN thing, which we only do in Debug on other platforms.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3782

Change-Id: I9b3cf4c5cf943fc2549f5bf91a1f6f7e41733e2c
Reviewed-on: https://skia-review.googlesource.com/3782
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-20 20:16:12 +00:00
Mike Klein
90a381f5b2 Turn on /OPT:REF and /OPT:ICF too.
These two together shave another 5MB off dm.exe, from 16MB -> 11MB.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3738

Change-Id: Id216867e0ad5bc115fbd4006095860dff9204947
Reviewed-on: https://skia-review.googlesource.com/3738
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-20 18:03:50 +00:00
Mike Klein
916ca1d8a0 Compile for Windows with /Zc:inline.
By default, MSVC generates standalone versions of all functions, including static inline functions that are only inlined.  Those standalone versions are dead code.  This /Zc:inline flag makes MSVC behave like all the other compilers, omitting those standalone functions.  Chrome builds with this flag.

This CL cuts dm.exe and nanobench.exe each down by about 3MB, 19->16MB for DM and 15MB->12MB for nanobench.  This shouldn't affect runtime speed, and didn't signficantly change clean build time on my Z840 (~90s either way).

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3735

Change-Id: Ibd2a80337fcefc3f4eaf4335ea4e95a80bb4fddb
Reviewed-on: https://skia-review.googlesource.com/3735
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-20 17:50:44 +00:00
Mike Klein
0bcfeac251 Compile Release builds with -momit-leaf-frame-pointer.
Unlike -fomit-frame-pointer, this doesn't make debugging or profiling any more difficult, as it only applies to leaves.  It will make our code (negligibly) smaller and (negligibly) faster.

Mostly I just find it easier to read the disassembly without all the rbp gymnastics getting in the way.


BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3700

Change-Id: I4b96aee7619791d5980de7f46e82836ca08a6456
Reviewed-on: https://skia-review.googlesource.com/3700
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-20 17:01:14 +00:00
Mike Klein
43c2526665 Viewer on Mac.
- Support ObjC / ObjC++
  - Build SDL on Mac.
  - Build viewer on Mac.

Patched from Jim's CL.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3760

Change-Id: I12663f2ed2969e22f51aefed560fbc22b2524167
Reviewed-on: https://skia-review.googlesource.com/3760
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-20 14:57:49 +00:00
Mike Klein
5bab65ba33 Switch Windows ANGLE bots to GN.
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-ANGLE-Trybot;master.client.skia:Test-Win-MSVC-ShuttleC-GPU-GTX960-x86_64-Release-ANGLE-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3539

Change-Id: I076c4c5972344b6688d648a8ea5e5618e87fd88d
Reviewed-on: https://skia-review.googlesource.com/3539
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-10-17 17:59:46 +00:00
Mike Klein
1a8d675148 GN: get Angle compiling on Windows.
Angle does not yet link, but it does compile.

I chickened out and wrote cp.py to be the copy tool on Windows.  I've got all platforms using it for consistency.


CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-ANGLE-Trybot


GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3533

Change-Id: I15f4b63a47121528b2fd2672c26c62765966147c
Reviewed-on: https://skia-review.googlesource.com/3533
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-17 16:16:16 +00:00
Mike Klein
24267ffeab Make GCC ninja log lines consistent with MSVC.
I recently switched over MSVC to simpler log lines from Ninja.  This makes GCC- or Clang-based builds use the same set of messages.  It's less noise when things go right; Ninja prints the whole line when a step fails.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3540

Change-Id: I36b638ee180210c6fb35c2bccb1b6d3c58437d36
Reviewed-on: https://skia-review.googlesource.com/3540
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-17 15:49:53 +00:00
Mike Klein
c756e86432 GN/Win: quieter builds
It's hard to read the logs as they are now.  This simplifies down the descriptions, and stifles a warning about linking object files with no symbols into a static library.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3322

Change-Id: I52beb3b8405ebb2c370cad432669834b64baa840
Reviewed-on: https://skia-review.googlesource.com/3322
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-13 18:55:00 +00:00
Mike Klein
5286d6cecd GN/Win: pass /DEBUG to linker to get debug symbols.
Not much used for debug symbols if they're not linked in.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3320

Change-Id: I506ae624ec412d4151a025879a5dd14d90183bd8
Reviewed-on: https://skia-review.googlesource.com/3320
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-13 17:39:24 +00:00
Mike Klein
c7165c239a GN/Win: warnings and warn-as-error
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3258

Change-Id: Ia2b85904bed1e6ca72c68abaecf6c2854795342c
Reviewed-on: https://skia-review.googlesource.com/3258
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-13 04:17:38 +00:00
Mike Klein
0bc5a7695c GN: naive attempt for 32-bit Windows support
This uses the win_toolchain's SetEnv.cmd script to set up the environment for x86 builds.  Some of what it sets is redundant with what we set: include_dirs (INCLUDE), lib_dirs (LIB).  I'd sort of like to learn what parts of it actually matter: VSINSTALLDIR? VCINSTALLDIR? likely PATH?
This will not work for local builds not using win_toolchain.  I don't mind that too much, at least for now, maybe forever.  Most humans should be using 64-bit builds.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3257

Change-Id: Ib880fb738bc4b493e8905903706526110213be47
Reviewed-on: https://skia-review.googlesource.com/3257
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-13 03:14:05 +00:00
Mike Klein
5d8cf2915f GN: windows flags tweaks.
Should be no need for /TC, /TP.
Don't set GCC-like 32-bit build flags on Windows.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3256

Change-Id: Ifa11606ca55a86d416724247328024ddea59e8bc
Reviewed-on: https://skia-review.googlesource.com/3256
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-12 23:59:09 +00:00
Mike Klein
cc300a15d4 GN/Win: flesh out compiler flags.
This should turn on the basics: optimization, debug symbols, disabled RTTI.

Release builds compile monobench, and cl.exe isn't happy with 1.0/0.0 there, so I swapped that into infinity().

Also, gn format I skipped last time.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3252

Change-Id: I8718d583e3fba4496b789eb25971462b972a5425
Reviewed-on: https://skia-review.googlesource.com/3252
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-12 20:46:20 +00:00
Mike Klein
d301683716 GN/Win: support win_toolchain asset?
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3246

Change-Id: Ib38d4f16788bc27ad81975a4c1b0a732e5df1de3
Reviewed-on: https://skia-review.googlesource.com/3246
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-12 20:16:22 +00:00
Mike Klein
3eb71216d2 More steps toward GN/Windows.
I think I'm now at the point of needing to just resolve missing symbols.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3201

Change-Id: Ib908bd72c23f2d4bafd17182eedcb2fc85c422e5
Reviewed-on: https://skia-review.googlesource.com/3201
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-11 21:31:19 +00:00
Mike Klein
0f61faa7b7 GN: windows compiles locally.
Not yet linking.  Ignoring bots for now.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3200

Change-Id: Idd75033313df60844c2ba602f7845b3c52987bc2
Reviewed-on: https://skia-review.googlesource.com/3200
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-11 20:48:25 +00:00
Mike Klein
461d328a78 Make gn gen work on Windows again.
Clang detection is specific to GCC-like toolchains.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3171

Change-Id: I7144bc8e5cd3e774625b51a6dda981284ed1fdc1
Reviewed-on: https://skia-review.googlesource.com/3171
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-11 18:00:37 +00:00
Mike Klein
4fdc54385a Update to Android NDK r13.
The libc++ include paths have changed very slightly.  I've left GN compatible with both older r12 NDKs and the new r13 to smooth the transition.

The libc++ in r13 depends on long-double math.h functions (cosl, atanl, etc.) only available in Android API v21 (Lollipop) and up.  That's what the 64-bit bots were already on, so we just pull the 32-bit bots up to the same target.  Conveniently, the oldest bots we have (N7 and N10) are on Lollipop.

The r13 MIPS64 sysroots are a little weird... /usr/include and /usr/lib64 but no /usr/lib.  That'd be fine---we only want 64-bit builds---but Clang searches for /usr/lib64 via its path to /usr/lib, and without at least an empty /usr/lib, it can't find /usr/lib64.  So you'll see a special mips64el section in the GN config where we do this all manually (other platforms pick this all up correctly from --sysroot).  I've chosen to do this rather than fix it up in the asset create.py scripts so that we stay compatible with vanilla NDKs, which is convenient for developers.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Mac-Clang-arm64-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-arm-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-arm-Release-GN_Android-Trybot,Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs-Trybot,Build-Ubuntu-Clang-arm64-Debug-GN_Android_Vulkan-Trybot,Build-Ubuntu-Clang-arm64-Release-GN_Android-Trybot,Build-Ubuntu-Clang-mips64el-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-mips64el-Release-GN_Android-Trybot,Build-Ubuntu-Clang-mips64el-Release-GN_Android-Trybot,Build-Ubuntu-Clang-mipsel-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-mipsel-Release-GN_Android-Trybot,Build-Ubuntu-Clang-x64-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-x64-Release-GN_Android-Trybot,Build-Ubuntu-Clang-x86-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-x86-Release-GN_Android-Trybot

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3180

Change-Id: I6f3b5d9411ded0ee49c1099490f41fa86a8736f8
Reviewed-on: https://skia-review.googlesource.com/3180
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-11 17:07:49 +00:00
Ben Wagner
388faa0fb9 Auto re-gen for gn cmake generator.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3028

Change-Id: I73c6ce9e852c280bbb2017c30717809b4cb44046
Reviewed-on: https://skia-review.googlesource.com/3028
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-10-06 21:12:21 +00:00
Ben Wagner
dc69dc7e5e Add action_foreach, copy, and proper target naming.
Also properly handles dependencies across OBJECT libraries.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2939

Change-Id: I4aa48c896caf262772fe9769e742b54f6e265ab0
Reviewed-on: https://skia-review.googlesource.com/2939
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-10-05 14:07:04 +00:00
Mike Klein
121563eb4a Fold extra_*_flags into GN as a config.
This should make them visible to things like gn_to_cmake.py.
I'm not exactly sure what this implies about ordering and overriding.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2938

Change-Id: I0740613993fb5bbfb8363cfa126d1f59768abf60
Reviewed-on: https://skia-review.googlesource.com/2938
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-04 21:57:31 +00:00
Ben Wagner
bc34404dc3 Implement 'action' in gn_to_cmake.py.
With this change it is possible to build all Skia targets.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2784

Change-Id: I5c53a6ba5746d210e0ae8f7a29b409d40c7b9bff
Reviewed-on: https://skia-review.googlesource.com/2784
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-09-30 13:29:52 +00:00
bungeman
e95ea08cf4 Improve GN to CMake translation for building.
This adds proper target types, dependencies, and library handling. This
is enough to build and run dm on Linux and Mac.

Change-Id: I5220f67f7dd3dbada7ad03ef83fff8fd80158fad
Reviewed-on: https://skia-review.googlesource.com/2664
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2016-09-28 21:20:29 +00:00
Mike Klein
3ba96c8cec Turn on -Wgnu-anonymous-struct and -Wnested-anonymous-types.
I'm not seeing any problems with these locally.  Perhaps the bots have something to say.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2709

Change-Id: I6f0c7045c8f270efcd71d837f22a40e9f9d3e9b7
Reviewed-on: https://skia-review.googlesource.com/2709
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-09-27 17:22:12 +00:00
csmartdalton
53c7bbfaaf GN: match shell behavior for cc and cxx in is_clang.py
Interprets cc/cxx as part of the shell command rather than literal
arguments. This matches the behavior of shell invocations from ninja.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2375573002

Review-Url: https://codereview.chromium.org/2375573002
2016-09-27 09:29:24 -07:00
Mike Klein
600c6a716d Turn on -Wnewline-eof.
I don't know _why_ Clang would like these .inc files to have a newline at the end of the file, but it seems a harmless way to silence the warning.


BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2711

Change-Id: I6c530ee5096c48c91ddf322aca916e70a0dd770b
Reviewed-on: https://skia-review.googlesource.com/2711
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2016-09-27 15:49:37 +00:00
Mike Klein
8f514c7ecc We really shouldn't pass SkFontStyle to printf as %d.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2721

Change-Id: I362063bea3909b2581d8e9b7860d4ac321082808
Reviewed-on: https://skia-review.googlesource.com/2721
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-09-27 14:26:33 +00:00
Mike Klein
fc6c37b981 Remove stray semicolons.
Turns out function declarations don't end in semicolons...

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720

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

Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb
Reviewed-on: https://skia-review.googlesource.com/2720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-27 14:04:26 +00:00
Mike Klein
7bfc08b9fb Focus -Wno-over-aligned to just 32-bit x86 Android. (2)
I've even found the code that's making this happen, just don't know why.
I've added a test to assert that it's safe to assume malloc() is 8-byte aligned.

Test should compile this time.

CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot

Change-Id: I48714b99670c20704adf4f7f216da0d60d7d9bcd
Reviewed-on: https://skia-review.googlesource.com/2662
Reviewed-on: https://skia-review.googlesource.com/2703
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-27 12:16:39 +00:00
Mike Reed
75d6ffbc74 Revert "Focus -Wno-over-aligned to just 32-bit x86 Android."
This reverts commit If8a2898ab3a77571622eb125c97f676e029b902c.

Reason for revert: 

../../../../../work/skia/tests/OverAlignedTest.cpp: In function 'void test_OverAligned(skiatest::Reporter*, sk_gpu_test::GrContextFactory*)':
../../../../../work/skia/tests/OverAlignedTest.cpp:19:33: error: invalid operands of types 'void*' and 'int' to binary 'operator&'
         REPORTER_ASSERT(r, SkIsAlign8(p));
                                 ^
ninja: build stopped: subcommand failed.

Original issue's description:
> Focus -Wno-over-aligned to just 32-bit x86 Android.
> 
> I've even found the code that's making this happen, just don't know why.
> I've added a test to assert that it's safe to assume malloc() is 8-byte aligned.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2662
> 
> CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot
> 

TBR=mtklein@chromium.org,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic9b30ce980d8d5155528a6f2b4e1913e5fa95dc0
Reviewed-on: https://skia-review.googlesource.com/2702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-09-27 10:44:04 +00:00