Commit Graph

24148 Commits

Author SHA1 Message Date
mtklein
a846c7223c GN: link executables with -rdynamic on Linux.
-rdynamic makes sure the executable exposes all its symbols, which allows things like DM's built-in stack trace dumper to show symbols instead of just addresses.  We do this in GYP too.

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

Review-Url: https://codereview.chromium.org/2339983005
2016-09-15 10:44:15 -07:00
bungeman
d8c2476a8b SkFontData to use smart pointers.
The SkFontData type is not exposed externally, so any method which uses
it can be updated to use smart pointers without affecting external
users. Updating this first will make updating the public API much
easier.

This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
appears that no one outside Skia is currently using SkStream::NewfromFile
so this is a good time to update it as well.

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

Review-Url: https://codereview.chromium.org/2339273002
2016-09-15 10:03:27 -07:00
mtklein
35b26a4571 simple fix?
Scope cmdInfo more tightly to where it's not a null reference.

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

Review-Url: https://codereview.chromium.org/2342063002
2016-09-15 09:56:28 -07:00
rmistry
5caf398cac Add ability to create and upload SVGs from a local dir
BUG=skia:5757
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2346663003

Review-Url: https://codereview.chromium.org/2346663003
2016-09-15 09:33:08 -07:00
borenet
e715d2daf7 Fix NoGPU bot, which is compiling in GPU support
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342683003

Review-Url: https://codereview.chromium.org/2342683003
2016-09-15 09:08:48 -07:00
brianosman
93110a84aa Remove the unused 16-bit gradient cache
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2343863002

Review-Url: https://codereview.chromium.org/2343863002
2016-09-15 08:40:21 -07:00
brianosman
9f1f6e2c28 More NoGPU compile fixes
I can now build 'most' with skia_gpu=0 on my machine.

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

Review-Url: https://codereview.chromium.org/2340133003
2016-09-15 08:33:02 -07:00
mtklein
0973a371ec Pass rietveld as the default patch_storage.
Passing around empty strings as command line arguments requires
us to be really careful about command line quoting, parsing, etc.

It seems easy enough here to just supply the implied value.

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

Review-Url: https://codereview.chromium.org/2323233003
2016-09-15 08:27:33 -07:00
caryclark
e839e78443 quad and conic do not intersect
If a quad a conic intersect only where the end of one
is contained by the convex hull of the other, and the
curve contained by the hull is nearly a straight line,
treating it as a line may move the end point to the
other side of the curve.

Detect this by checking to see if the end point is in
the hull, and if so, continue to subdivide the curve
rather than treating it as a line.

This fixes several existing tests that were disabled
earlier this year.

A typo in SkDCurve::nearPoint() prevented detecting when
the end of a line was nearly touching a curve.

Also fixed concidence a bit to get the second half of
tiger further along.

All existing tests, including extended testing in
Release and the first half of tiger, work.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338323002

Review-Url: https://codereview.chromium.org/2338323002
2016-09-15 07:48:18 -07:00
bsalomon
32d1e95ca5 Remove "f" suffix from literal in LCD DF text shader.
Also improve DF GP names
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340603003

Review-Url: https://codereview.chromium.org/2340603003
2016-09-15 07:29:52 -07:00
brianosman
1dfec74d6b Fix SampleApp compilation with skia_gpu=0
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347593002

Review-Url: https://codereview.chromium.org/2347593002
2016-09-15 07:19:53 -07:00
reed
39eaf5f9fd add helpers for using SkData with picture serialization
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2341693004

TBR=

Review-Url: https://codereview.chromium.org/2341693004
2016-09-15 07:19:35 -07:00
brianosman
9557c273d8 Bundle common arguments to GrGradientEffect creation
I'm going to be adding more (to deal with color spaces), so trying to fix
this before it gets out of control.

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

Committed: https://skia.googlesource.com/skia/+/f605c16a030d791a37f589e6bddd7158ba5d62cd
Review-Url: https://codereview.chromium.org/2332213007
2016-09-15 06:59:16 -07:00
mtklein
09b352f75f Tidy up DM blacklists.
No need to blacklist specific instances of configs that won't be run.
There's no bug or anything here... this is entirely about keeping the
command lines as noise-free as possible.

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

