platform/upstream/libSkiaSharp.git
8 years agoSkShaper: optionally disable harfbuzz
halcanary [Wed, 3 Aug 2016 17:43:55 +0000 (10:43 -0700)]
SkShaper: optionally disable harfbuzz

also, re-enable warnings.

motivation:  used by me for PDF testing.

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

Review-Url: https://codereview.chromium.org/2201153002

8 years ago[Recipes] Move test and perf steps into test and perf recipes
borenet [Wed, 3 Aug 2016 17:38:44 +0000 (10:38 -0700)]
[Recipes] Move test and perf steps into test and perf recipes

This looks like another big change, but I really just moved blocks of code around.  Again, no expectations diffs because no behavior is changed.

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

Review-Url: https://codereview.chromium.org/2198973002

8 years ago[SVGDom] Initial SVGLength support
fmalita [Wed, 3 Aug 2016 17:21:11 +0000 (10:21 -0700)]
[SVGDom] Initial SVGLength support

Mostly plumb new length types, but also introduce a stateful parser,
rect shape and named color support.

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

Review-Url: https://codereview.chromium.org/2202053002

8 years agoFix fake_specs.py, update recipe expectation
borenet [Wed, 3 Aug 2016 17:10:07 +0000 (10:10 -0700)]
Fix fake_specs.py, update recipe expectation

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

Review-Url: https://codereview.chromium.org/2200763002

8 years agoFix dtor bug in SkLights
robertphillips [Wed, 3 Aug 2016 16:40:39 +0000 (09:40 -0700)]
Fix dtor bug in SkLights

The overriding problem was that the SkTDArray wasn't calling the SkLight destructors.

TBR=reed@google.com

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

Review-Url: https://codereview.chromium.org/2206823003

8 years agoGN: gpu support in tools
mtklein [Wed, 3 Aug 2016 15:28:20 +0000 (08:28 -0700)]
GN: gpu support in tools

If you want to try this out, the DOCS_PREVIEW link is a quickstart.

Are the GrGLCreateNativeInteface_* meant to be part of Skia-the-library
or just used by testing tools?  I've got it written here as tool-only,
but we could easily move it to libskia if it's a thing we want to ship.

I'm honestly not sure I understand how this linked before without a definition
of GrGLCreateNativeInterface().  Or are there two, one real and one no-op
default with some sort of weak linking setup?  dlopen()?

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201233003
DOCS_PREVIEW= https://skia.org/user/quick/gn?cl=2201233003

Review-Url: https://codereview.chromium.org/2201233003

8 years agoSK_GAMMA_SRGB is the default.
mtklein [Wed, 3 Aug 2016 15:28:15 +0000 (08:28 -0700)]
SK_GAMMA_SRGB is the default.

Looks like that other CL stuck just fine.

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

Review-Url: https://codereview.chromium.org/2207013002

8 years agoRe-organize Skia recipes
borenet [Wed, 3 Aug 2016 15:23:10 +0000 (08:23 -0700)]
Re-organize Skia recipes

Break Skia recipe module into:
  - skia_vars: defines and stores variables (eg. paths)
  - skia_step: utilities for running Skia steps
  - skia_flavor: flavor-specific stuff
  - skia: top-level setup, checkout, test/perf steps, etc etc

This establishes a saner dependency structure for the recipes; skia_vars
is at the bottom level, skia_step depends on it, skia_flavor depends on
both of them, skia depends on all of the above, and the recipes
themselves may depend on any or all of them.

Next steps:
  - Merge buildbot_spec into skia_vars
  - Move test_steps and perf_steps from skia recipe_module into
    swarm_test and swarm_perf recipes
  - Cleaner checkout_steps process

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

Review-Url: https://codereview.chromium.org/2198173002

8 years agoUpdate hardstop_gradients GM to include more special cases
fmenozzi [Wed, 3 Aug 2016 14:58:06 +0000 (07:58 -0700)]
Update hardstop_gradients GM to include more special cases

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

Review-Url: https://codereview.chromium.org/2204873005

8 years agoDon't leave fResScale uninitialized when constructing an SkStroke.
deanm [Wed, 3 Aug 2016 14:21:04 +0000 (07:21 -0700)]
Don't leave fResScale uninitialized when constructing an SkStroke.

Set a default value of 1.  Users can set it with setResScale, but it's better
that the constructor doesn't just leave the field uninitialized otherwise.

R=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2207753003

Review-Url: https://codereview.chromium.org/2207753003

8 years agoFix copy-paste bugs in SkCanvas Nine and Lattice
msarett [Wed, 3 Aug 2016 13:53:26 +0000 (06:53 -0700)]
Fix copy-paste bugs in SkCanvas Nine and Lattice

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

Review-Url: https://codereview.chromium.org/2203983002

8 years agoGN: add tests to DM
mtklein [Tue, 2 Aug 2016 23:02:05 +0000 (16:02 -0700)]
GN: add tests to DM

depends on https://codereview.chromium.org/2202203003 and https://codereview.chromium.org/2208433002

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-GN-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN-Trybot,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug-GN-Trybot,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN-Trybot,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-GN-Trybot,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN-Trybot

Review-Url: https://codereview.chromium.org/2203143002

