Commit Graph

319 Commits

Author SHA1 Message Date
Ben Wagner
be6ae5b3da Fix system icu build.
It turns out that Skia's gn 'system' and 'third_party' templates differ
in the way public defines are declared. This also updates the build to
add libdl when building SkOSLibrary_posix.cpp, since that uses dlsym.
The current build depends on icu bringing in this dependency.

BUG=skia:7008

Change-Id: Ia710a335e1da9580f85f133a5a171f640b36ee75
Reviewed-on: https://skia-review.googlesource.com/41745
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2017-08-31 21:12:00 +00:00
Ben Wagner
a25fbef56a Add bidi to SkShaper.
Change-Id: Iaab9a1d5091a3b157a582b7e8c3261a6c3283ffc
Reviewed-on: https://skia-review.googlesource.com/40778
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-31 14:18:31 +00:00
Jim Van Verth
ecfed2beaf Add iOS support for SkiaSDLExample.
Change-Id: Ib8f4d6c41356cf0fe2e14b7bff7713d107eaa01f
Reviewed-on: https://skia-review.googlesource.com/40687
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-08-30 18:56:46 +00:00
Leon Scroggins III
04be2b54ba Reland "skia: add heif decoding support"
This reverts commit db68a426b6.

Fixes errors in Android and Google3

Bug: b/64077740
Change-Id: I3d2bb1223e4d8ba912ea2b88144aeecc487fce1a
Reviewed-on: https://skia-review.googlesource.com/35701
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-08-18 14:40:29 +00:00
Brian Salomon
194db176c9 Add ANGLE support to Viewer on Windows
Change-Id: I97a844b2f289d2518f60a64f94d60551c4530dd4
Reviewed-on: https://skia-review.googlesource.com/35742
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-17 18:58:21 +00:00
Mike Klein
db68a426b6 Revert "skia: add heif decoding support"
This reverts commit c2a954290d.

Reason for revert: both Android and Google3 rolls cannot compile.  Android cannot cast std::unique_ptr<T> to T*, Google3 cannot find HeifDecoderAPI.h.

Original change's description:
> skia: add heif decoding support
> 
> Bug: b/64077740
> Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
> Reviewed-on: https://skia-review.googlesource.com/35123
> Reviewed-by: Chong Zhang <chz@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,chz@google.com

Change-Id: Id98f025e63daec50408186000453d1695170f7a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/64077740
Reviewed-on: https://skia-review.googlesource.com/35741
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-17 13:34:07 +00:00
Chong Zhang
c2a954290d skia: add heif decoding support
Bug: b/64077740
Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
Reviewed-on: https://skia-review.googlesource.com/35123
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-16 20:22:55 +00:00
Mike Klein
228276dabf Revert "Turn on exceptions in test tools."
This reverts commit c667dff58d.

Reason for revert: temporary while I fix Android, Google3.

Original change's description:
> Turn on exceptions in test tools.
> 
> This allows us to test things that, e.g., throw std::bad_alloc.
> 
> Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
> Reviewed-on: https://skia-review.googlesource.com/34982
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

TBR=mtklein@chromium.org,herb@google.com

Change-Id: Iafdc34c5f70f99f7df3cd0bbad65eed0828453a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35081
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-16 13:20:29 +00:00
Mike Klein
c667dff58d Turn on exceptions in test tools.
This allows us to test things that, e.g., throw std::bad_alloc.

Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
Reviewed-on: https://skia-review.googlesource.com/34982
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-16 01:49:07 +00:00
Mike Klein
6dda584128 remove monobench
I'm betting big on ok bench.  This is a forcing function.

Change-Id: I8c359b7d712e16f8f0cbb90591801e0014073288
Reviewed-on: https://skia-review.googlesource.com/33660
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 19:02:56 +00:00
Mike Klein
4f6e271596 ok, add a bench source
This new source acts like other sources (GMs, SKPs) for benchmarks.  It
times multiple samples (controlled by samples=N, default 20), and each
of those samples uses the same strategy as monobench, growing loops
exponentially until it runs for at least 10ms.