Review-Url: https://codereview.chromium.org/2341963003
2016-09-15 06:24:03 -07:00
rmistry
90d0bfae4e Roll recipe DEPS
BUG=skia:5749
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339443003
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2339443003
2016-09-15 04:52:21 -07:00
mtklein
c518a76105 Clean up unused SkPictureRecorder::optimizeFor()
Don't worry about the failing Shield bot... unrelated experiment.  It's failing at head.

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

NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2340133002
2016-09-15 04:43:03 -07:00
djsollen
14e7a602d0 Revert of Bundle common arguments to GrGradientEffect creation (patchset #2 id:20001 of https://codereview.chromium.org/2332213007/ )
Reason for revert:
This seems to be causing the autoroll into Chromium to fail.

https://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/69618/steps/compile/logs/stdio

Original issue's description:
> Bundle common arguments to GrGradientEffect creation
>
> I'm going to be adding more (to deal with color spaces), so trying to fix
> this before it gets out of control.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332213007
>
> Committed: https://skia.googlesource.com/skia/+/f605c16a030d791a37f589e6bddd7158ba5d62cd

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2343703003
2016-09-14 19:57:59 -07:00
fmalita
02526bd5aa Fix SkDrawTextBlobCommand null blob crash
After https://codereview.chromium.org/2335493005, we're moving the param
into a local field -> we should no longer access it.

TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344523003

Review-Url: https://codereview.chromium.org/2344523003
2016-09-14 14:55:59 -07:00
egdaniel
c19440dcaf Update GN droid script
Splits the pushes into different lines since old adbs cannot handle the one
line command

TBR=mtklein@google.com

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

Review-Url: https://codereview.chromium.org/2339293002
2016-09-14 14:42:03 -07:00
fmalita
e1baa7c105 [SVGDom] Expose intrinsic size info
* expose intrinsic size info on <svg> nodes.

  * tweak the SkSVGDOM constructor to no longer take an container size
    param, but instead default to intrinsic size
  * update clients to call SkSVGDOM::setContainerSize() explicitly, when
    needed

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345533002

Review-Url: https://codereview.chromium.org/2345533002
2016-09-14 12:04:30 -07:00
msarett
be362774f9 Don't let the compiler complain that |a| is uninit
TBR=mtklein@google.com
NOTRY=true
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339793003

Review-Url: https://codereview.chromium.org/2339793003
2016-09-14 11:53:50 -07:00
egdaniel
f6a97aec19 Disable ignore discard optimization in Vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2346553002

Review-Url: https://codereview.chromium.org/2346553002
2016-09-14 11:26:11 -07:00
mtklein
88e670ff6a CQ update
- swap the N5 experiment over to the new GN N5 bot

  - cut down on the Windows build duplication: the other two bots
    cover x86, x86-64, Release, Debug, _and_ Vulkan already.

  - remove the Release-Shared tester: I added this bot to act as a proxy
    for the also Shared-build Android bots, but 1) they're fast enough
    to no longer need a proxy (see N5 above) and 2) they're no longer
    Shared builds.  I intend to completely drop support for dm and
    nanobench in Shared builds, so this bot will not just drop from the
    CQ but completely disappear.

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

Review-Url: https://codereview.chromium.org/2346463002
2016-09-14 11:20:59 -07:00
mtklein
88a7ac0b2d GN: add is_official_build
... and use it to control debug symbols and SK_ALLOW_STATIC_GLOBAL_INITIALIZERS.

This will most directly have the effect of disabling GLProgramsTest and a bunch
of similar failing Vk tests on Android.

Hopefully this makes the N7 trybot go green, keeping the N5 trybot green.  Just running the N10 for fun.

(is_official_build is how Chrome terms this sort of ReleaseForReal build.)

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

Review-Url: https://codereview.chromium.org/2340723003
2016-09-14 11:16:49 -07:00
mtklein
7de2d40dcc merge run and check-rc steps
This'll make the 'dm' or 'nanobench' step go red like you'd hope.

The N5 should pass and the N10 and N7 should fail, showing us both sides.

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

Review-Url: https://codereview.chromium.org/2339713003
2016-09-14 11:15:54 -07:00
msarett
7bbda991af Store SkColorSpaceXform gamma LUTs in a malloced field
In order of likelihood:
(1) Tables are never used, since gamma is recognized and named.
(2) Only use one table, since all three gammas are the same.
(3) Actually need three tables.

No reason to waste a bunch of space for these tables on
SkColorSpaceXform, when it will likely be unused.