8 years agoFixed ambient lighting calculations on SkLightingShader
dvonbeck [Tue, 2 Aug 2016 21:46:34 +0000 (14:46 -0700)]
Fixed ambient lighting calculations on SkLightingShader

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

Review-Url: https://codereview.chromium.org/2202233003

8 years agoMove off SK_SUPPORT_LEGACY_DATA_FACTORIES.
bungeman [Tue, 2 Aug 2016 21:40:46 +0000 (14:40 -0700)]
Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.

This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004

Review-Url: https://codereview.chromium.org/2206633004

8 years agoGN: get echo-headers sources via exec_script
mtklein [Tue, 2 Aug 2016 21:28:26 +0000 (14:28 -0700)]
GN: get echo-headers sources via exec_script

exec_script runs every time gn does, which is explicitly on every one of our
bot runs.  That should be enough to obviate the .git/logs/HEAD hack.

Easiest way to do this was to swap around find.py's argument order to allow
multiple search directories.  This is the root of all the .gyp changes.

This moves the blacklist into BUILD.gn, which I think is nice.
It expands it a little as we're now searching recursively, into include/gpu/vk
which we can't include safely without the Vulkan SDK.

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

Review-Url: https://codereview.chromium.org/2205903004

8 years agoDelete SkNinePatch
msarett [Tue, 2 Aug 2016 20:55:10 +0000 (13:55 -0700)]
Delete SkNinePatch

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

Review-Url: https://codereview.chromium.org/2206663002

8 years agoGN: re-run echo_headers if git state changes.
mtklein [Tue, 2 Aug 2016 20:05:54 +0000 (13:05 -0700)]
GN: re-run echo_headers if git state changes.

This should mean it re-runs if a header is added or removed.

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

Review-Url: https://codereview.chromium.org/2206683002

8 years agoDelete SkARGBImageEncoder.
mtklein [Tue, 2 Aug 2016 19:57:32 +0000 (12:57 -0700)]
Delete SkARGBImageEncoder.

It appears to be unused now except by its unit test, also deleted.

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

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

Review-Url: https://codereview.chromium.org/2208433002

8 years agonot much point to SK_SUPPORT_PDF
mtklein [Tue, 2 Aug 2016 19:20:36 +0000 (12:20 -0700)]
not much point to SK_SUPPORT_PDF

It only controls a few minor things in testing tools,
which can always assume PDF support is present.

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

Review-Url: https://codereview.chromium.org/2202203003

8 years agoRefactor of SkColorSpaceXformOpts
msarett [Tue, 2 Aug 2016 18:30:30 +0000 (11:30 -0700)]
Refactor of SkColorSpaceXformOpts

(1) Performance is better or stays the same.

(2) Code is split into functions (RasterPipeline-ish
    design).  IMO, it's not really more or less readable.
    But I think it's now much easier add capabilities,
    apply optimizations, or do more refactors.  Or to
    actually use RasterPipeline.  I help back from trying
    any of these to try to keep this CL sane.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194303002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2194303002

8 years agoRemove now unused source files.
bungeman [Tue, 2 Aug 2016 18:18:48 +0000 (11:18 -0700)]
Remove now unused source files.

These files have been renamed and exist only as stubs for transition
reasons. Remove these now unused stubs.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2197423003

8 years agogn: fix fiddle
mtklein [Tue, 2 Aug 2016 18:13:48 +0000 (11:13 -0700)]
gn: fix fiddle

  - __SK_FORCE_IMAGE_DECODER_LINKING makes sure the PNG encoder is linked
  - updated path to make working with sample draw.cpp easier.

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

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

Review-Url: https://codereview.chromium.org/2202353002

8 years agoRemove 'Ulta' width.
bungeman [Tue, 2 Aug 2016 17:43:29 +0000 (10:43 -0700)]
Remove 'Ulta' width.

All users of this old name appear to be updated.

TBR=reed
Removing unused and mis-spelled API.

Review-Url: https://codereview.chromium.org/2206453003

8 years agoAdd Overstroke gm
hstern [Tue, 2 Aug 2016 17:35:57 +0000 (10:35 -0700)]
Add Overstroke gm

Already exists as a sampleapp, but sampleapps don't get tested
automatically

BUG=skia:5405,5406,chrome:589769
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161633002

Review-Url: https://codereview.chromium.org/2161633002

8 years agoAdd code to lua paths to get the fill path and get lists of verbs and
hstern [Tue, 2 Aug 2016 16:17:59 +0000 (09:17 -0700)]
Add code to lua paths to get the fill path and get lists of verbs and
points

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

Review-Url: https://codereview.chromium.org/2199823002

8 years agoFix build_command_buffer for Windows
borenet [Tue, 2 Aug 2016 15:37:50 +0000 (08:37 -0700)]
Fix build_command_buffer for Windows

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

Review-Url: https://codereview.chromium.org/2207563002

8 years agoAdd drawImageLattice() and drawBitmapLattice() APIs
msarett [Tue, 2 Aug 2016 15:05:56 +0000 (08:05 -0700)]
Add drawImageLattice() and drawBitmapLattice() APIs

The specified image/bitmap is divided into rects, which
can be draw stretched, shrunk, or at a fixed size.  Will be
used by Android to draw 9patch (which are acutally N-patch)
images.

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