When done it prints the fastest and the two slowest samples.  In
practice the 100th percentile sample is very different from the
next slowest due to caching, and the fastest is always interesting.

Because these benchmarks run in whatever execution engine ok has
selected, on non-Windows platforms you have some real control over the
interaction between benchmarks.  In its default "fork" mode each
benchmark runs independently in its own process, so the 100th
percentiles really stand out.  The other modes "thread" and "serial"
work as you'd expect too.

Here's an example where you can see how the different interactions work:

out/ok bench:samples=100 8888 filter:search=text_16_AA fork
    [text_16_AA_WT] 2.32µs  @0  6.23µs  @99 24.3ms  @100
    [text_16_AA_FF] 2.41µs  @0  5.7µs   @99 23.3ms  @100
    [text_16_AA_88] 2.55µs  @0  5.6µs   @99 24.8ms  @100
    [text_16_AA_BK] 1.97µs  @0  5.44µs  @99 23.2ms  @100

out/ok bench:samples=100 8888 filter:search=text_16_AA thread
    [text_16_AA_FF] 2.45µs  @0  23.5µs  @99 24.8ms  @100
    [text_16_AA_WT] 2.52µs  @0  17.8µs  @99 24.7ms  @100
    [text_16_AA_88] 2.55µs  @0  19.7µs  @99 25.1ms  @100
    [text_16_AA_BK] 1.8µs   @0  14.7µs  @99 25.1ms  @100

out/ok bench:samples=100 8888 filter:search=text_16_AA serial
    [text_16_AA_88] 2.35µs  @0  3.53µs  @99 16.7ms  @100
    [text_16_AA_FF] 2.09µs  @0  2.73µs  @99 2.91µs  @100
    [text_16_AA_BK] 1.75µs  @0  2.46µs  @99 2.65µs  @100
    [text_16_AA_WT] 2.1µs   @0  3.16µs  @99 3.17µs  @100

In the first "fork" case all runs are independent and have roughly
the same profile.  "thread" looks similar except you can see them
contending at the 99th percentile.  In "serial", the first bench
warms up the rest, so their 100th percentiles are all much faster.

Change-Id: I01a9f8c54b540221a9f232b271bb8ef3fda2569c
Reviewed-on: https://skia-review.googlesource.com/33585
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 15:32:36 +00:00
Mike Klein
5910ed347a 15-bit lowp is dead, long live 8-bit lowp
Change-Id: Icc4b06094aeba3af99b534746f66286d776ef78a
Reviewed-on: https://skia-review.googlesource.com/30920
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-04 05:19:38 +00:00
Mike Klein
255607f094 8-bit hacking
I think we can replace a lot of legacy code with an SkRasterPipeline
backend that works in 8-bit and stays interlaced.  Think of this as a
"lowerp" replacement for lowp.

I'm having some trouble getting ARMv8 working.
ARMv7 should be fine, but I want to turn it on separately from x86.
I haven't looked at 32-bit x86 yet, but that's also on the todo list.

Open questions to follow up on:
  - is it better to fold every multiply back down to 8-bit
    (as seen here), or to allow intermediates to accumulate
    in 16-bit and divide by 255 when done/needed?
  - is it better pass tightly packed 8-bit vectors between stages (as
    seen here), or to keep the 8-bit values unpacked in 16-bit lanes?
  - should we make V wider than 1 register?

GMs look good.  All diffs invisible and plausibly due to the 15->8 bit
precision drop.  A quick bench run showed this running in about 0.75x
the time of the existing lowp backend.

Change-Id: I24aa46ff1d19c0b9b8dc192d5b1821cab0b8843c
Reviewed-on: https://skia-review.googlesource.com/29886
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-08-03 01:54:58 +00:00
Stan Iliev
73d8fd9065 Add a private API for writing the clip to the stencil
Add a private API used by Android framework, which writes the clip
into a stencil buffer. This is used by HWUI to clip the WebView.

