platform/upstream/libSkiaSharp.git
7 years agoRm makeRenderTargetContext in favor of deferred version (take 3)
Robert Phillips [Mon, 24 Apr 2017 14:57:28 +0000 (10:57 -0400)]
Rm makeRenderTargetContext in favor of deferred version (take 3)

This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version)

TBR=bsalomon@google.com

Change-Id: If81f4d9fb889c091cd37ffde133d906fb3e37773
Reviewed-on: https://skia-review.googlesource.com/14027
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoAdd new GrVkBackendContext::Create explicitly requiring vk proc getters
Brian Salomon [Mon, 24 Apr 2017 20:49:05 +0000 (16:49 -0400)]
Add new GrVkBackendContext::Create explicitly requiring vk proc getters

Also remove the feature of GrVkGpu that creates the instance/device if the client doesn't provide one.

Change-Id: Ie617313b6c684ed355333a475b80d0aae7e3a026
Reviewed-on: https://skia-review.googlesource.com/14261
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years ago[recipes] Fix *_VERSION step failure handling
Eric Boren [Mon, 24 Apr 2017 19:59:55 +0000 (15:59 -0400)]
[recipes] Fix *_VERSION step failure handling

Bug: skia:6473
Change-Id: I2fa6f800f59f40f74b5c080c52cdec3a32329ef7
NOTRY=true
Reviewed-on: https://skia-review.googlesource.com/14240
Commit-Queue: Stephan Altmueller <stephana@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
7 years agoSimplify SkImageCacherator slightly
Brian Osman [Mon, 24 Apr 2017 20:44:03 +0000 (16:44 -0400)]
Simplify SkImageCacherator slightly

- lockAsBitmap supported reading back textures to a bitmap, but this was
  only used by one GM. Removed all of that code, and merged the two bitmap
  functions together.
- To make the GM cleaner, don't use SkImageCacherator directly - construct
  actual images.

Bug: skia:
Change-Id: Iad17184a02a72f89ccc851fa158764d6c871befa
Reviewed-on: https://skia-review.googlesource.com/14192
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoOnly respect version 1 gasp tables for symmetric.
Ben Wagner [Mon, 24 Apr 2017 16:40:03 +0000 (12:40 -0400)]
Only respect version 1 gasp tables for symmetric.

When determining whether or not to use symmetric rendering,
only look at the gasp table if it's version 1.

Change-Id: Ib64ec1853545eb2c467a9e280d9e00f51e8b0aa8
Reviewed-on: https://skia-review.googlesource.com/13863
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Dominik Röttsches <drott@google.com>
7 years ago[recipes] Add env recipe module
Eric Boren [Mon, 24 Apr 2017 17:22:56 +0000 (13:22 -0400)]
[recipes] Add env recipe module

Simplifies the process of nesting environments. Usage:

with api.env({'myvar': 'myval'}):
  # do stuff

Same as api.step.context but specialized for just environment and merges
PATH variable intelligently.

Bug: skia:6473
Change-Id: I5769c69cbbbcdab0c6298cee6c5e1fe9caf89c78
Reviewed-on: https://skia-review.googlesource.com/14189
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoRevert "Split up opLists (take 2)"
Robert Phillips [Mon, 24 Apr 2017 16:27:17 +0000 (16:27 +0000)]
Revert "Split up opLists (take 2)"

This reverts commit df2bf213649e0b2bcb9402548af9976bbdf7a218.

Reason for revert: Maybe AndroidOne timing out

Original change's description:
> Split up opLists (take 2)
>
> Reland of: https://skia-review.googlesource.com/c/11581/ (Split up opLists)
>
> https://skia-review.googlesource.com/c/13860/ (Make InstancedRendering more opList-splitting friendly) has landed so this should be good for another attempt.
>
> Change-Id: Icc9998196587510328e0a9ca1b2ce42013a86c6c
> Reviewed-on: https://skia-review.googlesource.com/13802
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I744f2a3145b294e5911862bb39d57ca33a1b9a5a
Reviewed-on: https://skia-review.googlesource.com/14184
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRemove a print statement I meant to not check in
Leon Scroggins III [Mon, 24 Apr 2017 15:16:04 +0000 (11:16 -0400)]
Remove a print statement I meant to not check in

TBR=msarett@google.com

Change-Id: I8861e7b0c7e7135c872cbcd5a9b53531acdb30dd
Reviewed-on: https://skia-review.googlesource.com/14181
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoFix decoding incomplete PNG images
Leon Scroggins III [Mon, 24 Apr 2017 13:32:50 +0000 (09:32 -0400)]
Fix decoding incomplete PNG images

If process_data is unable to read (and therefore process) as many bytes
as it expects, process the bytes read before returning false.

Fixes differences in Gold.

Add a test that verifies that it is okay to call png_process_data with
0 bytes. (We could special case 0, but libpng already checks for 0.)

Change-Id: Id500b9305ee3bb6a1a7e8fc70d4e723cb4742b55
Reviewed-on: https://skia-review.googlesource.com/14144
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoSplit up opLists (take 2)
Robert Phillips [Mon, 24 Apr 2017 12:39:40 +0000 (08:39 -0400)]
Split up opLists (take 2)

Reland of: https://skia-review.googlesource.com/c/11581/ (Split up opLists)

https://skia-review.googlesource.com/c/13860/ (Make InstancedRendering more opList-splitting friendly) has landed so this should be good for another attempt.

Change-Id: Icc9998196587510328e0a9ca1b2ce42013a86c6c
Reviewed-on: https://skia-review.googlesource.com/13802
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoFix spelling of SkImageGenerator in comment
Brian Osman [Mon, 24 Apr 2017 13:30:24 +0000 (09:30 -0400)]
Fix spelling of SkImageGenerator in comment