Review-Url: https://codereview.chromium.org/1992283002

8 years agoRename FontConfigInterface font manager files.
bungeman [Tue, 2 Aug 2016 14:07:33 +0000 (07:07 -0700)]
Rename FontConfigInterface font manager files.

These files are now so badly misnamed that it is causing problems.
The original files are kept as shells until Chromium and PDFium can
be updated. After Chromium and PDFium builds are updated, the old
files will be removed and the cmake and bzl builds will be updated.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199973002
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2199973002

8 years agoFix Chrome build for RecreateSKPs and CommandBuffer bots for GYP->GN
borenet [Tue, 2 Aug 2016 14:02:52 +0000 (07:02 -0700)]
Fix Chrome build for RecreateSKPs and CommandBuffer bots for GYP->GN

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

Review-Url: https://codereview.chromium.org/2199273002

8 years agoMore fixes for SwarmBucket
borenet [Tue, 2 Aug 2016 13:50:49 +0000 (06:50 -0700)]
More fixes for SwarmBucket

BUG=skia:5581
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202053005
NOTRY=true

Review-Url: https://codereview.chromium.org/2202053005

8 years agoAlways return ImageShader, even from SkShader::MakeBitmapShader
reed [Tue, 2 Aug 2016 13:12:06 +0000 (06:12 -0700)]
Always return ImageShader, even from SkShader::MakeBitmapShader

Lessons learned

1. ImageShader (correctly) always compresses (typically via PNG) during serialization. This has the surprise results of
- if the image was marked opaque, but has some non-opaque pixels (i.e. bug in blitter or caller), then compressing may "fix" those pixels, making the deserialized version draw differently. bug filed.
- 565 compressess/decompresses to 8888 (at least on Mac), which draws differently (esp. under some filters). bug filed.

2. BitmapShader did not enforce a copy for mutable bitmaps, but ImageShader does (since it creates an Image). Thus the former would see subsequent changes to the pixels after shader creation, while the latter does not, hence the change to the BlitRow test to avoid this modify-after-create pattern. I sure hope this prev. behavior was a bug/undefined-behavior, since this CL changes that.

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

Review-Url: https://codereview.chromium.org/2195893002

8 years agoRoll recipe DEPS
borenet [Tue, 2 Aug 2016 12:11:15 +0000 (05:11 -0700)]
Roll recipe DEPS

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

Review-Url: https://codereview.chromium.org/2205863002

8 years agoGN: add some missing SkCodec defines
mtklein [Mon, 1 Aug 2016 22:50:27 +0000 (15:50 -0700)]
GN: add some missing SkCodec defines

    TURBO_HAS_...
    WEBP_SWAP_16BIT_CSP

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

Review-Url: https://codereview.chromium.org/2196413003

8 years agoFix SkJpegCodec::onSkipScanlines when TURBO_HAS_SKIP is not defined
msarett [Mon, 1 Aug 2016 22:08:03 +0000 (15:08 -0700)]
Fix SkJpegCodec::onSkipScanlines when TURBO_HAS_SKIP is not defined

I think I just broke this in:
https://codereview.chromium.org/2174493002/

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

Review-Url: https://codereview.chromium.org/2202763002

8 years agoHide (mostly) unused SkColorSpace writeToICC() function
msarett [Mon, 1 Aug 2016 21:23:32 +0000 (14:23 -0700)]
Hide (mostly) unused SkColorSpace writeToICC() function

This originally was intended to be used for serialization, but
we've chosen another approach.

Includes a revert of:
https://codereview.chromium.org/2012133003/

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

Review-Url: https://codereview.chromium.org/2193223002

8 years agoSketch SkPictureRecorder::optimizeFor(GrContext*).
mtklein [Mon, 1 Aug 2016 20:17:47 +0000 (13:17 -0700)]
Sketch SkPictureRecorder::optimizeFor(GrContext*).

I'm open to API suggestions.
We can pass this in finishAs(), up front, whatever.

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

Review-Url: https://codereview.chromium.org/2203453002

8 years agoGN: use the correct fontconfig font mugger.
mtklein [Mon, 1 Aug 2016 20:08:46 +0000 (13:08 -0700)]
GN: use the correct fontconfig font mugger.

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

Review-Url: https://codereview.chromium.org/2202733002

8 years agoReplace 'Ulta' with 'Ultra'.
bungeman [Mon, 1 Aug 2016 19:37:13 +0000 (12:37 -0700)]
Replace 'Ulta' with 'Ultra'.

Start fixing a typo in an enum name.

TBR=reed
This is just a typo fix.

Review-Url: https://codereview.chromium.org/2202703002

8 years agoPick the right download tool for windows.
herb [Mon, 1 Aug 2016 19:26:51 +0000 (12:26 -0700)]
Pick the right download tool for windows.

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

Review-Url: https://codereview.chromium.org/2197423002

8 years agoAdded distance vector support for CircleGeometryProcessor
dvonbeck [Mon, 1 Aug 2016 18:37:45 +0000 (11:37 -0700)]
Added distance vector support for CircleGeometryProcessor

This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/

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

Committed: https://skia.googlesource.com/skia/+/779e1924eaf7c5652dee93e0e8e975bbf5723b37
Review-Url: https://codereview.chromium.org/2190023002