Bug: 31489986
Change-Id: I94515f1539acd9d069c8aceb3300577feed9c94f
Reviewed-on: https://skia-review.googlesource.com/29521
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-08-02 19:56:07 +00:00
Mike Klein
c722f79b6c clang on windows support
1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit

Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.

BUG=skia:2679

Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-31 18:39:23 +00:00
Cary Clark
8032b983fa bookmaker initial checkin
bookmaker is a tool that generates documentation
backends from a canonical markup. Documentation for
bookmaker itself is evolving at docs/usingBookmaker.bmh,
which is visible online at skia.org/user/api/bmh_usingBookmaker

Change-Id: Ic76ddf29134895b5c2ebfbc84603e40ff08caf09
Reviewed-on: https://skia-review.googlesource.com/28000
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-07-28 15:30:38 +00:00
Eric Boren
b121be7ae7 Use correct clang-format in BUILD.gn
The bot was broken in https://skia-review.googlesource.com/c/27800/
Depot Tools' version is just a wrapper which looks for clang-format
under buildtools, which doesn't exist on the bots.

Bug: skia:6893
Change-Id: I32ae6c358735c9971e533064aa50a0e0520dd05a
Reviewed-on: https://skia-review.googlesource.com/28020
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2017-07-28 14:29:27 +00:00
Ethan Nicholas
b9f6afb783 switched to infra version of clang-format for skslc
Change-Id: I3e993e271cb5e26816d37c70d9ad62acce3ed84c
Reviewed-on: https://skia-review.googlesource.com/27800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-27 20:28:50 +00:00
Mike Klein
154e6dadea factor Engine out of ok core
This makes Engines (task execution strategies: serial, thread, fork)
pluggable just like most of the rest of ok.  It removes the thread and
process limits, as I find myself rarely caring about what they are
exactly.  Instead of limiting to num-cores, we just allow any number of
concurrent threads, and any number of concurrent child processes subject
to OS limitations.

Change-Id: Icef49d86818fe9a4b7380efb60e73e40bc2e6b73
Reviewed-on: https://skia-review.googlesource.com/27140
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-26 21:36:40 +00:00
Ben Wagner
219f3622ba Add strikeout font metrics.
This also updates create_test_font so that it can be built, compiles,
and uses SkFontStyle instead of SkTypeface::Style.

BUG=b/63669723

Change-Id: I6eb0f851853f4721cf8e5052255b5b6750c3257f
Reviewed-on: https://skia-review.googlesource.com/24740
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-07-21 18:59:05 +00:00
Brian Osman
53136aa93f First stab at JSON event tracer
Not yet thread safe (so it forces threading off).
Builds JSON on the fly, so overhead is certainly bad.
Plan to fix all of that, but this at least "works".

There is now one tracing flag: 'trace'.
- 'debugf' installs the SkDebugf tracer.
- 'atrace' installs the Android ATrace tracer.
- Any other value is interpreted as a filename, and
  produces a JSON file for chrome://tracing.

All three modes work in DM, nanobench, and Viewer.

Bug: skia:
Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364
Reviewed-on: https://skia-review.googlesource.com/24781
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-20 20:11:22 +00:00
Mike Reed
e32500f064 Assume HQ is handled by pipeline, delete legacy code-path
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: If6f0d0a57463bf99a66d674e65a62ce3931d0116
Reviewed-on: https://skia-review.googlesource.com/24644
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-20 00:43:37 +00:00
Brian Salomon
dcbb9d90db Add SkDebugf trace event handler.
Also adds more trace events to GPU backend.

Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d
Reviewed-on: https://skia-review.googlesource.com/24622
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-19 15:41:34 +00:00
Brian Osman
f2c901474c Add GN arg to allow Flutter-specific API guards
Bug: skia:
Change-Id: I5a97da664626eebf30bba3f391fff0d8b9e62ea5
Reviewed-on: https://skia-review.googlesource.com/23042
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-07-14 18:54:24 +00:00
Greg Daniel
b76a72a659 Add support for creating a GrContext backed by Metal.
Also adds the support code to allow our TestContext to create a Metal
backend.