This will be more efficient in lots of cases, but is particularly
useful when the client really only wants a gamut xform.

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

Review-Url: https://codereview.chromium.org/2336913005
2016-09-14 11:02:04 -07:00
mtklein
896ddb706d 565 is not this important.
Reduce its testing and perfing to just the fast Linux bots,
and remove it from the default set of dm/nanobench configs.

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

Review-Url: https://codereview.chromium.org/2344553002
2016-09-14 10:33:13 -07:00
msarett
591971d02a Convert back to 0-255 scale before storing linear bytes
TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338203005

Review-Url: https://codereview.chromium.org/2338203005
2016-09-14 10:23:03 -07:00
fmalita
a17411f056 Improved optional command handling in SkParsePath::FromSVGString()
Repeating command letters are optional in SVG path data strings:
https://www.w3.org/TR/SVG/paths.html#PathData

FromSVGString() already supports this feature, but only checks for
scalars prefixes == (digit | '-' | '+').

A decimal point is also a valid scalar prefix though, so it should be
included in the test.

R=caryclark@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339813003

Review-Url: https://codereview.chromium.org/2339813003
2016-09-14 10:14:08 -07:00
brianosman
f605c16a03 Bundle common arguments to GrGradientEffect creation
I'm going to be adding more (to deal with color spaces), so trying to fix
this before it gets out of control.

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

Review-Url: https://codereview.chromium.org/2332213007
2016-09-14 10:03:46 -07:00
fmalita
95573e4865 Fix SVG flag iOS linking
TBR=mtklein@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344533002

Review-Url: https://codereview.chromium.org/2344533002
2016-09-14 09:05:43 -07:00
fmalita
6519c21a57 Nanobench SVG support
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339743002

Review-Url: https://codereview.chromium.org/2339743002
2016-09-14 08:05:17 -07:00
caryclark
eed356d281 Rewriting path writer
The path writer takes constructs the output path out of
curves that satisfy the pathop operation.

Curves contain lists of t/point pairs that may not be
comparable to each other. To match up curve ends in the
output path, look for adjacent curves to have a shared
membership rather than comparing point values.

Use path utilities to connect partial curve lists into
closed contours.

Share the angle code that determines if a curve has become
a degenerate line with the path writer.

Clean up some code on the way, and delete some unused
functions.

TBR=reed@google.com
BUG=5188
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321973005

Review-Url: https://codereview.chromium.org/2321973005
2016-09-14 07:18:20 -07:00
msarett
8bbcd5aab8 Reduce overhead for linear color xforms
We used to build src and dst transfer fn tables
every time a new xform was created with linear
src and dst.  Now we don't compute them because
we don't need them.

This will make SkColorSpaceXform a far better
option for any xforms with float or half-float
inputs or outputs, particularly on a small number
of pixels.