8 years agoimplement isABitmap for imageshader, return localmatrix for bitmap's impl
reed [Mon, 1 Aug 2016 18:24:14 +0000 (11:24 -0700)]
implement isABitmap for imageshader, return localmatrix for bitmap's impl

For imageshader, I only return true if the image is explicitly raster-backed. I do not return true for texture, nor for generator (i.e. lazy/picture) backed. Is that ok?

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

Review-Url: https://codereview.chromium.org/2197323002

8 years agoReplace old SkRecords RefBox with sk_sp.
mtklein [Mon, 1 Aug 2016 18:24:03 +0000 (11:24 -0700)]
Replace old SkRecords RefBox with sk_sp.

The main differences are that RefBox's constructor reffed and sk_sp's doesn't,
and that RefBox auto-casts to the underlying pointer while sk_sp doesn't.

I've added a bunch of sk_ref_sp() and .get() to compensate.

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

Review-Url: https://codereview.chromium.org/2197243003

8 years agomake an image from a mutable bitmap
reed [Mon, 1 Aug 2016 18:12:58 +0000 (11:12 -0700)]
make an image from a mutable bitmap

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

Review-Url: https://codereview.chromium.org/2199813002

8 years agoGrFP can express distance vector field req., program builder declares variable for it
dvonbeck [Mon, 1 Aug 2016 18:01:56 +0000 (11:01 -0700)]
GrFP can express distance vector field req.,  program builder declares variable for it

This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:

- from child FPs to their parent
- from parent FPs to the GrPaint
- from GrPaint through the PipelineBuilder into GrPipeline
- acessed from GrPipeline by GrGLSLProgramBuilder

GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.

This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002

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

Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196
Review-Url: https://codereview.chromium.org/2114993002

8 years agoGN: only include headers in echo_headers.py
mtklein [Mon, 1 Aug 2016 17:39:10 +0000 (10:39 -0700)]
GN: only include headers in echo_headers.py

This keeps things like VIM .swp files out of skia.h.

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

Review-Url: https://codereview.chromium.org/2202643002

8 years agoadding new GM to demostrate new shadows
vjiaoblack [Mon, 1 Aug 2016 17:02:31 +0000 (10:02 -0700)]
adding new GM to demostrate new shadows

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

Review-Url: https://codereview.chromium.org/2118553002

8 years agoAdd SkColorSpace::Equals() API
msarett [Mon, 1 Aug 2016 16:43:08 +0000 (09:43 -0700)]
Add SkColorSpace::Equals() API

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

Review-Url: https://codereview.chromium.org/2196743002

8 years agoDefault fake gamma to sRGB.
mtklein [Mon, 1 Aug 2016 16:22:12 +0000 (09:22 -0700)]
Default fake gamma to sRGB.

No one appears to be using the default 2.2.
This makes SK_GAMMA_SRGB the default / a no-op, which seems more realistic.

Chrome's explicitly setting SK_GAMMA_EXPONENT or SK_GAMMA_SRGB.
We set Android platform explicitly to 1.4.

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

Review-Url: https://codereview.chromium.org/2198073002

8 years agoGN: define fake-gamma configuration to match our bots.
mtklein [Mon, 1 Aug 2016 15:37:48 +0000 (08:37 -0700)]
GN: define fake-gamma configuration to match our bots.

This should fix many of the GN text diffs in Gold.

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

Review-Url: https://codereview.chromium.org/2195393002

8 years agoGN: Define SK_HAS_... in all Skia-private code, not just libskia.
mtklein [Mon, 1 Aug 2016 13:56:40 +0000 (06:56 -0700)]
GN: Define SK_HAS_... in all Skia-private code, not just libskia.

SkForceLinking wasn't force-linking the WEBP encoder, or any encoder.
(The others must be explicitly used.)

This should help the GN Debug Perf bots progress past

    Running Encode_color_wheel.jpg_WEBP nonrendering
    ../../../bench/EncoderBench.cpp:58: fatal error: "assert(data)"

On my laptop, a debug nanobench run now finishes.

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

Review-Url: https://codereview.chromium.org/2196243002

8 years agoRemove some ancillary users of SkSurface::MakeRenderTargetDirect
robertphillips [Mon, 1 Aug 2016 12:53:23 +0000 (05:53 -0700)]
Remove some ancillary users of SkSurface::MakeRenderTargetDirect

calved off of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect)

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

Review-Url: https://codereview.chromium.org/2198433003

8 years agoStop running nanobench on Test.*Debug bots
borenet [Mon, 1 Aug 2016 12:08:52 +0000 (05:08 -0700)]
Stop running nanobench on Test.*Debug bots

We'll need to add Perf.*Debug bots to achieve the same coverage.

BUG=skia:4768
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189393002
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2189393002