Bug: skia:
Change-Id: Ia850687019d79b897bb16e2c151f4f8526721ad9
Reviewed-on: https://skia-review.googlesource.com/22644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-13 21:29:33 +00:00
Greg Daniel
6b7e0e2c74 Add arc support to gpu Obj c++ code
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.

Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-12 20:49:32 +00:00
Leon Scroggins III
51b2f1b64c Stop adding Android-specific defines to SkUserConfig
Remove #defines that lived in gn_to_bp.py and
android_framework_defines.gni. These have been moved into a new file
in Android, SkUserConfigManual.h, in https://googleplex-android-review.git.corp.google.com/#/c/2519600/

Update gn_to_bp.py to include SkUserConfigManual.h, so it will still
result in using the same #defines.

Lately, we've found it difficult to guard changes behind a flag. e.g.
a change to drawing causes a CTS failure in Android, so we have to do
the following:
- put the change behind a flag, and add it to gn_to_bp.py or
android_framework_defines.gni
- generate new images on Android (by running CTS with external/skia
modified to not define the flag)
- create a CL in CTS that uses the new images
- land a CL in Skia that stops defining the flag
- when the Skia change lands, wait for the auto-roller to create a CL
that includes the change, stop the auto-roller, add the topic to the CTS
CL so the two can land at the same time
- land both Android changes (with TreeHugger)
- restart the Android auto-roller

With SkUserConfigManual.h (which lives in Android), the process will
be similar to Chromium:
- land a CL in Android's external/skia that defines a flag e.g.
SK_SUPPORT_LEGACY_FEATURE. Land without TreeHugger because it isn't used
in Skia and does not do anything
- land a change in Skia that changes behavior unless
SK_SUPPORT_LEGACY_FEATURE is defined. This will safely go through the
Android roll and not change any behavior for Android
- create two Android CLs - one in CTS to use the new images, and one in
external/skia to delete SK_SUPPORT_LEGACY_FEATURE. Set them to the same
topic and land them with TreeHugger

In the new process, there is no need to mess with the Android roll.

A downside to the new process is that we cannot test the android
framework defines without checking in to Android. But given how much
we've progressed in automating Android testing, this is fine.

Bug: b/63429612
Change-Id: Idfbaef2f4cae641a75fb6e7bf70428733a441336
Reviewed-on: https://skia-review.googlesource.com/22072
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-11 20:43:35 +00:00
Jim Van Verth
4c70c75d0a Update SkiaSDLExample to latest Ganesh interfaces.
Also updates SDL to 2.0.5.

Change-Id: I3a3c8f69360fc20a3d543c19dcf82dd3f42f1309
Reviewed-on: https://skia-review.googlesource.com/22204
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-07-11 16:34:21 +00:00
Brian Salomon
cfe910dc79 Revert "Revert "Make mock GrContext unit testable.""
This reverts commit c867a89b01.

Reason for revert: test

Original change's description:
> Revert "Make mock GrContext unit testable."
> 
> This reverts commit 993e7e2521.
> 
> Reason for revert: Seeing if this fixes the NexusPlayer bots
> 
> Original change's description:
> > Make mock GrContext unit testable.
> > 
> > Bug: skia:
> > Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> > Reviewed-on: https://skia-review.googlesource.com/20699
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/21731
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I62c579e087db1ff9891cf6c41b3eb40f47561887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21733
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 21:59:18 +00:00
Brian Salomon
c867a89b01 Revert "Make mock GrContext unit testable."
This reverts commit 993e7e2521.

Reason for revert: Seeing if this fixes the NexusPlayer bots