This CL also moves SkColorSpaceXform closer to
what I anticipate will be the eventual 'API design'.
I think apply() will want to take a SrcColorType enum
(not created yet because it's not necessary yet) and
a DstColorType enum (still using SkColorType because
there's not yet a reason not to).

Performance changes:
toSRGB  341us -> 366us
to2Dot2 404us -> 403us
toF16   318us -> 304us

There's no reason for toSRGB or to2Dot2 to change.
The refactor seems to have caused the compiler to
order the instructions a little differently...
This is something to come back to if we need to
squeeze more performance out of sRGB.  For now,
let's not be held up by something we don't control.

F16 likely improves because we are no longer
(unnecessarily) building the linear tables.

Code size gets a little bigger.  Measuring
SkColorSpaceXform size as a percentage of src/ size,
we go from 0.8% to 1.4%.

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

Review-Url: https://codereview.chromium.org/2335723002
2016-09-14 07:06:08 -07:00
jvanverth
c20c0c0925 Switch default for SkGaussianBlurShader radius size.
One step towards removing the 6.2 radius entirely.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333403002
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2333403002
2016-09-14 07:04:49 -07:00
mtklein
6ef6999017 GN: Android Vulkan support
Android's the easiest place to start supporting Vulkan, so it's up first.

ndk_api becomes user-specifiable so that the Vulkan bots can kick it up
to 24, the first release supporting Vulkan.  The defaults remain the same:
18 for 32-bit and 21 for 64-bit, the first release supporting 64-bit.

To test this, I set ndk_api=24 and skia_use_vulkan=true in GN, then
   $ ninja -C out dm; and droid out/dm --config vk --src gm

Seems to work!  Bot scripts to follow.

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

Review-Url: https://codereview.chromium.org/2336343002
2016-09-14 06:12:09 -07:00
mtklein
4ff7871ed3 update derive_compile_bot_name() for GN_Android_Vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2336233005

Review-Url: https://codereview.chromium.org/2336233005
2016-09-14 05:44:31 -07:00
mtklein
53c02e0156 Android GN scripts: distingush directories for data and binaries.
This enables data reuse, e.g. https://luci-milo.appspot.com/swarming/task/313eff129c753d10 or https://luci-milo.appspot.com/swarming/task/313f17a174c6c710

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

Review-Url: https://codereview.chromium.org/2335203004
2016-09-14 05:33:11 -07:00
reed
7e3ba9f88d change write-image to use pipeverbs like everyone else, and add test
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335973003

Review-Url: https://codereview.chromium.org/2335973003
2016-09-13 17:25:19 -07:00
mikejurka
21cc9950c4 re-add SkDebug_stdio for Fuchsia builds
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2331383004

Review-Url: https://codereview.chromium.org/2331383004
2016-09-13 16:15:03 -07:00
bungeman
0b7758236c Simulated fonts aren't TrueType fonts.
Some font back-ends provide simulated fonts such as fake bold or fake
oblique. These fonts should not be reported as TrueType, since the font
data isn't what is actually used to draw the glyphs.

BUG=chromium:639198
BUG=chromium:614612
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333423002

Review-Url: https://codereview.chromium.org/2333423002
2016-09-13 14:03:54 -07:00
fmalita
ceb93abddc [SVGDom] Linear gradient 'gradientTransform' support
R=stephana@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339533002

Review-Url: https://codereview.chromium.org/2339533002
2016-09-13 13:59:05 -07:00
mtklein
357f9d2032 Update gn_android_flavor for Vulkan.
C.f. https://codereview.chromium.org/2336343002 for basic GN support.

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

Review-Url: https://codereview.chromium.org/2333293004
2016-09-13 13:50:10 -07:00
jcgregorio
79d5a8921d No \n in bench names.
BUG=skia:
R=mtklein
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332153003

Review-Url: https://codereview.chromium.org/2332153003
2016-09-13 13:27:13 -07:00
mtklein
ea8b2b076c Android GN: don't reboot before running
We're already rebooting after running, so we should already be ready to go when the task starts.

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

Review-Url: https://codereview.chromium.org/2334223003
2016-09-13 13:13:54 -07:00
fmalita
cecd617a42 [SVGDom] Linear gradient 'spreadMethod' support
R=stephana@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337203002

Review-Url: https://codereview.chromium.org/2337203002
2016-09-13 12:56:11 -07:00
mtklein
649985a530 Remove clear /data/local/tmp steps.
These were intended to prevent GN and GYP Android bots from stomping on
each other.  Turns out, they don't, even without this... they're writing
most files to completely separate paths:
  - GYP puts most data under $EXTERNAL_STORAGE, generally /sdcard
    and its binaries (libdm.so, libnanobench.so, libskia.so, skia_launcher)
    in /data/local/tmp;
  - GN puts everything under /data/local/tmp, and its binaries (dm, nanobench)
    don't overlap GYP's.

So clearing /data/local/tmp was essentially just removing GN's data; GYP's
data file caching was never affected and can't conflict with GN's.

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

Review-Url: https://codereview.chromium.org/2340473002
2016-09-13 11:17:58 -07:00
csmartdalton
6270e558c3 Add ContextOptions field to SkCommandLineConfigGpu
Reduces duplicate code by computing the ContextOptions in one spot.

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

Review-Url: https://codereview.chromium.org/2337163002
2016-09-13 10:41:50 -07:00
fmalita
37283c28aa Use sk_sp text blob APIs
SkTextBlobBuilder::build()      -> make()
SkAutoTUnref<const SkTextBlob>  -> sk_sp<SkTextBlob>
drawTextBlob(const SkTextBlob*) -> drawTextBlob(const sk_sp<SkTextBlob>&)

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

Review-Url: https://codereview.chromium.org/2335493005
2016-09-13 10:00:23 -07:00
egdaniel
ec44099979 Lots of little cleanup improvements to Vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2336763002

Review-Url: https://codereview.chromium.org/2336763002
2016-09-13 09:54:11 -07:00