8 years agoRevert of GrFP can express distance vector field req., program builder declares...
mtklein [Sat, 30 Jul 2016 21:21:10 +0000 (14:21 -0700)]
Revert of GrFP can express distance vector field req.,  program builder declares variable for it (patchset #20 id:370001 of https://codereview.chromium.org/2114993002/ )

Reason for revert:
UBSAN says we're reading a bad bool here:
bool usesDistanceVectorField() const { return fUsesDistanceVectorField; }

../../../include/gpu/GrPaint.h:83:51: runtime error: load of value 239, which is not a valid value for type 'bool'
SUMMARY: AddressSanitizer: undefined-behavior ../../../include/gpu/GrPaint.h:83:51 in

Seems likely also the root of Valgrind failure:
https://luci-milo.appspot.com/swarming/task/30522e4f2241cb10

Original issue's description:
> GrFP can express distance vector field req.,  program builder declares variable for it
>
> This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:
>
> - from child FPs to their parent
> - from parent FPs to the GrPaint
> - from GrPaint through the PipelineBuilder into GrPipeline
> - acessed from GrPipeline by GrGLSLProgramBuilder
>
> GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.
>
> This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002
>
> Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196

TBR=egdaniel@google.com,robertphillips@google.com,bsalomon@google.com,dvonbeck@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2201613002

8 years agoRevert of Tidy up SkNx_neon. (patchset #3 id:40001 of https://codereview.chromium...
mtklein [Sat, 30 Jul 2016 21:18:49 +0000 (14:18 -0700)]
Revert of Tidy up SkNx_neon. (patchset #3 id:40001 of https://codereview.chromium.org/2196773002/ )

Reason for revert:
https://luci-milo.appspot.com/swarming/task/3055149a25621b10

Not Nexus 5 specific.   Reproduces on Pixel C with --gcc -t Debug -d arm_v7_neon.  Not sure about other configs yet.

Original issue's description:
> Tidy up SkNx_neon.
>
> This takes advantage of the fact that all the compilers we use that
> support NEON implement it with their own vector extensions.  This means
> normal things like c = a + b work on the underlying vector types already.
> Odd instructions like min or saturated add need to stay intrinsics.
>
> Also, rearrange functions to a more consistent order.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196773002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/6ad22315eb6eacfcd35497cd118440a619d05b18

TBR=msarett@google.com,mtklein@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2196953002

8 years agoRevert of Added distance vector support for CircleGeometryProcessor (patchset #4...
mtklein [Sat, 30 Jul 2016 20:31:52 +0000 (13:31 -0700)]
Revert of Added distance vector support for CircleGeometryProcessor (patchset #4 id:60001 of https://codereview.chromium.org/2190023002/ )

Reason for revert:
Reverting so I can revert https://codereview.chromium.org/2114993002/

Original issue's description:
> Added distance vector support for CircleGeometryProcessor
>
> This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002
>
> Committed: https://skia.googlesource.com/skia/+/779e1924eaf7c5652dee93e0e8e975bbf5723b37

TBR=egdaniel@google.com,robertphillips@google.com,dvonbeck@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2196053002

8 years agoDocs: ooops, debug is the default in GN.
mtklein [Sat, 30 Jul 2016 14:50:15 +0000 (07:50 -0700)]
Docs: ooops, debug is the default in GN.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195173002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2195173002

TBR=jcgregorio@google.com

Review-Url: https://codereview.chromium.org/2195173002

8 years agoSkRasterPipeline: new APIs for fusion
mtklein [Fri, 29 Jul 2016 21:27:41 +0000 (14:27 -0700)]
SkRasterPipeline: new APIs for fusion

Most visibly this adds a macro SK_RASTER_STAGE that cuts down on the boilerplate of defining a raster pipeline stage function.

Most interestingly, SK_RASTER_STAGE doesn't define a SkRasterPipeline::Fn, but rather a new type EasyFn.  This function is always static and inlined, and the details of interacting with the SkRasterPipeline::Stage are taken care of for you: ctx is just passed as a void*, and st->next() is always called.  All EasyFns have to do is take care of the meat of the work: update r,g,b, etc. and read and write from their context.

The really neat new feature here is that you can either add EasyFns to a pipeline with the new append() functions, _or_ call them directly yourself.  This lets you use the same set of pieces to build either a pipelined version of the function or a custom, fused version.  The bench shows this off.

On my desktop, the pipeline version of the bench takes about 25% more time to run than the fused one.

The old approach to creating stages still works fine.  I haven't updated SkXfermode.cpp or SkArithmeticMode.cpp because they seemed just as clear using Fn directly as they would have using EasyFn.

If this looks okay to you I will rework the comments in SkRasterPipeline to explain SK_RASTER_STAGE and EasyFn a bit as I've done here in the CL description.

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

Review-Url: https://codereview.chromium.org/2195853002

8 years agosimplify neon shifts
mtklein [Fri, 29 Jul 2016 19:28:43 +0000 (12:28 -0700)]
simplify neon shifts

These still generate vshr/vshl with immediates with both GCC and Clang.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194953002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Based on https://codereview.chromium.org/2196773002

Review-Url: https://codereview.chromium.org/2194953002

8 years agoIf scissor would be empty in GrClipMaskManager::SetupClipping indicate draw can be...
bsalomon [Fri, 29 Jul 2016 19:24:29 +0000 (12:24 -0700)]
If scissor would be empty in GrClipMaskManager::SetupClipping indicate draw can be skipped.

BUG=chromium:632185
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196803002

Review-Url: https://codereview.chromium.org/2196803002

8 years agoAdd ES 3.0 fallback for instanced rendering
csmartdalton [Fri, 29 Jul 2016 19:19:28 +0000 (12:19 -0700)]
Add ES 3.0 fallback for instanced rendering

Adds the ability for GLInstancedRendering to use
glDrawElementsInstanced when glDrawElementsIndirect is not supported.

The only remaining 3.1 dependency now is EXT_texture_buffer.

Also moves the cap for glDraw*Instanced out of GrCaps and into
GrGLCaps.

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

Review-Url: https://codereview.chromium.org/2193303002

8 years agoFix vulkan build
egdaniel [Fri, 29 Jul 2016 18:47:58 +0000 (11:47 -0700)]
Fix vulkan build

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193883002

Review-Url: https://codereview.chromium.org/2193883002

8 years agoAdded distance vector support for CircleGeometryProcessor
dvonbeck [Fri, 29 Jul 2016 18:11:51 +0000 (11:11 -0700)]
Added distance vector support for CircleGeometryProcessor

This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/

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

Review-Url: https://codereview.chromium.org/2190023002

8 years agoTidy up SkNx_neon.
mtklein [Fri, 29 Jul 2016 18:11:12 +0000 (11:11 -0700)]
Tidy up SkNx_neon.

This takes advantage of the fact that all the compilers we use that
support NEON implement it with their own vector extensions.  This means
normal things like c = a + b work on the underlying vector types already.
Odd instructions like min or saturated add need to stay intrinsics.

Also, rearrange functions to a more consistent order.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196773002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2196773002

8 years agoperf: Upload results to gs://skia-perf, not gs://chromium-skia-gm.
jcgregorio [Fri, 29 Jul 2016 17:54:30 +0000 (10:54 -0700)]
perf: Upload results to gs://skia-perf, not gs://chromium-skia-gm.

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

Review-Url: https://codereview.chromium.org/2197643002

8 years agoConditionally define SK_SUPPORT_LEGACY_DATA_FACTORIES.
bungeman [Fri, 29 Jul 2016 17:47:45 +0000 (10:47 -0700)]
Conditionally define SK_SUPPORT_LEGACY_DATA_FACTORIES.

In order to remove this define it will first need to be defined in
Chromium. However, doing so causes redefinition warnings as errors.
Only define this macro if it is not already defined to avoid this.

TBR=reed
This doesn't change any API.

Review-Url: https://codereview.chromium.org/2198453002

8 years agoProperly recycle uniform buffers in vulkan
egdaniel [Fri, 29 Jul 2016 17:46:06 +0000 (10:46 -0700)]
Properly recycle uniform buffers in vulkan

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

Review-Url: https://codereview.chromium.org/2195713002

8 years agoAdd some GN builders to the CQ.
mtklein [Fri, 29 Jul 2016 17:41:37 +0000 (10:41 -0700)]
Add some GN builders to the CQ.

This parallels the set of bots we use to gate commits already.

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

Review-Url: https://codereview.chromium.org/2189283003

8 years agoSkPDF: PDFStream has-a not is-a PDFDict
halcanary [Fri, 29 Jul 2016 17:13:18 +0000 (10:13 -0700)]
SkPDF: PDFStream has-a not is-a PDFDict

Motivation:
SkPDFStream and SkPDFSharedStream now work the same.

Also:
- move SkPDFStream into SkPDFTypes (it's a fundamental PDF type).
- minor refactor of SkPDFSharedStream
- SkPDFSharedStream takes unique_ptr to represent ownership

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

Review-Url: https://codereview.chromium.org/2190883003

8 years agoSkNx: add Sk4u
mtklein [Fri, 29 Jul 2016 17:10:15 +0000 (10:10 -0700)]
SkNx: add Sk4u

This lets us get at logical >> in a nicely principled way.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197683002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2197683002

8 years agoGrFP can express distance vector field req., program builder declares variable for it
dvonbeck [Fri, 29 Jul 2016 16:53:56 +0000 (09:53 -0700)]
GrFP can express distance vector field req.,  program builder declares variable for it

This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:

- from child FPs to their parent
- from parent FPs to the GrPaint
- from GrPaint through the PipelineBuilder into GrPipeline
- acessed from GrPipeline by GrGLSLProgramBuilder

GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.

This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002

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

Review-Url: https://codereview.chromium.org/2114993002

8 years agoGN: components as static library instead of source set
mtklein [Fri, 29 Jul 2016 16:10:31 +0000 (09:10 -0700)]
GN: components as static library instead of source set

This also puts the .a in the top-level of the ouptut directory, just
like we do for .so files.  It's less required than for .sos, but it
does make it easier to find the .a.

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

Review-Url: https://codereview.chromium.org/2197633002

8 years agoFix various SkColorSpace bugs
msarett [Fri, 29 Jul 2016 15:58:33 +0000 (08:58 -0700)]
Fix various SkColorSpace bugs

(1) Fixes serialization/deserialization of wacky SkColorSpaces
(2) Fix gamma equals checking

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

Review-Url: https://codereview.chromium.org/2194903002

8 years agoUse HashSet instead of Dynamic hash for tracking vulkan resources
egdaniel [Fri, 29 Jul 2016 15:55:53 +0000 (08:55 -0700)]
Use HashSet instead of Dynamic hash for tracking vulkan resources

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

Review-Url: https://codereview.chromium.org/2194823003

8 years ago[SVGDom] Parse style attributes
fmalita [Fri, 29 Jul 2016 15:52:03 +0000 (08:52 -0700)]
[SVGDom] Parse style attributes

Dispatch style-encoded (style="foo: bar; ...") attributes via normal
attribute setters.

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

Review-Url: https://codereview.chromium.org/2193663002

8 years agoSkPDF: flip saveLayer rightside up
halcanary [Fri, 29 Jul 2016 15:41:33 +0000 (08:41 -0700)]
SkPDF: flip saveLayer rightside up

Broken in https://skia.googlesource.com/skia/+/4b1e17e

BUG=632574
TBR=tomhudson@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197623002

Review-Url: https://codereview.chromium.org/2197623002

8 years agoGN: quick doc
mtklein [Fri, 29 Jul 2016 15:35:54 +0000 (08:35 -0700)]
GN: quick doc

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2192203002
NOTRY=true
DOCS_PREVIEW= https://skia.org/user/quick/gn?cl=2192203002

Review-Url: https://codereview.chromium.org/2192203002

8 years agoRemove GrContext::applyGamma
robertphillips [Fri, 29 Jul 2016 15:28:25 +0000 (08:28 -0700)]
Remove GrContext::applyGamma
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191323002

Review-Url: https://codereview.chromium.org/2191323002

8 years agoAdd test configs for instanced rendering
csmartdalton [Fri, 29 Jul 2016 15:14:20 +0000 (08:14 -0700)]
Add test configs for instanced rendering

Adds the following configs and enables them on select bots:

  glinst, glinst4, glinstdit4, glinst16, glinstdit16,
  esinst, esinst4, esinstdit4

Makes general changes to GrContextOptions, GrCaps, etc. to facilitate
this.

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

Review-Url: https://codereview.chromium.org/2182783004

8 years agoMerge ProgramDesc's for GL and Vulkan
egdaniel [Fri, 29 Jul 2016 14:36:52 +0000 (07:36 -0700)]
Merge ProgramDesc's for GL and Vulkan

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

Review-Url: https://codereview.chromium.org/2184413002

8 years agoAdd color space xform support to SkJpegCodec (includes F16!)
msarett [Fri, 29 Jul 2016 13:23:33 +0000 (06:23 -0700)]
Add color space xform support to SkJpegCodec (includes F16!)

Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA

Instead of:
RGBA->SkPMColor

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b
Review-Url: https://codereview.chromium.org/2174493002

8 years agoGN: ccache+clang needs -Qunused-arguments
mtklein [Fri, 29 Jul 2016 13:03:52 +0000 (06:03 -0700)]
GN: ccache+clang needs -Qunused-arguments

An alternative is to define CCACHE_CPP2, but
I thought I'd try this more visible way first.

(CCACHE_CPP2 may turn out to be required anyway
if we start seeing warnings about tautological compares.)

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

TBR=jcgregorio@google.com
NOTRY=true

Review-Url: https://codereview.chromium.org/2193203002

8 years agoGN: Always quote cc and cxx.
mtklein [Fri, 29 Jul 2016 12:39:35 +0000 (05:39 -0700)]
GN: Always quote cc and cxx.

To fix:
    ERROR at the command-line "--args":1:34: Unexpected token '+'
    is_debug=true cc=clang cxx=clang++

TBR=jcgregorio@google.com
NOTRY=true

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

Review-Url: https://codereview.chromium.org/2193593003

8 years agoGN: use ccache if available and the requested compiler.
mtklein [Fri, 29 Jul 2016 12:07:39 +0000 (05:07 -0700)]
GN: use ccache if available and the requested compiler.

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

Review-Url: https://codereview.chromium.org/2186553006

8 years agoAdd another GM to skip in serialize mode.
mtklein [Fri, 29 Jul 2016 02:14:07 +0000 (19:14 -0700)]
Add another GM to skip in serialize mode.

See https://luci-milo.appspot.com/swarming/task/304ced7bada3b310/steps/dm/0/stdout

Also update .json.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-Trybot

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

Review-Url: https://codereview.chromium.org/2196543002

8 years agoRevert of Add color space xform support to SkJpegCodec (includes F16!) (patchset...
msarett [Fri, 29 Jul 2016 00:11:18 +0000 (17:11 -0700)]
Revert of Add color space xform support to SkJpegCodec (includes F16!) (patchset #9 id:260001 of https://codereview.chromium.org/2174493002/ )

Reason for revert:
Breaking MSAN

Original issue's description:
> Add color space xform support to SkJpegCodec (includes F16!)
>
> Also changes SkColorXform to support:
> RGBA->RGBA
> RGBA->BGRA
>
> Instead of:
> RGBA->SkPMColor
>
> TBR=reed@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b

TBR=mtklein@google.com,reed@google.com,herb@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/2195523002

8 years agoRemove use of MakeRenderTargetDirect from view system
robertphillips [Thu, 28 Jul 2016 22:17:34 +0000 (15:17 -0700)]
Remove use of MakeRenderTargetDirect from view system

Here is the CL that sent me down the SkGammaColorFilter path

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

Review-Url: https://codereview.chromium.org/2178353005

8 years agoUpdate public.bzl based on internal cl/128616707.
benjaminwagner [Thu, 28 Jul 2016 22:12:21 +0000 (15:12 -0700)]
Update public.bzl based on internal cl/128616707.

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

Review-Url: https://codereview.chromium.org/2186373002

8 years agoAdd color space xform support to SkJpegCodec (includes F16!)
msarett [Thu, 28 Jul 2016 22:06:16 +0000 (15:06 -0700)]
Add color space xform support to SkJpegCodec (includes F16!)

Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA

Instead of:
RGBA->SkPMColor

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2174493002

8 years agoMake coverage.py optional for dm and nanobench _flags.py
mtklein [Thu, 28 Jul 2016 21:58:07 +0000 (14:58 -0700)]
Make coverage.py optional for dm and nanobench _flags.py

It is better to test partially than not test at all.

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

Review-Url: https://codereview.chromium.org/2184423002

8 years agoSilence -Wclobbered in each file that needs it.
mtklein [Thu, 28 Jul 2016 21:45:28 +0000 (14:45 -0700)]
Silence -Wclobbered in each file that needs it.

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

Committed: https://skia.googlesource.com/skia/+/03f704a343d7a82974f977eda8789a8c721c93e5

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86-Release-Trybot

Review-Url: https://codereview.chromium.org/2184823009

8 years agoSkPDF: drawText makes use of SkPaint.measureText() for alignment.
halcanary [Thu, 28 Jul 2016 21:33:13 +0000 (14:33 -0700)]
SkPDF: drawText makes use of SkPaint.measureText() for alignment.

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

Review-Url: https://codereview.chromium.org/2188303003

8 years agoturn bitmaps into images during recording
reed [Thu, 28 Jul 2016 21:26:13 +0000 (14:26 -0700)]
turn bitmaps into images during recording

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

Review-Url: https://codereview.chromium.org/2185563003

8 years agoGN: nanobench
mtklein [Thu, 28 Jul 2016 21:17:33 +0000 (14:17 -0700)]
GN: nanobench

Add nanobench, and while we're at it monobench to show off how cool
source_sets are... the bench files are only built once then linked
into both binaries.  With GYP we build them twice. :/  Same deal
for GMs between nanobench and DM... build once, link twice.

nanobench uses SkImageEncoder to encode its .pngs, which requires
we link in the image encoders, which requires we get them all in.
That's the bulk of this.

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

Review-Url: https://codereview.chromium.org/2193513002

8 years agoRevert of Silence -Wclobbered in each file that needs it. (patchset #2 id:20001 of...
mtklein [Thu, 28 Jul 2016 20:59:59 +0000 (13:59 -0700)]
Revert of Silence -Wclobbered in each file that needs it. (patchset #2 id:20001 of https://codereview.chromium.org/2184823009/ )

Reason for revert:
Jpeg strategy seems to be leading to crashes.  Gonna go back to warning squelch.

Original issue's description:
> Silence -Wclobbered in each file that needs it.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184823009
>
> Committed: https://skia.googlesource.com/skia/+/03f704a343d7a82974f977eda8789a8c721c93e5

TBR=msarett@google.com,mtklein@chromium.org
# 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/2188313003

8 years agoSerialize SkColorSpace into DeferredTextureImage
bsalomon [Thu, 28 Jul 2016 20:37:31 +0000 (13:37 -0700)]
Serialize SkColorSpace into DeferredTextureImage

This fixes a memory leak that occurs when DeferredTextureImage is deallocated without being destroyed. It is intended to be stored in discarable memory and thus this has to be safe.

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

Review-Url: https://codereview.chromium.org/2184823010

8 years agoSilence -Wclobbered in each file that needs it.
mtklein [Thu, 28 Jul 2016 18:57:30 +0000 (11:57 -0700)]
Silence -Wclobbered in each file that needs it.

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

Review-Url: https://codereview.chromium.org/2184823009

8 years agoFix expectations for GN bot.
jcgregorio [Thu, 28 Jul 2016 18:55:51 +0000 (11:55 -0700)]
Fix expectations for GN bot.

BUG=skia:

Review-Url: https://codereview.chromium.org/2191933002

8 years agoRemove unused render target members from GL and VK sk_app::WindowContext classes
bsalomon [Thu, 28 Jul 2016 18:49:12 +0000 (11:49 -0700)]
Remove unused render target members from GL and VK sk_app::WindowContext classes
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191673002

Review-Url: https://codereview.chromium.org/2191673002

8 years agoInclude NVPR configs in dm runs on TegraX1
csmartdalton [Thu, 28 Jul 2016 18:48:13 +0000 (11:48 -0700)]
Include NVPR configs in dm runs on TegraX1

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

Review-Url: https://codereview.chromium.org/2174353008

8 years agoGN: add abbreviated versions of the command line as descriptions.
mtklein [Thu, 28 Jul 2016 18:42:34 +0000 (11:42 -0700)]
GN: add abbreviated versions of the command line as descriptions.

This should help make the bot logs a little easier to read.  (On the console
this wasn't much of a big deal, as Ninja auto-abbreviates when printing to an
interactive console.)

As usual, Ninja will print the full command when a task fails.

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

Review-Url: https://codereview.chromium.org/2188263002