Original change's description:
> Make mock GrContext unit testable.
> 
> Bug: skia:
> Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> Reviewed-on: https://skia-review.googlesource.com/20699
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21731
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 18:21:37 +00:00
Brian Salomon
993e7e2521 Make mock GrContext unit testable.
Bug: skia:
Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
Reviewed-on: https://skia-review.googlesource.com/20699
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 15:25:35 +00:00
Brian Salomon
0c26a9dbd0 GR_TEST_UTILS fixes
Fixes build of Skia lib when GR_TEST_UTILS=0

Makes GR_TEST_UTILS=0 for official builds

Makes "Mini" builder bot exercise building GPU with is_official_build=true

Bug: skia:6786
Change-Id: I6186683a3a216d2e779645bd9e8276a66bcff4d5
Reviewed-on: https://skia-review.googlesource.com/21524
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-06 14:35:45 +00:00
Greg Daniel
e5ddff5553 Add basic metal build files for backend
Bug: skia:
Change-Id: Iddeeb91b378bdb61d200070d8faa3610299ab733
Reviewed-on: https://skia-review.googlesource.com/21533
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-05 21:12:40 +00:00
Ethan Nicholas
762466e9fe Re-re-land sksl fragment processor support
This reverts commit 5ce3972055.

Bug: skia:
Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6
Reviewed-on: https://skia-review.googlesource.com/21108
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-29 14:57:47 +00:00
Mike Klein
c55a6cb05f build regenerating SkJumper stages into GN
I _think_ this makes it so changes to _stages.cpp or _lowp.cpp get
noticed, regenerated, and baked into Skia all in the same Ninja
invocation.

Now you just need to set up the tools we use in GN:

  skia_jumper_clang = ...
  skia_jumper_objdump = ...
  skia_jumper_ccache = ...

Change-Id: I09fb54d965644ff6e5825056fb0be2c7cab2ea92
Reviewed-on: https://skia-review.googlesource.com/21140
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-28 18:22:16 +00:00
Mike Klein
5ce3972055 Revert "Re-land sksl fragment processor support"
This reverts commit c070939fd1.

Reason for revert: 

This has some knock-on effects in the generation of Android.bp from our GN files.  See gn/gn_to_bp.py?  We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...

Original change's description:
> Re-land sksl fragment processor support
> 
> This reverts commit ed50200682.
> 
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-27 22:52:10 +00:00
Derek Sollenberger
7a86987815 Use the NDK headers for AHardwareBuffer.
Bug: 6672
Change-Id: I5abd86149e912d91234853109ebd2a6b0ac5eaa2
Reviewed-on: https://skia-review.googlesource.com/20980
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-06-27 20:28:13 +00:00
Ethan Nicholas
c070939fd1 Re-land sksl fragment processor support
This reverts commit ed50200682.

Bug: skia:
Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
Reviewed-on: https://skia-review.googlesource.com/20965
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 18:27:57 +00:00
Ethan Nicholas
ed50200682 Revert "sksl fragment processor support"
This reverts commit ccf59917d3.

Reason for revert: breaking iOS bots

Original change's description:
> sksl fragment processor support
> 
> Bug: skia:
> Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
> Reviewed-on: https://skia-review.googlesource.com/17843
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 14:36:44 +00:00
Ethan Nicholas
ccf59917d3 sksl fragment processor support
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-27 14:20:05 +00:00
Brian Osman
cff94e407e Move threaded BMP device to samples
Currently only referenced by SampleApp, and this squelches false positive
warnings from Clang's thread safety analysis when clients build this code.

Bug: skia:
Change-Id: I710fdc882e05fc5b80977139237028d1408f17db
Reviewed-on: https://skia-review.googlesource.com/20831
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-26 17:42:00 +00:00
Robert Phillips
fcd5fddb02 Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy header""
This reverts commit fad9e3f541.

Reason for revert: Can't find the error message anymore (?!?) Let's try again shall we