Bug: skia:
Change-Id: Ibc6698b4db8aabeb14224d2c3ec8412f7ecfecb9
Reviewed-on: https://skia-review.googlesource.com/14146
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRemove two more gpu headers from include/*
Robert Phillips [Mon, 24 Apr 2017 12:13:59 +0000 (08:13 -0400)]
Remove two more gpu headers from include/*

This is probably it until GrTexture.h can be hidden.

TBR=bsalomon@google.com

Change-Id: Ie743c937f72aa0dc9f5e84def572f655f0abe041
Reviewed-on: https://skia-review.googlesource.com/14143
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoMake InstancedRendering more opList-splitting friendly
Robert Phillips [Mon, 24 Apr 2017 11:31:02 +0000 (07:31 -0400)]
Make InstancedRendering more opList-splitting friendly

This CL splits the InstancedRendering class into an allocator and a per-opList op tracker. This was done because we need to allocate the InstancedRendering ops before we know the final destination opList. The InstancedRendering ops are now still all allocated from the same pool but the tracking and execution is done per opList.

Change-Id: Ieddabb6f85f8f187c5e7373f7f6cb155d69a9685
Reviewed-on: https://skia-review.googlesource.com/13860
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoUpdate SKP version
UpdateSKPs [Sun, 23 Apr 2017 05:48:11 +0000 (05:48 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: Ie0b0d646d4bb7f9ec085d0621cf71cb371d5eaf3
Reviewed-on: https://skia-review.googlesource.com/14160
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agojumper, maybe we can just use constants
Mike Klein [Fri, 21 Apr 2017 14:30:29 +0000 (10:30 -0400)]
jumper, maybe we can just use constants

As long as everything is laid out the same way they were originally, I don't
think there's any reason we can't just use %rip-relative addressing on x86-64.
Basically, we just need to keep all the sections together in order.

Somewhat subtly we cannot just use -D to disassemble all sections.  -D will
double-disassemble[1] some bytes, which throws off our %rip-relative addressing
of constants.  You can see this in PS1.  So we whitelist sections instead.

[1], from man objdump:
   This option also has a subtle effect on the disassembly of instructions in code
   sections.  When option -d is in effect objdump will assume that any symbols
   present in a code section occur on the boundary between instructions and it will
   refuse to disassemble across such a boundary.  When option -D is in effect however
   this assumption is supressed.  This means that it is possible for the output of -d
   and -D to differ if, for example, data is stored in code sections.

Change-Id: Idbcfe08e67113b3f7d75749931c640ff90aa0bf4
Reviewed-on: https://skia-review.googlesource.com/14029
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoReland "Make SkPngCodec only read as much of the stream as necessary"
Leon Scroggins III [Fri, 21 Apr 2017 17:47:12 +0000 (13:47 -0400)]
Reland "Make SkPngCodec only read as much of the stream as necessary"

(Originally uploaded as 13900.)

Previously, SkPngCodec assumed that the stream only contained one
image, which ended at the end of the stream. It read the stream in
arbitrarily-sized chunks, and then passed that data to libpng for
processing.

If a stream contains more than one image, this may result in reading
beyond the end of the image, making future reads read the wrong data.

Now, SkPngCodec starts by reading 8 bytes at a time. After the
signature, 8 bytes is enough to know which chunk is next and how many
bytes are in the chunk.

When decoding the size, we stop when we reach IDAT, and when decoding
the image, we stop when we reach IEND.

This manual parsing is necessary to support APNG, which is planned in
the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
was a workaround for reading more than necessary at the beginning of
the image.

Add a test that simulates the issue, by decoding a special stream that
reports an error if the codec attempts to read beyond the end.

Temporarily disable the partial decoding tests for png. A larger change
will be necessary to get those working again, and no clients are
currently relying on incrementally decoding PNGs (i.e. decode part of
an image, then decode further with more data).

Include a workaround for older versions of libpng (e.g. 1.2 in
Google3). In older versions, if the row callback is null when the
IDAT header is processed, reading the image will fail. When we see the
IDAT, we save the length and process a recreated IDAT header later,
after the row callback has been set.

Bug: skia:5368
Bug:b/34073812
Test: Existing tests, plus a new test in dm.

Change-Id: I293a4ddc013b82669a8b735062228b26d0bce933
Reviewed-on: https://skia-review.googlesource.com/13984
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoSkip running the 10k shape benchmarks on Radeon ANGLE bots
Brian Osman [Fri, 21 Apr 2017 19:38:27 +0000 (15:38 -0400)]
Skip running the 10k shape benchmarks on Radeon ANGLE bots

These are slow enough that they sometimes trigger GPU timeout.

Bug: skia:6534
Change-Id: Ie16a533e5ae132599d6514ae15a22d4fce4cb0fd
Reviewed-on: https://skia-review.googlesource.com/14064
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agomakeColorSpace() for SkColorFilterShader and SkLightingShader
Matt Sarett [Thu, 20 Apr 2017 14:09:23 +0000 (10:09 -0400)]
makeColorSpace() for SkColorFilterShader and SkLightingShader

Fixes 4 gms in gbr-8888 config.

Bug: skia:6516
Change-Id: I9da839eb0211910989be35db0e13c0e1bbfa185d
Reviewed-on: https://skia-review.googlesource.com/13964
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoAdd SkPictureShader::makeColorSpace()
Matt Sarett [Fri, 21 Apr 2017 19:12:34 +0000 (15:12 -0400)]
Add SkPictureShader::makeColorSpace()

Also adds an SkColorSpace to the BitmapShader
cache key (that should have been there already).

This fixes 3 gms in gbr-8888 config.

Bug: skia:
Change-Id: If47dfcdbd99b4caaeee4eddbe5ff1cd042ea9d02
Reviewed-on: https://skia-review.googlesource.com/13976
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoEnable fence sync support in ES3 test contexts
Brian Osman [Fri, 21 Apr 2017 19:12:30 +0000 (15:12 -0400)]
Enable fence sync support in ES3 test contexts

This (only?) affects ANGLE. Other ES platforms typically go through
EGLGLTestContext, which manually instantiates an EGLFenceSync.

In general, though, ES3 requires this API, so this is safe. Should give us
more accurate (and much less spammy) output from ES3 ANGLE performance
testing.

Bug: skia:
Change-Id: I10a608d21092aaffa4ab76e4b3d2f6e9c5cf09bb
Reviewed-on: https://skia-review.googlesource.com/14063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoUse dstColorSpace in SkPictureShader cache key
Matt Sarett [Fri, 21 Apr 2017 19:06:51 +0000 (15:06 -0400)]
Use dstColorSpace in SkPictureShader cache key

Starting with the bug fix + test.

Broken off of:
https://skia-review.googlesource.com/c/13976

Bug: skia:
Change-Id: If6c28e2dfb0c5340c48e943d0313a9ea9515a6c3
Reviewed-on: https://skia-review.googlesource.com/14061
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agolong live SkJumper
Mike Klein [Fri, 21 Apr 2017 18:08:08 +0000 (14:08 -0400)]
long live SkJumper

Change-Id: I5de3c8daae80e437b3553ab6afcee7120a1bb775
Reviewed-on: https://skia-review.googlesource.com/14038
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agokill off shader_adapter
Mike Klein [Fri, 21 Apr 2017 16:39:08 +0000 (12:39 -0400)]
kill off shader_adapter

I still plan to replace this more thoroughly with a different blitter,
but for now just implement it using callback.

This is the last stage not supported by SkJumper!  Will follow up by
removing all of SkRasterPipeline_opts.h and anything that indicates
SkJumper might not work.

Change-Id: I96ba2bb0a26266f3b658e5f3153ec7d5bbd46799
Reviewed-on: https://skia-review.googlesource.com/14037
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoMove ReleaseProc info to GrTexture and for implementations to define it.
Greg Daniel [Fri, 21 Apr 2017 15:52:27 +0000 (11:52 -0400)]
Move ReleaseProc info to GrTexture and for implementations to define it.

Bug: skia:
Change-Id: I0dbe421ebd17ef7d21fd2f4f027d2a3bdcf04b7b
Reviewed-on: https://skia-review.googlesource.com/14031
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agojumper, implement 2.2 stages with approx_powf
Mike Klein [Fri, 21 Apr 2017 16:05:01 +0000 (12:05 -0400)]
jumper, implement 2.2 stages with approx_powf

My main interest is getting rid of weird code, but it's also faster.
The new bench drops from 667 to 412.

Change-Id: Ibf889601284cf925780320c828394f79937dc705
Reviewed-on: https://skia-review.googlesource.com/14035
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove more headers from include/gpu
Robert Phillips [Fri, 21 Apr 2017 16:24:00 +0000 (12:24 -0400)]
Remove more headers from include/gpu

TBR=bsalomon@google.com

Change-Id: I93b28cfcb4d7b50c12e24ea81faab680bccce9ef
Reviewed-on: https://skia-review.googlesource.com/14036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoInfra: Enable cross-repo tryjobs
Eric Boren [Fri, 21 Apr 2017 13:37:37 +0000 (09:37 -0400)]
Infra: Enable cross-repo tryjobs

Bug: skia:
Change-Id: I560eb00b4b19643346b038822869e5bc77ce1454
Reviewed-on: https://skia-review.googlesource.com/13652
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoUpdate mesa drivers to 17.04
Kevin Lubick [Fri, 21 Apr 2017 15:25:13 +0000 (11:25 -0400)]
Update mesa drivers to 17.04

Bug: skia:
NOTRY=true
Change-Id: I19b8e8d126df7580aed689af9155a34781baa8d5
Reviewed-on: https://skia-review.googlesource.com/14032
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agojumper, lab_to_xyz
Mike Klein [Thu, 20 Apr 2017 15:04:29 +0000 (11:04 -0400)]
jumper, lab_to_xyz

I don't suppose you know any existing test coverage of this?
I can't seem to trigger any...

Change-Id: I7244053e2fb665888c9443d2bc52c5a23725ec53
Reviewed-on: https://skia-review.googlesource.com/13970
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoSkColorSpaceXformCanvas: Use when drawing picture images
Matt Sarett [Fri, 21 Apr 2017 15:42:00 +0000 (11:42 -0400)]
SkColorSpaceXformCanvas: Use when drawing picture images

The new code path is triggered by SkImage::makeColorSpace()
when the image is picture backed.

Fixes 3 gms in gbr-8888 config.

Bug: skia:6516
Change-Id: I397903eb0f926834efd277f30265339518777920
Reviewed-on: https://skia-review.googlesource.com/14034
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRemove all headers from include/gpu/effects
Robert Phillips [Thu, 20 Apr 2017 21:20:24 +0000 (17:20 -0400)]
Remove all headers from include/gpu/effects

TBR=bsalomon@google.com

Change-Id: I9ad2fa41262693b3a83bef625eac332eb1e71a3d
Reviewed-on: https://skia-review.googlesource.com/13988
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agojumper, rework callback a bit, use it for color_lookup_table
Mike Klein [Thu, 20 Apr 2017 20:21:57 +0000 (16:21 -0400)]
jumper, rework callback a bit, use it for color_lookup_table

Looks like the color-space images have this well tested (even without
lab_to_xyz) and the diffs look like rounding/FMA.

The old plan to keep loads and stores outside callback was:
  1) awkward, with too many pointers and pointers to pointers to track
  2) misguided... load and store stages march ahead by x,
     working at ptr+0, ptr+8, ptr+16, etc. while callback
     always wants to be working at the same spot in the buffer.

I spent a frustrating day in lldb to understood 2).  :/

So now the stage always store4's its pixels to a buffer in the context
before the callback, and when the callback returns it load4's them back
from a pointer in the context, defaulting to that same buffer.

Instead of passing a void* into the callback, we pass the context
itself.  This lets us subclass the context and add our own data...
C-compatible object-oriented programming.

Change-Id: I7a03439b3abd2efb000a6973631a9336452e9a43
Reviewed-on: https://skia-review.googlesource.com/13985
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoCircular shadow fixes for Flutter.
Jim Van Verth [Thu, 20 Apr 2017 19:48:37 +0000 (15:48 -0400)]
Circular shadow fixes for Flutter.

* Fix spot shadow placement for SkSpotShadowMaskFilter.
* Make sure we don't try to render an oval as a plain RRect
  due to floating point error.
* Use fast path for uncached circles.
* Make sure ShadowMaskFilters can handle near-circles.

Change-Id: Ia9967a00a6e1c980a1c0a7ba8248f09fde61a3b7
Reviewed-on: https://skia-review.googlesource.com/13969
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoDocumentation: site/user/api/canvas updated
Hal Canary [Wed, 19 Apr 2017 20:21:51 +0000 (16:21 -0400)]
Documentation: site/user/api/canvas updated

BUG=skia:6523
NOTRY=true
Change-Id: I1fed8c65ba55c00f5045e56a23cbcf72d676e8d5
Reviewed-on: https://skia-review.googlesource.com/13873
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agofixed 0 - x in skslc
Ethan Nicholas [Fri, 21 Apr 2017 14:23:37 +0000 (10:23 -0400)]
fixed 0 - x in skslc

Bug: skia:
Change-Id: Ib9bd6bdd8f339e5395157532f68bb12f5ccb4a02
Reviewed-on: https://skia-review.googlesource.com/14030
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoFix reflected ovals.
Jim Van Verth [Thu, 20 Apr 2017 21:25:26 +0000 (17:25 -0400)]
Fix reflected ovals.

Addresses an issue with ovals transformed by a matrix with a reflection.
Also adds a further check for circles to ensure that teeny tiny ovals
(sizes < SK_ScalarNearlyZero) aren't treated as circles.

Change-Id: Ie50e4a98365eba7c23e53e68886ebac981ed1def
Reviewed-on: https://skia-review.googlesource.com/13989
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoRevert "Rm makeRenderTargetContext in favor of deferred version (take 2)"
Robert Phillips [Fri, 21 Apr 2017 12:28:48 +0000 (12:28 +0000)]
Revert "Rm makeRenderTargetContext in favor of deferred version (take 2)"

This reverts commit 02242e82e4bf94a8f6862dadb5bf347ea5e31eb5.

Reason for revert: Maybe breaking Chrome DEPS roll

Original change's description:
> Rm makeRenderTargetContext in favor of deferred version (take 2)
>
> This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version)
>
> Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919
> Reviewed-on: https://skia-review.googlesource.com/13196
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2607116ed743f5d313da4a7b7f056776ed907702
Reviewed-on: https://skia-review.googlesource.com/14024
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRm makeRenderTargetContext in favor of deferred version (take 2)
Robert Phillips [Thu, 20 Apr 2017 17:30:34 +0000 (13:30 -0400)]
Rm makeRenderTargetContext in favor of deferred version (take 2)

This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version)

Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919
Reviewed-on: https://skia-review.googlesource.com/13196
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoImproved skslc optimizer, particularly around vectors.
Ethan Nicholas [Thu, 20 Apr 2017 23:31:52 +0000 (19:31 -0400)]
Improved skslc optimizer, particularly around vectors.

BUG=skia:

Change-Id: Idb364d9198f2ff84aad1eb68e236fb45ec1c86b7
Reviewed-on: https://skia-review.googlesource.com/8000
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoDisable use of directly wrapping msaa RTs on Vulkan
Greg Daniel [Thu, 20 Apr 2017 18:07:46 +0000 (14:07 -0400)]
Disable use of directly wrapping msaa RTs on Vulkan

Currently the Vulkan backend is set up to always treat the "resolve"
target as the main VkImage in a render target and the msaa is a side cart
image. This makes it difficult to just wrap an msaa image that we don't own.
However, unlike GL the equivalent FBO 0 will never be multisampled so there
isn't much use for the functionality. Once we find a need for it we can find
a way to refactor to make it work.

Bug: skia:
Change-Id: I121e9c72a70c2a6f1aaddba2dbae19d8bddc3998
Reviewed-on: https://skia-review.googlesource.com/13980
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoPromote S6 Job to CQ, demote N5 Job to experimental
Kevin Lubick [Thu, 20 Apr 2017 19:04:17 +0000 (15:04 -0400)]
Promote S6 Job to CQ, demote N5 Job to experimental

Galaxy S6 was way quicker on average: 19 min vs 33 min
https://docs.google.com/spreadsheets/d/1tO1YA3RL36FBGgrfpV-cr1v9srFMowBtlwywSG0frYI/edit#gid=0

We'll only keep the Nexus 5 on for a few weeks, in case we decide to go back.

Bug: skia:
NOTRY=true
Change-Id: I36cc617d4ea274bfaf5b54e9c6d73715d40d65a8

Change-Id: I36cc617d4ea274bfaf5b54e9c6d73715d40d65a8
Reviewed-on: https://skia-review.googlesource.com/13982
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRename SkImage_Generator to SkImage_Lazy
Brian Osman [Thu, 20 Apr 2017 17:43:23 +0000 (13:43 -0400)]
Rename SkImage_Generator to SkImage_Lazy

This removes a long-standing source of confusion: SkImage_Generator was an
image that wrapped an SkImageGenerator (with an SkImageCacherator stuck in
the middle). We could choose to rename either one, but SkImageGenerator is
public, so take the easy road and rename the private image subclass. Given
the existence of SkImage::isLazyGenerated, this name seems appropriate.

Bug: skia:
Change-Id: I061ece94f48538efb1dc5548010f6ca7d438a69b
Reviewed-on: https://skia-review.googlesource.com/13979
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRevert "Revert "Plumb GrBackendTexture throughout skia.""
Greg Daniel [Thu, 20 Apr 2017 16:41:55 +0000 (16:41 +0000)]
Revert "Revert "Plumb GrBackendTexture throughout skia.""

This reverts commit 7fa5c31c2c9af834bee66d5fcf476e250076c8d6.

Reason for revert: Relanding this change now that other fixes have landed.

Original change's description:
> Revert "Plumb GrBackendTexture throughout skia."
>
> This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12.
>
> Reason for revert: fix android roll
>
> Original change's description:
> > Plumb GrBackendTexture throughout skia.
> >
> > Bug: skia:
> > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> > Reviewed-on: https://skia-review.googlesource.com/13645
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
> Reviewed-on: https://skia-review.googlesource.com/13773
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,stani@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2
Reviewed-on: https://skia-review.googlesource.com/13975
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoAdd abandoned GPU check to createTextureProxy
Robert Phillips [Thu, 20 Apr 2017 14:19:33 +0000 (10:19 -0400)]
Add abandoned GPU check to createTextureProxy

I'm guessing the crash is actually on the first 'fGpu' reference in createTextureProxy after the GPU context has been abandoned.

Bug: 712929
Change-Id: Ia6742da7073c2320e592b42fcf2d0e7c04eeefb9
Reviewed-on: https://skia-review.googlesource.com/13966
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoremove vestigle code for lockpixels
Mike Reed [Thu, 20 Apr 2017 14:32:02 +0000 (10:32 -0400)]
remove vestigle code for lockpixels

Bug: skia:6481
Change-Id: Icfd53981b8588fbea74fca2e3be58bc6f13ef923
Reviewed-on: https://skia-review.googlesource.com/13968
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert "jumper, disable u16 table load stages"
Mike Klein [Thu, 20 Apr 2017 14:31:20 +0000 (14:31 +0000)]
Revert "jumper, disable u16 table load stages"

This reverts commit edec99b640a7a9dbc7d4fd9f48d35ed3a54c61e3.

Reason for revert: should be good to try again.

Original change's description:
> jumper, disable u16 table load stages
>
> Bug: b/37433905
>
> Change-Id: I829d76967f9da162388bad3f6bc2484d2a28043d
> Reviewed-on: https://skia-review.googlesource.com/13771
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Matt Sarett <msarett@google.com>
>

TBR=mtklein@chromium.org,msarett@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I173bc284f894eae969bf670735e3bd723605df80
Reviewed-on: https://skia-review.googlesource.com/13967
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Make SkPngCodec only read as much of the stream as necessary"
Leon Scroggins [Thu, 20 Apr 2017 15:06:53 +0000 (15:06 +0000)]
Revert "Make SkPngCodec only read as much of the stream as necessary"

This reverts commit 2c65d5161260f3d45a63dcd92229bd09c8a12d53.

Reason for revert: Causing failures in Google3 (https://test.corp.google.com/ui#cl=153703311&flags=CAMQAg==&id=OCL:153703311:BASE:153703364:1492695824938:4db2240d&t=//chrome/skia/dm_wrapper:dm_wrapper) and differences in Gold. This change was not intended to change the output.

Original change's description:
> Make SkPngCodec only read as much of the stream as necessary
>
> Previously, SkPngCodec assumed that the stream only contained one
> image, which ended at the end of the stream. It read the stream in
> arbitrarily-sized chunks, and then passed that data to libpng for
> processing.
>
> If a stream contains more than one image, this may result in reading
> beyond the end of the image, making future reads read the wrong data.
>
> Now, SkPngCodec starts by reading 8 bytes at a time. After the
> signature, 8 bytes is enough to know which chunk is next and how many
> bytes are in the chunk.
>
> When decoding the size, we stop when we reach IDAT, and when decoding
> the image, we stop when we reach IEND.
>
> This manual parsing is necessary to support APNG, which is planned in
> the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
> was a workaround for reading more than necessary at the beginning of
> the image.
>
> Add a test that simulates the issue, by decoding a special stream that
> reports an error if the codec attempts to read beyond the end.
>
> Temporarily disable the partial decoding tests for png. A larger change
> will be necessary to get those working again, and no clients are
> currently relying on incrementally decoding PNGs (i.e. decode part of
> an image, then decode further with more data).
>
> Bug: skia:5368
> BUG:34073812
>
> Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d
> Reviewed-on: https://skia-review.googlesource.com/13900
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2f82e9960dda7bf5c646774df84320dadb7b930e
Reviewed-on: https://skia-review.googlesource.com/13971
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoRemove all config conversion modes except round-to-nearest
Brian Osman [Thu, 20 Apr 2017 14:24:36 +0000 (10:24 -0400)]
Remove all config conversion modes except round-to-nearest

On all GPUs where we can perfectly round-trip, this mode does so.
This mode fails on Mali 400 and Tegra 3, but nothing works there.

Bug: skia:
Change-Id: Ifb045fc772a5b1c03b51b5cb2ae039fe792d17bb
Reviewed-on: https://skia-review.googlesource.com/13271
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agocalculate cull rects for SkMiniPictures
Mike Klein [Mon, 10 Apr 2017 13:50:25 +0000 (09:50 -0400)]
calculate cull rects for SkMiniPictures

This is the other half of https://skia-review.googlesource.com/c/7874/,
adding the cull-shrinking feature of SkBigPictures to SkMiniPictures.

Like SkBigPictures, shrink only when we're asked to build an R-tree.
(We don't actually build a tree for one rect, of course.)

We could do unconditionally, but SkPictureImageFilter uses the cull rect
as its crop.  It's unclear to me what this image filter unit test I've
changed here was intending... had it had two draws we would have shrunk
its cull, but because it was hitting the 1-draw SkMiniPicture path it
kept the larger user-supplied cull.

As the test doesn't appear to have been written with cull shrinking in
mind, I've removed its SkRTreeFactory to keep that feature explicitly
disabled there.

BUG=skia:5974

Change-Id: I4118d2e85f2a69adef2e7a7fa9b9b8c17607a94f
Reviewed-on: https://skia-review.googlesource.com/12624
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agomore symmetry for from_half/to_half
Mike Klein [Thu, 20 Apr 2017 13:11:53 +0000 (09:11 -0400)]
more symmetry for from_half/to_half

Tweaks to make the parallels between from_half and to_half stand out.

We can logically do the `auto denorm = em < ...;` comparisons as either
U32 or I32.  U32 would read more naturally, but we do I32 because some
instruction sets have direct signed comparison but must synthesize an
unsigned comparison.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: Ic74fe5b3b850f5bb7fd00fd4435bc32b8628eecd
Reviewed-on: https://skia-review.googlesource.com/13963
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agorectangle texture scaling is now handled in skslc
Ethan Nicholas [Wed, 19 Apr 2017 19:54:07 +0000 (15:54 -0400)]
rectangle texture scaling is now handled in skslc

Bug: skia:
Change-Id: I658a95576143d69656cd63aec44ff65d430d332f
Reviewed-on: https://skia-review.googlesource.com/13813
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoRemove incorrect assert
Brian Osman [Thu, 20 Apr 2017 13:14:38 +0000 (09:14 -0400)]
Remove incorrect assert

We only need to verify that we've tested the PM conversion if we're about
to use GrConfigConversionEffect. For the else case, no such guarantee is
made, so the assert is wrong.

Bug: chromium:713462
Change-Id: I5ffcc0c5f7de4e9614e9ccd83140acc9ab4f7283
Reviewed-on: https://skia-review.googlesource.com/13962
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoMake SkPngCodec only read as much of the stream as necessary
Leon Scroggins III [Thu, 20 Apr 2017 13:07:10 +0000 (09:07 -0400)]
Make SkPngCodec only read as much of the stream as necessary

Previously, SkPngCodec assumed that the stream only contained one
image, which ended at the end of the stream. It read the stream in
arbitrarily-sized chunks, and then passed that data to libpng for
processing.

If a stream contains more than one image, this may result in reading
beyond the end of the image, making future reads read the wrong data.

Now, SkPngCodec starts by reading 8 bytes at a time. After the
signature, 8 bytes is enough to know which chunk is next and how many
bytes are in the chunk.

When decoding the size, we stop when we reach IDAT, and when decoding
the image, we stop when we reach IEND.

This manual parsing is necessary to support APNG, which is planned in
the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
was a workaround for reading more than necessary at the beginning of
the image.

Add a test that simulates the issue, by decoding a special stream that
reports an error if the codec attempts to read beyond the end.

Temporarily disable the partial decoding tests for png. A larger change
will be necessary to get those working again, and no clients are
currently relying on incrementally decoding PNGs (i.e. decode part of
an image, then decode further with more data).

Bug: skia:5368
BUG:34073812

Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d
Reviewed-on: https://skia-review.googlesource.com/13900
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoCheck-in vulkan.h into third_party and use that instead of local sdk vulkan.h
Greg Daniel [Wed, 19 Apr 2017 20:39:45 +0000 (16:39 -0400)]
Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h

This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agotest and fix f16<->f32 conversion stages
Mike Klein [Wed, 19 Apr 2017 21:19:30 +0000 (17:19 -0400)]
test and fix f16<->f32 conversion stages

This refactors from_half() and to_half() a bit, totally
reimplementing the non-hardware cases to be more clearly correct.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: I439463cf90935c5e8fe2369cbcf45e07f3af62c7
Reviewed-on: https://skia-review.googlesource.com/13921
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoremove dead code around SK_SUPPORT_LEGACY_CANVAS_READPIXELS
Mike Reed [Thu, 20 Apr 2017 09:40:39 +0000 (05:40 -0400)]
remove dead code around SK_SUPPORT_LEGACY_CANVAS_READPIXELS

Bug: skia:6513
Change-Id: I8e4e0ffb371ae5b1af972110339e57d491ad9ff1
Reviewed-on: https://skia-review.googlesource.com/13779
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agorefactor approx_{log2,pow2,powf}
Mike Klein [Wed, 19 Apr 2017 18:33:58 +0000 (14:33 -0400)]
refactor approx_{log2,pow2,powf}

    - Move to SkJumper_vectors.h
    - Fold the -127 and +2.774485010.
    - approx_powf(F,F) instead of approx_powf(F,float) for consistency.
    - A little layout reformatting.

Change-Id: If9cb3d62a097cb6ecf89f157a1dde672c1516371
Reviewed-on: https://skia-review.googlesource.com/13865
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove SkOpTAllocator
Herb Derby [Wed, 19 Apr 2017 19:09:48 +0000 (15:09 -0400)]
Remove SkOpTAllocator

Have the callsites of SkOpTAllocator call SkArenaAlloc directly.

Bug: skia:
Change-Id: Ic54e92c3e9a0abed038aa3ae40e8a195895af99d
Reviewed-on: https://skia-review.googlesource.com/13870
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoFix spacing style
Chris Blume [Wed, 19 Apr 2017 19:40:46 +0000 (12:40 -0700)]
Fix spacing style

Change-Id: I525277c89466f1d30e651c5ef3ac4198021e0bff
Reviewed-on: https://skia-review.googlesource.com/13830
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoUpdate ProxyTest to skip configs that don't support the requested sample counts
Greg Daniel [Wed, 19 Apr 2017 19:27:54 +0000 (15:27 -0400)]
Update ProxyTest to skip configs that don't support the requested sample counts

Bug: skia:
Change-Id: I806dc153b8b6cf6dd6b74549905990cadb55daab
Reviewed-on: https://skia-review.googlesource.com/13871
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoRecipes: remove some pragma: no cover
Eric Boren [Wed, 19 Apr 2017 18:39:21 +0000 (14:39 -0400)]
Recipes: remove some pragma: no cover

These are the remaining instances, and they're harder to deal with:
$ git grep pragma
recipe_modules/swarming/api.py:    except self.m.step.StepFailure as e:  # pragma: no cover
recipe_modules/swarming/api.py:      if len(ids) > 1:  # pragma: nocover
recipes/ct_skps.py:  if api.path.exists(version_file):  # pragma: nocover
recipes/ct_skps.py:  if api.path.exists(blacklist_file):  # pragma: nocover
recipes/upload_nano_results.py:  if len(results) != 1:  # pragma: nocover

Bug: skia:6473
Change-Id: If75e2ffcf39a944b513b9005bbc4bd9c4fb031f6
Reviewed-on: https://skia-review.googlesource.com/13867
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years ago[fiddle] Add simple animation support.
Joe Gregorio [Wed, 19 Apr 2017 18:05:14 +0000 (14:05 -0400)]
[fiddle] Add simple animation support.

BUG=skia:

Change-Id: I6453afb1fe18e210d3c505b56777b8b19501ca2f
Reviewed-on: https://skia-review.googlesource.com/13810
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoReland Recipes: Use strict coverage, part 2
Eric Boren [Wed, 19 Apr 2017 17:36:00 +0000 (13:36 -0400)]
Reland Recipes: Use strict coverage, part 2

Bug: skia:6473
Change-Id: I90c1c3a3108ce583df60933150d97b426173a315
Reviewed-on: https://skia-review.googlesource.com/13840
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoDisable multisampling on Vulkan Nexus Player bot
Greg Daniel [Wed, 19 Apr 2017 17:01:22 +0000 (13:01 -0400)]
Disable multisampling on Vulkan Nexus Player bot

Bug: skia:
Change-Id: Ic0dcca7a5dd21f1bfd1e40c78f98ac4c9f7e9ee5
Reviewed-on: https://skia-review.googlesource.com/13815
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agojumper, parametric_{r,g,b,a}
Mike Klein [Mon, 17 Apr 2017 23:32:05 +0000 (19:32 -0400)]
jumper, parametric_{r,g,b,a}

I've tried a couple of ideas for approx_powf():
   1) accumulate integer powers of x, then 4th roots, then 16th roots
   2) continue 1) all the way to 256th roots
   3) decompose into pow2 and log2, exploiting IEEE float layout
   4) slightly tune constants used in 3)
   5) accumulate integer powers of x, then 3+4) with different tuning
   6) follow a source online, basically 5 with finesse
   7) a new source quoting and improving on the method in 6).

7) seems perfect, enough that maybe we can explore improving its speed
at cost of precision.  Might be nice to get rid of those divides.  If we
allow a small tolerance (2-5) in our tests, we could use the very simple
fast forms from 3) (e.g. PS 5).  I wish I had some images to look at!

Anything involving roots seems to be subverted by poor rsqrt precision.

This change of course affects the pipelines created by the tests for
exponential and full parametric gamma curves.  What's less obvious is
that it also means SkJumper can now for the first time run the pipeline
created by the mixed gamma curves test.  This means we now need to relax
our tolerance for the table-based channel, just like we did when
implementing table_{r,g,b,a}.

This took me an embarassingly long time to figure out.  *face palm*

Change-Id: I451ee3c970a0a4a4e285f8aa8f6ef709a654d247
Reviewed-on: https://skia-review.googlesource.com/13656
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoadd unit tests for parametric_* stages
Mike Klein [Wed, 19 Apr 2017 16:40:52 +0000 (12:40 -0400)]
add unit tests for parametric_* stages

Change-Id: I7fab6d1c7240c17f2cc8436e8c6e7c8d2df940bb
Reviewed-on: https://skia-review.googlesource.com/13814
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoFix SkATan2_255 fuzzer crash
Florin Malita [Tue, 18 Apr 2017 17:47:15 +0000 (13:47 -0400)]
Fix SkATan2_255 fuzzer crash

Test for degenerate values after computing the ratio, instead of
attempting to catch all tricky cases upfront.

BUG=skia:6511

Change-Id: I8e3421675994dd68a1eff1af3f1456917dd1f9e1
Reviewed-on: https://skia-review.googlesource.com/13726
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoRevert "Recipes: Use strict coverage, part 2"
Eric Boren [Wed, 19 Apr 2017 17:23:31 +0000 (17:23 +0000)]
Revert "Recipes: Use strict coverage, part 2"

This reverts commit 4dbc9cead90eb31756a1c1bf61ea01f223c5fe96.

Reason for revert: flaky?

Original change's description:
> Recipes: Use strict coverage, part 2
>
> Bug: skia:6473
> Change-Id: Ia3a1587215a6a868c9577f2d864bc5c4e671a3fa
> Reviewed-on: https://skia-review.googlesource.com/13812
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>
>

TBR=borenet@google.com,rmistry@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Id746de56609fbaf5ec8ecdd22b5e60bcb3c01fa2
Reviewed-on: https://skia-review.googlesource.com/13819
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoSkColorSpaceXformer: Add SkShader::makeColorSpace()
Matt Sarett [Tue, 18 Apr 2017 22:29:12 +0000 (18:29 -0400)]
SkColorSpaceXformer: Add SkShader::makeColorSpace()

Just a refactor - reimplements the shader xforms with makeColorSpace().

11 gms have diffs.  Some are down to floating precision.  The old
implementation would go float->fixed->float in some cases.  Others
are due to improvements with gradient shaders inside local matrix
shaders.

Bug: skia:6516
Change-Id: I424406990c5c58a47833cf4c9ef146cd3ea6c37e
Reviewed-on: https://skia-review.googlesource.com/13769
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRecipes: Use strict coverage, part 2
Eric Boren [Wed, 19 Apr 2017 15:27:53 +0000 (11:27 -0400)]
Recipes: Use strict coverage, part 2

Bug: skia:6473
Change-Id: Ia3a1587215a6a868c9577f2d864bc5c4e671a3fa
Reviewed-on: https://skia-review.googlesource.com/13812
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoFix tasks.json and the infra bot
Eric Boren [Wed, 19 Apr 2017 14:58:22 +0000 (10:58 -0400)]
Fix tasks.json and the infra bot

Diffs caused by a collision between two CLs:

https://skia-review.googlesource.com/c/13597/
https://skia-review.googlesource.com/c/13770/

Bug: skia:
Change-Id: I1173560148e54a273df2ce16bcd8365557938873
Reviewed-on: https://skia-review.googlesource.com/13808
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoUpdate blacklist for Iris 540 Vulkan to exclude new test
Brian Osman [Wed, 19 Apr 2017 14:51:39 +0000 (10:51 -0400)]
Update blacklist for Iris 540 Vulkan to exclude new test

This test is very similar to the existing WritePixels_Gpu test, which
was blacklisted for failing in the same way.

Bug: skia:
Change-Id: Id8e4253e030e01e215f161f81969764bc8364352
Reviewed-on: https://skia-review.googlesource.com/13809
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRevert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
Greg Daniel [Wed, 19 Apr 2017 14:44:33 +0000 (14:44 +0000)]
Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"

This reverts commit 3a3bc42b7d5b9d996debab1d2a05d2137c875bd7.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
>
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
>
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
>
> This is a reupload of CL: https://skia-review.googlesource.com/13651
>
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
>

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoCheck-in vulkan.h into third_party and use that instead of local sdk vulkan.h
Greg Daniel [Wed, 19 Apr 2017 13:28:13 +0000 (09:28 -0400)]
Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h

This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoRevert "remove legacy flags from google3"
Mike Reed [Wed, 19 Apr 2017 11:47:11 +0000 (11:47 +0000)]
Revert "remove legacy flags from google3"

This reverts commit d71730accb629f8c67de58c277fc6bc94f8fc222.

Reason for revert: broke g3, have fix underway

Original change's description:
> remove legacy flags from google3
>
> Bug: skia:6481,skia:6513
> Change-Id: I3aac61df1252c16d1b7b8b4d78955da9accc464e
> Reviewed-on: https://skia-review.googlesource.com/13777
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iccb1721e0d2a0724f6bb503abcb4360727a78f90
Reviewed-on: https://skia-review.googlesource.com/13801
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRecipes: Use strict coverage, part 1
Eric Boren [Tue, 18 Apr 2017 19:49:27 +0000 (15:49 -0400)]
Recipes: Use strict coverage, part 1

Shouldn't change any behavior.

Bug: skia:
Change-Id: I953e0da886a6d61096eba7915101f245a6cec741
Reviewed-on: https://skia-review.googlesource.com/13765
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoRevert "Roll recipe dependencies (nontrivial)."
Eric Boren [Wed, 19 Apr 2017 11:12:20 +0000 (11:12 +0000)]
Revert "Roll recipe dependencies (nontrivial)."

This reverts commit 6bc873f0be2c3351d34d92e85910ed7fab7a6bce.

Reason for revert: Broke CT SKPs bots

Original change's description:
> Roll recipe dependencies (nontrivial).
>
> This is an automated CL created by the recipe roller. This CL rolls recipe
> changes from upstream projects (e.g. depot_tools) into downstream projects
> (e.g. tools/build).
>
>
> Please review the expectation changes, and LGTM+CQ.
>
>
> More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
> build:
>   https://crrev.com/06e6b3accc66f6c31053055c8e0efcd978f18b03 Implement a generic postprocess/merge hook for swarming tasks. (RELAND 4) (jbudorick@chromium.org)
>
>
> Change-Id: Ib62301f7336873f022cd5a7efe8df577c1414689
> Recipe-Tryjob-Bypass-Reason: Autoroller
> Bugdroid-Send-Email: False
> Reviewed-on: https://skia-review.googlesource.com/13775
> Commit-Queue: Eric Boren <borenet@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>
>

TBR=borenet@google.com,rmistry@google.com,recipe-roller@chromium.org,reviews@skia.org,iannucci@google.com,jbudorick@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I534dfb1d9adbb57ccafa1c1306b852106a7f8c31
Reviewed-on: https://skia-review.googlesource.com/13778
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoremove legacy flags from google3
Mike Reed [Wed, 19 Apr 2017 10:57:48 +0000 (06:57 -0400)]
remove legacy flags from google3

Bug: skia:6481,skia:6513
Change-Id: I3aac61df1252c16d1b7b8b4d78955da9accc464e
Reviewed-on: https://skia-review.googlesource.com/13777
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRoll recipe dependencies (nontrivial).
recipe-roller [Wed, 19 Apr 2017 01:53:29 +0000 (18:53 -0700)]
Roll recipe dependencies (nontrivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

Please review the expectation changes, and LGTM+CQ.

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
build:
  https://crrev.com/06e6b3accc66f6c31053055c8e0efcd978f18b03 Implement a generic postprocess/merge hook for swarming tasks. (RELAND 4) (jbudorick@chromium.org)

Change-Id: Ib62301f7336873f022cd5a7efe8df577c1414689
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Reviewed-on: https://skia-review.googlesource.com/13775
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRevert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
Greg Daniel [Wed, 19 Apr 2017 01:22:40 +0000 (01:22 +0000)]
Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"

This reverts commit edbb7d8860a63b1cacb1e89ec205c72a2de7c134.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
>
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
>
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
>
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoRevert "Plumb GrBackendTexture throughout skia."
Stan Iliev [Wed, 19 Apr 2017 00:23:39 +0000 (00:23 +0000)]
Revert "Plumb GrBackendTexture throughout skia."

This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12.

Reason for revert: fix android roll

Original change's description:
> Plumb GrBackendTexture throughout skia.
>
> Bug: skia:
> Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> Reviewed-on: https://skia-review.googlesource.com/13645
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
Reviewed-on: https://skia-review.googlesource.com/13773
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>

7 years agojumper, disable u16 table load stages
Mike Klein [Tue, 18 Apr 2017 22:55:33 +0000 (18:55 -0400)]
jumper, disable u16 table load stages

Bug: b/37433905

Change-Id: I829d76967f9da162388bad3f6bc2484d2a28043d
Reviewed-on: https://skia-review.googlesource.com/13771
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoAdd 16-bit P3 png test image
Matt Sarett [Tue, 18 Apr 2017 22:54:42 +0000 (18:54 -0400)]
Add 16-bit P3 png test image

Bug: b/37433905
Change-Id: Ifcbee1879885c6c235d69f924846e34475804f8c
Reviewed-on: https://skia-review.googlesource.com/13770
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoPlumb GrBackendTexture throughout skia.
Greg Daniel [Tue, 18 Apr 2017 21:12:32 +0000 (17:12 -0400)]
Plumb GrBackendTexture throughout skia.

Bug: skia:
Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
Reviewed-on: https://skia-review.googlesource.com/13645
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix missing tolerance in GrPathUtils::worstCasePointCount
Robert Phillips [Tue, 18 Apr 2017 20:56:06 +0000 (16:56 -0400)]
Fix missing tolerance in GrPathUtils::worstCasePointCount

https://skia-review.googlesource.com/c/10752/ (Use correct tolerance for
conic chopping in MSAA and default path renderers) changed the tolerance
used in createGeom but didn't change the setting in worstCasePointCount.

Bug: 711936, 712749
Change-Id: I540d8bc8cfdebc3eae5204e1acfeba3cefc2b12e
Reviewed-on: https://skia-review.googlesource.com/13768
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoFix resolve assert in vulkan
Greg Daniel [Tue, 18 Apr 2017 20:40:35 +0000 (16:40 -0400)]
Fix resolve assert in vulkan

Bug: skia:
Change-Id: I4fbf067112901a86faa7df301d3442281f563bcb
Reviewed-on: https://skia-review.googlesource.com/13767
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoAdd backend safe classes for passing in external texture and render targets into gpu
Greg Daniel [Tue, 18 Apr 2017 19:52:36 +0000 (15:52 -0400)]
Add backend safe classes for passing in external texture and render targets into gpu

This CL adds the GrBackend* classes as well as just updates the API for SkSurface and
SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will
be in an additional CL.

Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin,
samples, out of the descriptor and pass those in directly.

Bug: skia:
Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854
Reviewed-on: https://skia-review.googlesource.com/13122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSpeculative update of Nexus Players to O preview release 1
Kevin Lubick [Tue, 18 Apr 2017 18:12:13 +0000 (14:12 -0400)]
Speculative update of Nexus Players to O preview release 1

Bug: skia:
NOTRY=true
Change-Id: Ifc6fed23cfe6c81e4bd89068583a36b30742e45f
Reviewed-on: https://skia-review.googlesource.com/13729
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoAdd Win7 and Win8 bots.
Ben Wagner [Tue, 18 Apr 2017 19:38:15 +0000 (15:38 -0400)]
Add Win7 and Win8 bots.

Bug: skia:6517
No-Try: true
Change-Id: I02abf8aae6c356be23612f2d5442e6837919a1dc
Reviewed-on: https://skia-review.googlesource.com/13597
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRemove SkVarAlloc
Herb Derby [Tue, 18 Apr 2017 19:01:40 +0000 (15:01 -0400)]
Remove SkVarAlloc

Change-Id: Id41d3e03390185f72b682225aeb140df45c84a34
Reviewed-on: https://skia-review.googlesource.com/13763
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoCheck-in vulkan.h into third_party and use that instead of local sdk vulkan.h
Greg Daniel [Tue, 18 Apr 2017 19:00:39 +0000 (15:00 -0400)]
Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h

This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoFix some bugs with read/writePixels
Brian Osman [Tue, 18 Apr 2017 18:38:53 +0000 (14:38 -0400)]
Fix some bugs with read/writePixels

- On both GL and Vulkan, we must draw if writing to an MSAA surface.
  Otherwise we just write to the resolve target texture, which gets
  overwritten on the next resolve.
- On Vulkan, we must draw if the target isn't a texture. (This check
  was already present in onWritePixels).
- On Vulkan, when reading from an MSAA surface as a different config,
  we don't need the readConfig to be renderable with MSAA - the temp
  surface is always created non-MSAA.

- Added tests for these fixes, verified that they failed previously.

Bug: skia:
Change-Id: Ia2d5025d7a8f8de8630413453f83b58028dd41aa
Reviewed-on: https://skia-review.googlesource.com/13691
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoremove unneeded android flag for lockpixels
Mike Reed [Tue, 18 Apr 2017 19:01:02 +0000 (15:01 -0400)]
remove unneeded android flag for lockpixels

Bug: skia:6481
Change-Id: I6f9e299b34f396fbab892a4f91d3c4265c7c0ae2
Reviewed-on: https://skia-review.googlesource.com/13762
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAllow the dst of vulkan resolves to be a non RT
Greg Daniel [Tue, 18 Apr 2017 17:32:10 +0000 (13:32 -0400)]
Allow the dst of vulkan resolves to be a non RT

Bug: skia:
Change-Id: I79884127719b2364c2a986beda8856bee0583a5b
Reviewed-on: https://skia-review.googlesource.com/13724
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRevert "Split up opLists"
Robert Phillips [Tue, 18 Apr 2017 17:10:13 +0000 (17:10 +0000)]
Revert "Split up opLists"

This reverts commit bc8ee52d4649afdc972599e5ef2a2a543867985d.

Reason for revert: Instanced rendering is broken

Original change's description:
> Split up opLists
>
> Split into:
>    https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface)
>
> Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9
> Reviewed-on: https://skia-review.googlesource.com/11581
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic3ae650630a09730d40da4a9587d9e25a9dd5e6c
Reviewed-on: https://skia-review.googlesource.com/13725
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agokeep integral rectangle intersections integral
Cary Clark [Tue, 18 Apr 2017 16:08:58 +0000 (12:08 -0400)]
keep integral rectangle intersections integral

A pair of coincident lines can generate multiple intersection
points. Path ops is more stable when the intersection T value
is used to recompute the intersection point, but this has
the side-effect of making integral edges intersect at non-integral
values.

While it's worthwhile to fix this, for the moment it is less
disruptive to only worry about keeping intersection values
integral if the original intersection point is integral in
both axes.

Also, fix some debugging code that bit-rotted.

R=msarett@google.com

Change-Id: Iefd27b25d1d21c22b224c174bd59bc6c105033c4
Reviewed-on: https://skia-review.googlesource.com/13721
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoChange SkRecord to use SkArenaAlloc
Herb Derby [Tue, 18 Apr 2017 15:42:49 +0000 (11:42 -0400)]
Change SkRecord to use SkArenaAlloc

This CL uses the strategy of allocating raw bytes with the proper
alignment so that SkRecord can manage the object lifetimes.

Change-Id: I73604d41a3c6a12d1e2f7f8419f75b95c0190f68
Reviewed-on: https://skia-review.googlesource.com/13621
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSplit up opLists
Robert Phillips [Tue, 18 Apr 2017 15:21:38 +0000 (11:21 -0400)]
Split up opLists

Split into:
   https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface)

Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9
Reviewed-on: https://skia-review.googlesource.com/11581
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoFix out of bounds read in SkColorSpace::MakeICC
Matt Sarett [Tue, 18 Apr 2017 15:08:29 +0000 (11:08 -0400)]
Fix out of bounds read in SkColorSpace::MakeICC

Bug: 711895
Change-Id: I8574289bda842cf1be3fb5bcf347a81b98fdc6b0
Reviewed-on: https://skia-review.googlesource.com/13690
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoUse new recipes.py test command
Eric Boren [Tue, 18 Apr 2017 13:15:53 +0000 (09:15 -0400)]
Use new recipes.py test command

Bug: skia:
Change-Id: I669e96bb62ce7c91ef40f48d01bca55128db5016
Reviewed-on: https://skia-review.googlesource.com/13688
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>