Original change's description:
> Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
> 
> This reverts commit c0f8e426c5.
> 
> Reason for revert: Experiment to see if this will unblock the Android roll
> 
> Original change's description:
> > Update skia to use ifdefs for Vulkan code instead of dummy header
> > 
> > Bug: skia:6721
> > Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> > Reviewed-on: https://skia-review.googlesource.com/19547
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com
> 
> Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6721
> Reviewed-on: https://skia-review.googlesource.com/19724
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: Iecef7ddcfe31d82938336120a4193525ac6693be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19782
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-14 01:43:38 +00:00
Robert Phillips
fad9e3f541 Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
This reverts commit c0f8e426c5.

Reason for revert: Experiment to see if this will unblock the Android roll

Original change's description:
> Update skia to use ifdefs for Vulkan code instead of dummy header
> 
> Bug: skia:6721
> Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> Reviewed-on: https://skia-review.googlesource.com/19547
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com

Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19724
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-13 22:16:19 +00:00
Greg Daniel
c0f8e426c5 Update skia to use ifdefs for Vulkan code instead of dummy header
Bug: skia:6721
Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
Reviewed-on: https://skia-review.googlesource.com/19547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-13 18:50:03 +00:00
Leon Scroggins III
d81fed9ce2 Replace BMP calls to new with calls to malloc
A BMP can have an arbitrarily large width. We typically read a row
into a block of memory before swizzling it to the output. Rather
than calling new to create that block of memory, which may crash
when we run out of memory, call malloc, and return null if malloc
fails.

Add a common base class for Mask and Standard BMP codecs. This class
handles allocating and freeing the buffer.

Bug: b/37623797
Change-Id: I0510b76d688d030865faa481bb2fb1351dac2c97
Reviewed-on: https://skia-review.googlesource.com/18400
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-05 15:09:40 +00:00
Joe Gregorio
a8fabd3f28 Fiddle can use EGL if available.
To test this turn on egl, e.g. --args='skia_use_egl=true', and run by altering the
library path to point to the right directory of the EGL driver you want to use, for example:

  LD_LIBRARY_PATH=/usr/lib/nvidia-367/ ./out/Release/fiddle  | ./tools/fiddle/parse-fiddle-output 

Bug: skia:
Change-Id: I2cce80318925fe88f9407646acb67628a8e48810
Reviewed-on: https://skia-review.googlesource.com/18137
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-31 14:23:56 +00:00
Florin Malita
5edba45dca [Reland] Relocate shaders to own dir
Consolidate all shader impls under src/shaders/.

(reland of https://skia-review.googlesource.com/c/17927/)

Change-Id: I7918bdc1aafe842ed194412ba95b9ae53a2ec1d7
Reviewed-on: https://skia-review.googlesource.com/18146
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-30 21:01:46 +00:00
Mike Reed
f2ae2b2dbc move perlinenoise2 into effects
Bug: skia:
Change-Id: I5c178bdc5901d15c6924b3fb1f29119ab3cc701d
Reviewed-on: https://skia-review.googlesource.com/18131
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-05-30 20:15:37 +00:00
Stan Iliev
d8872be505 Revert "Relocate shaders to own dir"
This reverts commit fabe0b26d0.

Reason for revert: Last android roll failed with "external/skia/src/effects/SkGaussianEdgeShader.h:11:10: fatal error: 'SkShaderBase.h' file not found"

Original change's description:
> Relocate shaders to own dir
> 
> Consolidate all shader impls under src/shaders/.
> 
> Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3
> Reviewed-on: https://skia-review.googlesource.com/17927
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
> 

TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Change-Id: Idbb2b75053969df1dad9d8ce0217cd39189b9ddb
Reviewed-on: https://skia-review.googlesource.com/18020
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-05-25 22:30:19 +00:00
Florin Malita
fabe0b26d0 Relocate shaders to own dir
Consolidate all shader impls under src/shaders/.

Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3
Reviewed-on: https://skia-review.googlesource.com/17927
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-05-25 20:05:08 +00:00