platform/upstream/libSkiaSharp.git
7 years agofixed duplicate interface variable in SPIR-V output
Ethan Nicholas [Thu, 2 Mar 2017 19:33:31 +0000 (14:33 -0500)]
fixed duplicate interface variable in SPIR-V output

BUG=skia:

Change-Id: Iee6b8de83b8ee6ce9de910a12bd86042018d7965
Reviewed-on: https://skia-review.googlesource.com/9167
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoRevert "Remove SkDraw from device-draw methods, and enable device-centric clipping."
Mike Reed [Thu, 2 Mar 2017 20:22:35 +0000 (20:22 +0000)]
Revert "Remove SkDraw from device-draw methods, and enable device-centric clipping."

This reverts commit c77e33f73d3e86cfabf925d6f2e1166f81022575.

Reason for revert: breaks isClipRect
- this CL inspected the conservative clip for this, which is (by definition) a rect
- probably need to query the device for this info

Original change's description:
> Remove SkDraw from device-draw methods, and enable device-centric clipping.
>
> BUG=skia:6214
>
> Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
> Reviewed-on: https://skia-review.googlesource.com/8806
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=bsalomon@google.com,halcanary@google.com,msarett@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6214

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

7 years agoRefactor SkLiteDL to no longer extend SkDrawable.
Derek Sollenberger [Wed, 1 Mar 2017 20:33:23 +0000 (15:33 -0500)]
Refactor SkLiteDL to no longer extend SkDrawable.

Change-Id: Ieaa849bceba0e98e4c99491c721fe945a0694e68
Reviewed-on: https://skia-review.googlesource.com/9111
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoTell PDF on Mac when a font is a variation font.
Ben Wagner [Thu, 2 Mar 2017 18:31:16 +0000 (13:31 -0500)]
Tell PDF on Mac when a font is a variation font.

PDF needs to know when a font is a variation font so that it knows
it cannot just embed the typeface.

BUG=chromium:697916

Change-Id: I85091e444a235545f0f63fe131729c107bb664a0
Reviewed-on: https://skia-review.googlesource.com/9158
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoAdd MotoG4 bot.
Ben Wagner [Thu, 2 Mar 2017 17:43:06 +0000 (12:43 -0500)]
Add MotoG4 bot.

BUG=skia:
NOTRY=true

Change-Id: I987b1b1f2c739a8301923ac567f9a57dfb64dc97
Reviewed-on: https://skia-review.googlesource.com/9148
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoUse inline storage for SkEdgeBuilder.
Herb Derby [Thu, 2 Mar 2017 19:00:10 +0000 (14:00 -0500)]
Use inline storage for SkEdgeBuilder.

Change-Id: I06d9ee759a366d6c2c11341e15e671f5a1f87ae7
Reviewed-on: https://skia-review.googlesource.com/9164
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agopass storage directly to allocator for blitters
Mike Reed [Thu, 2 Mar 2017 18:39:25 +0000 (13:39 -0500)]
pass storage directly to allocator for blitters

BUG=skia:

Change-Id: If93df0437b2aba813042241f00eb0c6fba2a3c6f
Reviewed-on: https://skia-review.googlesource.com/9161
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoUse proxy canvas size.
Herb Derby [Thu, 2 Mar 2017 18:36:26 +0000 (13:36 -0500)]
Use proxy canvas size.

The old code just hard coded 1,1 as size. Instead use the size of the
proxy canvas.

Change-Id: Ib1ebc9339c98680ca350f26f8ec514f6782de8a4
Reviewed-on: https://skia-review.googlesource.com/9160
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoRemove SkDraw from device-draw methods, and enable device-centric clipping.
Mike Reed [Thu, 2 Mar 2017 16:23:46 +0000 (11:23 -0500)]
Remove SkDraw from device-draw methods, and enable device-centric clipping.

BUG=skia:6214

Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
Reviewed-on: https://skia-review.googlesource.com/8806
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoSkJumper: skip null contexts
Mike Klein [Thu, 2 Mar 2017 17:42:14 +0000 (12:42 -0500)]
SkJumper: skip null contexts

This makes stages that don't use a context pointer look a little
cleaner, especially on ARM.  No interesting speed difference on x86.

What do you think?

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

7 years agoSkPDF: empty shader boxes bad
Hal Canary [Thu, 2 Mar 2017 17:42:02 +0000 (12:42 -0500)]
SkPDF: empty shader boxes bad

BUG=skia:6315
Change-Id: I48172b4deb4c55b08310e8e3d68089cfafeaa951
Reviewed-on: https://skia-review.googlesource.com/9156
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoRevert "Revert "Revert "Revert "Move GrTextureProvider to src""""
Brian Osman [Thu, 2 Mar 2017 18:36:27 +0000 (13:36 -0500)]
Revert "Revert "Revert "Revert "Move GrTextureProvider to src""""

This reverts commit 580ffa0fb17bc4e924776eafd941bf1fab397cde.

Reason for revert: Okay, it landed.

Original change's description:
> Revert "Revert "Revert "Move GrTextureProvider to src"""
>
> This reverts commit 2fe8373bb1d56f531f8a2e03a3087b0aa73e199c.
>
> Reason for revert: Google3 fix isn't landing.
>
> Original change's description:
> > Revert "Revert "Move GrTextureProvider to src""
> >
> > This reverts commit 13d7f5d7c2872ed4298330758e173ae605578cb2.
> >
> > Reason for revert: Fixed client code. Re-landing.
> >
> > Original change's description:
> > > Revert "Move GrTextureProvider to src"
> > >
> > > This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.
> > >
> > > Reason for revert: Breaking a roll
> > >
> > > Original change's description:
> > > > Move GrTextureProvider to src
> > > >
> > > > With this hidden, we can make further simplification. Just want to test
> > > > this change against our external clients first, to make sure we're okay
> > > > to proceed.
> > > >
> > > > BUG=skia:
> > > >
> > > > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > > > Reviewed-on: https://skia-review.googlesource.com/9072
> > > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > >
> > >
> > > TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=skia:
> > >
> > > Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> > > Reviewed-on: https://skia-review.googlesource.com/9123
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > >
> >
> > TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
> > Reviewed-on: https://skia-review.googlesource.com/9127
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> >
>
> TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: If5c06c7608d76c45438d03fefb21c4edd7da4f36
> Reviewed-on: https://skia-review.googlesource.com/9128
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

7 years agoUse fast path for circular shadows.
Jim Van Verth [Thu, 2 Mar 2017 16:28:43 +0000 (11:28 -0500)]
Use fast path for circular shadows.

Also cleans up some of the MaskFilter code to make it
more correct.

BUG=skia:6119

Change-Id: I93016bcdd9c55fcb2d1dc8776428a72eb563d67a
Reviewed-on: https://skia-review.googlesource.com/9116
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoCheck that the FT_Face actually exists in SkTypeface_FreeType::onGetVariationDesignPo...
Ben Wagner [Thu, 2 Mar 2017 16:48:38 +0000 (11:48 -0500)]
Check that the FT_Face actually exists in SkTypeface_FreeType::onGetVariationDesignPosition.

All users of AutoFTAccess check the FT_Face for nullptr in case the
FT_Face cannot actually be created. This check was overlooked in the
recent addition of SkTypeface_FreeType::onGetVariationDesignPosition.

BUG=chromium:697878

Change-Id: I92dfe845f2aecfa00bd4d088ac139f74c019c03d
Reviewed-on: https://skia-review.googlesource.com/9151
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoSkJumper: be more precise by rejecting data sections.
Mike Klein [Thu, 2 Mar 2017 16:16:22 +0000 (11:16 -0500)]
SkJumper: be more precise by rejecting data sections.

This allows %rip addressing as long as it's not going into a data
section.  This lets us use switch tables, avoiding loops and stack.

On HSW,
  SkRasterPipeline_f16:   90 -> 63
  SkRasterPipeline_srgb: 170 -> 97

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

7 years agoGrTessellator (AA): restore rounding in Line::intersect().
Stephen White [Thu, 2 Mar 2017 15:35:56 +0000 (10:35 -0500)]
GrTessellator (AA): restore rounding in Line::intersect().

I removed this in https://skia-review.googlesource.com/8028, but that
was actually just masking a problem properly fixed in
https://skia-review.googlesource.com/8364. Now that it is fixed, we
can restore the rounding, which actually improves performance by
5-10% on Canvas Arcs (when run with the tess verb limit disabled).

NOTE: this change will affect many GMs, including strokes_poly,
addarc, parsedpaths, dashcubics, beziers, nested_aa, etc.

BUG=skia:

Change-Id: Id10f82e35a344247cab27e6d59a0dd2e11c9944d
Reviewed-on: https://skia-review.googlesource.com/9051
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>

7 years agoSkJumper: handle the <kStride tail in AVX+ mode.
Mike Klein [Wed, 1 Mar 2017 18:07:40 +0000 (13:07 -0500)]
SkJumper: handle the <kStride tail in AVX+ mode.

We have plenty general purpose registers to spare on x86-64,
so the cheapest thing to do is use one to hold the usual 'tail'.

Speedups on HSW:
    SkRasterPipeline_srgb: 292 -> 170
    SkRasterPipeline_f16:  122 ->  90

There's plenty more room to improve here, e.g. using mask loads and
stores, but this seems to be enough to get things working reasonably.

BUG=skia:6289

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

7 years agoUse GrTextureProvider's uniqueKey setting method rather than directly setting it
Robert Phillips [Thu, 2 Mar 2017 15:23:52 +0000 (10:23 -0500)]
Use GrTextureProvider's uniqueKey setting method rather than directly setting it

Clients will not be able to directly set the uniqueKey on GrTextureProxies. This CL sets up the choke point for the switch over to having uniqueKeys be managed by a third party (the textureProvider).

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

7 years agoDetermine whether any fp uses local coords in FragmentProcessorAnalysis rather than...
Brian Salomon [Thu, 2 Mar 2017 13:49:19 +0000 (08:49 -0500)]
Determine whether any fp uses local coords in FragmentProcessorAnalysis rather than GrPipeline creation

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

7 years agoFix flutter compile bot
Ravi Mistry [Thu, 2 Mar 2017 14:23:47 +0000 (09:23 -0500)]
Fix flutter compile bot

BUG=skia:6310

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

7 years agoSkJumper: allow the compiler to generate FMAs
Mike Klein [Thu, 2 Mar 2017 14:19:25 +0000 (09:19 -0500)]
SkJumper: allow the compiler to generate FMAs

Today we use mad() to get FMAs where possible.
-ffp-contract=fast lets the compiler generate them if it spots an opportunity.

It looks like it's found a mix of FMAs and FMSs.

I will follow up by seeing if we can relax the use of mad().
Quick experiments say no, but less quick experiments may say otherwise.

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

7 years agoUpdate Skia milestone to 59
Heather Miller [Thu, 2 Mar 2017 14:45:02 +0000 (09:45 -0500)]
Update Skia milestone to 59

BUG=skia:

Change-Id: Ifa8fa20a838b2899a1230bf51cea7c4cf28971d8
Reviewed-on: https://skia-review.googlesource.com/9139
Reviewed-by: Heather Miller <hcm@google.com>
7 years agoTest sRGB with non-linear blending using new "srgbnl" sink
Matt Sarett [Thu, 2 Mar 2017 13:53:46 +0000 (08:53 -0500)]
Test sRGB with non-linear blending using new "srgbnl" sink

BUG=skia:

Change-Id: Ief7516c1505f8e447f83121ed4ba75b9fa9ba75b
Reviewed-on: https://skia-review.googlesource.com/8976
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agofix leak in SPIRV code generator
Ethan Nicholas [Wed, 1 Mar 2017 17:07:28 +0000 (12:07 -0500)]
fix leak in SPIRV code generator

BUG=skia:6101

Change-Id: Ic083becfb44e36b029ef9511825f4a681b7495f4
Reviewed-on: https://skia-review.googlesource.com/9103
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoSymbolize all Ubuntu dm/nanobench runs
Kevin Lubick [Thu, 2 Mar 2017 13:34:47 +0000 (08:34 -0500)]
Symbolize all Ubuntu dm/nanobench runs

BUG=skia:6206

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

7 years agoAdd some thread safety notes.
Mike Klein [Wed, 1 Mar 2017 16:16:17 +0000 (11:16 -0500)]
Add some thread safety notes.

These are the main problems we tend to hit with multithreaded drawing.

Change-Id: I63dc56f38a533eb839d36833e865af5fcc700d3b
Reviewed-on: https://skia-review.googlesource.com/9100
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRemove atlas creation from GrResourceProvider
Robert Phillips [Wed, 1 Mar 2017 19:32:46 +0000 (14:32 -0500)]
Remove atlas creation from GrResourceProvider

This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL.

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

7 years agoSome small SkJumper refactoring.
Mike Klein [Thu, 2 Mar 2017 02:49:23 +0000 (21:49 -0500)]
Some small SkJumper refactoring.

No generated code changes.

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

7 years agoRevert "Revert "Revert "Move GrTextureProvider to src"""
Brian Osman [Thu, 2 Mar 2017 01:17:01 +0000 (01:17 +0000)]
Revert "Revert "Revert "Move GrTextureProvider to src"""

This reverts commit 2fe8373bb1d56f531f8a2e03a3087b0aa73e199c.

Reason for revert: Google3 fix isn't landing.

Original change's description:
> Revert "Revert "Move GrTextureProvider to src""
>
> This reverts commit 13d7f5d7c2872ed4298330758e173ae605578cb2.
>
> Reason for revert: Fixed client code. Re-landing.
>
> Original change's description:
> > Revert "Move GrTextureProvider to src"
> >
> > This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.
> >
> > Reason for revert: Breaking a roll
> >
> > Original change's description:
> > > Move GrTextureProvider to src
> > >
> > > With this hidden, we can make further simplification. Just want to test
> > > this change against our external clients first, to make sure we're okay
> > > to proceed.
> > >
> > > BUG=skia:
> > >
> > > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > > Reviewed-on: https://skia-review.googlesource.com/9072
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > >
> >
> > TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> > Reviewed-on: https://skia-review.googlesource.com/9123
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> >
>
> TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
> Reviewed-on: https://skia-review.googlesource.com/9127
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If5c06c7608d76c45438d03fefb21c4edd7da4f36
Reviewed-on: https://skia-review.googlesource.com/9128
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd support for Semaphores (gpu waiting on gpu) in Ganesh
Greg Daniel [Wed, 1 Mar 2017 22:01:09 +0000 (17:01 -0500)]
Add support for Semaphores (gpu waiting on gpu) in Ganesh

BUG=skia:

Change-Id: I4324b65bc50a3dfd90372459899870d5f1952fdc
Reviewed-on: https://skia-review.googlesource.com/9120
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMake SkTypeface::onGetVariationDesignPosition pure virtual.
Ben Wagner [Wed, 1 Mar 2017 21:55:44 +0000 (16:55 -0500)]
Make SkTypeface::onGetVariationDesignPosition pure virtual.

It was non-pure until it could be implemented everywhere. Now that it
is implemented everywhere, mark it as pure virtual.

Change-Id: I985eda37d52e6d194fb39c27cb6bc0ce641238ec
Reviewed-on: https://skia-review.googlesource.com/9125
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoSkJumper: upgrade to Clang 3.9
Mike Klein [Wed, 1 Mar 2017 21:43:08 +0000 (16:43 -0500)]
SkJumper: upgrade to Clang 3.9

Mostly I think this will help me handle the AVX tails better.
But there are some wins here already, particularly in AVX and ARM code.

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

7 years agoRemove SK_HAS_DWRITE_X defines.
Ben Wagner [Wed, 1 Mar 2017 21:08:00 +0000 (16:08 -0500)]
Remove SK_HAS_DWRITE_X defines.

While developing DirectWrite it was ncessary to support building with
older Windows SDKs which may not have certain headers. Now that the
minimum required Windows SDK is 8.1 (0x0603) we can remove these
difficult to use macros to simplify future development.

Change-Id: Ia780466b7c9b86198116c5974c43363f49a0ebac
Reviewed-on: https://skia-review.googlesource.com/9124
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoCall FT_Set_Default_Properties when available.
Ben Wagner [Wed, 1 Mar 2017 18:00:53 +0000 (13:00 -0500)]
Call FT_Set_Default_Properties when available.

FreeType 2.7.0 added the ability to read some global properties from
environment variables to configure an FT_Library. However, this did
not apply to FT_New_Library. After 2.7.1 FT_Set_Default_Properties was
added so that users of FT_New_Library can also repect these properties.

This also removes SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER and
associated code since there are no users of this flag, the behavior it
guards is now more or less in upstream FreeType, and the pattern in the
code it guards is now in use for calling FT_Set_Default_Properties.

BUG=skia:6165

Change-Id: I9fca86cc8b1bb9709c0b980330cf974455be3b57
Reviewed-on: https://skia-review.googlesource.com/9109
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoRevert "Revert "Move GrTextureProvider to src""
Brian Osman [Wed, 1 Mar 2017 21:54:04 +0000 (21:54 +0000)]
Revert "Revert "Move GrTextureProvider to src""

This reverts commit 13d7f5d7c2872ed4298330758e173ae605578cb2.

Reason for revert: Fixed client code. Re-landing.

Original change's description:
> Revert "Move GrTextureProvider to src"
>
> This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.
>
> Reason for revert: Breaking a roll
>
> Original change's description:
> > Move GrTextureProvider to src
> >
> > With this hidden, we can make further simplification. Just want to test
> > this change against our external clients first, to make sure we're okay
> > to proceed.
> >
> > BUG=skia:
> >
> > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > Reviewed-on: https://skia-review.googlesource.com/9072
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
>
> TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> Reviewed-on: https://skia-review.googlesource.com/9123
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
Reviewed-on: https://skia-review.googlesource.com/9127
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoFuzzCanvas: fix text generation BUG=skia:6299
Hal Canary [Wed, 1 Mar 2017 20:40:46 +0000 (15:40 -0500)]
FuzzCanvas: fix text generation BUG=skia:6299

Change-Id: Ia87aee1e21bb3429d9f0bab0943190b48e0d76f2
Reviewed-on: https://skia-review.googlesource.com/9122
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoRevert "Move GrTextureProvider to src"
Brian Osman [Wed, 1 Mar 2017 20:56:30 +0000 (20:56 +0000)]
Revert "Move GrTextureProvider to src"

This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.

Reason for revert: Breaking a roll

Original change's description:
> Move GrTextureProvider to src
>
> With this hidden, we can make further simplification. Just want to test
> this change against our external clients first, to make sure we're okay
> to proceed.
>
> BUG=skia:
>
> Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> Reviewed-on: https://skia-review.googlesource.com/9072
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
Reviewed-on: https://skia-review.googlesource.com/9123
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd Galaxy J5 bots.
Ben Wagner [Wed, 1 Mar 2017 19:13:55 +0000 (14:13 -0500)]
Add Galaxy J5 bots.

BUG=skia:6097
NOTRY=true

Change-Id: I34bd1b10201c4f38b00b80a59e30776414844e05
Reviewed-on: https://skia-review.googlesource.com/9107
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoAdd path renderer options to viewer GUI
Brian Osman [Wed, 1 Mar 2017 19:59:05 +0000 (14:59 -0500)]
Add path renderer options to viewer GUI

BUG=skia:

Change-Id: I248ba081f0229d7fcf2071009076acc88b80b076
Reviewed-on: https://skia-review.googlesource.com/9088
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRemove stencil related flags from GrInstancedPipelineInfo.
Brian Salomon [Wed, 1 Mar 2017 19:34:41 +0000 (14:34 -0500)]
Remove stencil related flags from GrInstancedPipelineInfo.

Change-Id: Ieeb8ada92b5196473d5cea77350fd994bfff8916
Reviewed-on: https://skia-review.googlesource.com/9086
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoremove unneeded android flag for textdecorations
Mike Reed [Wed, 1 Mar 2017 19:02:05 +0000 (14:02 -0500)]
remove unneeded android flag for textdecorations

BUG=skia:

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

7 years agofix fuzzer
Cary Clark [Wed, 1 Mar 2017 19:02:02 +0000 (14:02 -0500)]
fix fuzzer

turn asserts into error returns to fix fuzz

R=kjlubick@google.com
BUG=skia:6162

Change-Id: I7508eb5cb41425dcfc2718aaa9cc1ee8aa00acc9
Reviewed-on: https://skia-review.googlesource.com/9118
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoUnpremul the blend constant in PDLCDXferProcessor.
Brian Salomon [Wed, 1 Mar 2017 18:59:10 +0000 (13:59 -0500)]
Unpremul the blend constant in PDLCDXferProcessor.

This was accidentally dropped in https://skia.googlesource.com/skia.git/+/eec6f7be5461e588210f383b8af18f324a2bdb46

BUG=chromium:695626

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

7 years agoGrTessellator: minor cleanups and speedups.
Stephen White [Wed, 1 Mar 2017 16:48:27 +0000 (11:48 -0500)]
GrTessellator: minor cleanups and speedups.

Don't null out vertex's fPrev and fNext ptrs during
MonotonePoly::emit(); list_insert() will do it for us.

Don't normalize the tangent returned by get_unit_normal() to unit
length, since we can do the dot product comparison without it.

Copy Lines where possible, rather than recomputing them.

Change-Id: I733b00dd9d9d493313ac9a1c71aac0b708e78201
Reviewed-on: https://skia-review.googlesource.com/9047
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>

7 years agoUse SkArenaAlloc in SkEdgeBuilder.
Herb Derby [Wed, 1 Mar 2017 18:44:39 +0000 (13:44 -0500)]
Use SkArenaAlloc in SkEdgeBuilder.

Change-Id: Ie3557469d018b857dc6fb4543d367fcd8768f0b7
Reviewed-on: https://skia-review.googlesource.com/9115
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoMove GrTextureProvider to src
Brian Osman [Wed, 1 Mar 2017 18:41:52 +0000 (13:41 -0500)]
Move GrTextureProvider to src

With this hidden, we can make further simplification. Just want to test
this change against our external clients first, to make sure we're okay
to proceed.

BUG=skia:

Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
Reviewed-on: https://skia-review.googlesource.com/9072
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSet window dimensions in raster on Unix
Brian Osman [Wed, 1 Mar 2017 18:39:14 +0000 (13:39 -0500)]
Set window dimensions in raster on Unix

These values were left uninitialized, leading to problems with the GUI
in raster configs.

BUG=skia:

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

7 years agoUse GrAAType in instanced rendering.
Brian Salomon [Wed, 1 Mar 2017 16:28:27 +0000 (11:28 -0500)]
Use GrAAType in instanced rendering.

Change-Id: Ifb5a33f908de618d66fcb0dd329f064c1ecfcd63
Reviewed-on: https://skia-review.googlesource.com/9082
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoInitialize XImage struct fully
Brian Osman [Wed, 1 Mar 2017 17:00:06 +0000 (12:00 -0500)]
Initialize XImage struct fully

I was getting sporadic failures from XInitImage (causing the raster
backend to not draw anything).

BUG=skia:

Change-Id: Ied79f2b5354d89c146aca64d70fde8cf9f3ab62e
Reviewed-on: https://skia-review.googlesource.com/9102
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agochanged skslc layout parsing strategy
Ethan Nicholas [Wed, 1 Mar 2017 16:46:51 +0000 (11:46 -0500)]
changed skslc layout parsing strategy

Change-Id: I322f0682a8753beb858012b00ee7e4ec6b206c2f
Reviewed-on: https://skia-review.googlesource.com/9081
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoSkAndroidCodec: Leave pixels in encoded colorspace when tf is numerical
Matt Sarett [Tue, 28 Feb 2017 20:36:42 +0000 (15:36 -0500)]
SkAndroidCodec: Leave pixels in encoded colorspace when tf is numerical

Color space conversion will be deferred until later.

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

7 years agoDefine canvas fuzzers like the other API fuzzers
Kevin Lubick [Wed, 1 Mar 2017 15:42:45 +0000 (10:42 -0500)]
Define canvas fuzzers like the other API fuzzers

Invoke these like:
out/Clang/fuzz -n RasterN32Canvas -b [fuzz]
out/Clang/fuzz -n NullCanvas -b [fuzz]
out/Clang/fuzz -n PDFCanvas -b [fuzz]

For debugging:
out/Clang/fuzz -n _DumpCanvas -b [fuzz]

BUG=skia:

Change-Id: I19bd215df09ad2e4ceb7ab16ac6b232fb3f905ed
Reviewed-on: https://skia-review.googlesource.com/9097
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd imgui.ini to .gitignore
Brian Osman [Wed, 1 Mar 2017 15:23:09 +0000 (10:23 -0500)]
Add imgui.ini to .gitignore

This file is auto-generated by viewer's GUI library (to remember size and
position of windows).

BUG=skia:

Change-Id: Id363301d71d3df1d665c4e495a0d5062cdbc472b
Reviewed-on: https://skia-review.googlesource.com/9095
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoFix Memcheck:Overlap in setting up rect bench names
Brian Salomon [Wed, 1 Mar 2017 14:49:58 +0000 (09:49 -0500)]
Fix Memcheck:Overlap in setting up rect bench names

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

7 years agofuzz: dump_canvas
Hal Canary [Mon, 27 Feb 2017 21:42:03 +0000 (16:42 -0500)]
fuzz: dump_canvas

For example: `fuzz --type _dump_canvas -b fuzz_file`

Note well: this command-line usage is subject to change.

Change-Id: Ida7368a699bafe2395604d8428a2d50cb0eff6aa
Reviewed-on: https://skia-review.googlesource.com/9025
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoAllow dm threads for GalaxyS*
Ben Wagner [Wed, 1 Mar 2017 02:16:18 +0000 (21:16 -0500)]
Allow dm threads for GalaxyS*

This appears to have been added for the GalaxyS4 in
https://codereview.chromium.org/1106173004/, but we no longer test the
GalaxyS4.

BUG=skia:3214
NOTRY=true

Change-Id: I10c4e1457ebf0e65133ac914cd9fdf0964c74003
Reviewed-on: https://skia-review.googlesource.com/9090
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoDisable deferred gpu resources for Chrome branch
Robert Phillips [Tue, 28 Feb 2017 21:30:28 +0000 (16:30 -0500)]
Disable deferred gpu resources for Chrome branch

Chrome's branch is coming up and it seems unlikely that I will be able to push instantiation all the way to flush time (where failure will be easier to deal with) before then. This CL should silence the P1 bug but could introduce layout test diffs.

Ideally this wouldn't land until after: https://codereview.chromium.org/2718353004/ (Add flag for upcoming Skia change) so the layout test differences will be visible on the DEPS roll

BUG=688811

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

7 years agoadd isolate (init-with-previous) savelayer flag
Mike Reed [Tue, 28 Feb 2017 22:45:27 +0000 (17:45 -0500)]
add isolate (init-with-previous) savelayer flag

BUG=skia:4884

Change-Id: If7fabf5cc2c87b870f48dfb87e27a2524fec5ae5
Reviewed-on: https://skia-review.googlesource.com/9045
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoClarify what is passed to AutoDrawLooper.
Mike Reed [Tue, 28 Feb 2017 21:41:03 +0000 (16:41 -0500)]
Clarify what is passed to AutoDrawLooper.

Explicitly pass the raw bounds to AutoDrawLooper, regardless of the calculations needed for quickreject.
Deliberately move temp rects (e.g. storage) right where needed, so they are not in scope after their use.

Change-Id: I392bda7857566b2fc14429d8ea632ab712dd37d1
Reviewed-on: https://skia-review.googlesource.com/9044
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
7 years agoAdd AVX-512 detection to SkCpu, try 2.
Mike Klein [Wed, 1 Mar 2017 01:15:26 +0000 (20:15 -0500)]
Add AVX-512 detection to SkCpu, try 2.

This time, don't call xgetbv() before checking we can.

This reverts commit b26373cfd8151b2fa56bdf532ddcde4919cce09f.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug

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

7 years agoClean up/remove unused GrFragmentProcessor-derived ctors
Robert Phillips [Tue, 28 Feb 2017 21:20:03 +0000 (16:20 -0500)]
Clean up/remove unused GrFragmentProcessor-derived ctors

This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662
Reviewed-on: https://skia-review.googlesource.com/8997
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFix -Wshadow-field warnings
Brian Salomon [Tue, 28 Feb 2017 21:11:04 +0000 (16:11 -0500)]
Fix -Wshadow-field warnings

BUG=skia:

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

7 years agoAdd backend selection to viewer's GUI
Brian Osman [Tue, 28 Feb 2017 20:45:01 +0000 (15:45 -0500)]
Add backend selection to viewer's GUI

BUG=skia:

Change-Id: I3314013538792c2aa82cc49f3f072aab2cdc4a55
Reviewed-on: https://skia-review.googlesource.com/9079
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoRemove SkDataTableBuilder. It is not used.
Herb Derby [Tue, 28 Feb 2017 18:45:41 +0000 (13:45 -0500)]
Remove SkDataTableBuilder. It is not used.

Change-Id: Ieae9adba73b8ada959e08d69a06d0f3d010209c6
Reviewed-on: https://skia-review.googlesource.com/9076
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoAdd GrExternalTextureData and SkCrossContextImageData
Brian Osman [Tue, 28 Feb 2017 15:02:49 +0000 (10:02 -0500)]
Add GrExternalTextureData and SkCrossContextImageData

GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

Re-land of https://skia-review.googlesource.com/c/8529/

BUG=skia:

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

7 years agoFix crash switching to Vulkan in viewer on Windows
Brian Osman [Tue, 28 Feb 2017 19:37:40 +0000 (14:37 -0500)]
Fix crash switching to Vulkan in viewer on Windows

BUG=skia:

Change-Id: I626aa6a1571311600a6208c42a8c3e9509d037de
Reviewed-on: https://skia-review.googlesource.com/9078
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd SkColorSpace::isNumericalTransferFn() to the public API
Matt Sarett [Tue, 28 Feb 2017 19:24:31 +0000 (14:24 -0500)]
Add SkColorSpace::isNumericalTransferFn() to the public API

This adds a little more flexibility for clients wanting to handle
color space transformation outside of the codecs.  Ex: they can
leave the encoded data as is and apply the numerical transfer
fn in a later step.

BUG=skia:

Change-Id: Ieca53b01648d4cb9cf0995715deacd4c4876900f
Reviewed-on: https://skia-review.googlesource.com/9077
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoviewer: Add a "Path renderer" dropdown menu
csmartdalton [Tue, 28 Feb 2017 00:00:53 +0000 (17:00 -0700)]
viewer: Add a "Path renderer" dropdown menu

BUG=skia:

Change-Id: Ia3ed812d24f0f83631ab238bc418a3c95d49b9dc
Reviewed-on: https://skia-review.googlesource.com/9000
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoDisable f16 and srgb configs for Android CPU perf.
Ben Wagner [Tue, 28 Feb 2017 16:31:49 +0000 (11:31 -0500)]
Disable f16 and srgb configs for Android CPU perf.

This is a followup to https://skia-review.googlesource.com/c/9021/

BUG=skia:

Change-Id: Ie8bae20162759c2545690fcc4c8867a478914c35
Reviewed-on: https://skia-review.googlesource.com/9065
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoAllow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)
Robert Phillips [Tue, 28 Feb 2017 16:26:32 +0000 (11:26 -0500)]
Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)

In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of:

https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager)

and is a reland of:

https://skia-review.googlesource.com/c/8988/ ( Allow GrSurfaceProxy-derived classes to use flags when instantiating)

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

7 years agoRevert "Add AVX-512 detection to SkCpu"
Cary Clark [Tue, 28 Feb 2017 17:18:13 +0000 (17:18 +0000)]
Revert "Add AVX-512 detection to SkCpu"

This reverts commit 3c322e23a013e78fcbe0edd7adccd580af8466bc.

Reason for revert: crash in SkCpu on Mac

Original change's description:
> Add AVX-512 detection to SkCpu
>
> I've added a SKY alias for the five new bits detected on a Skylake Xeon.
>
> Change-Id: I9f7dd48f4dc866608d81befd061434ca325ef451
> Reviewed-on: https://skia-review.googlesource.com/9043
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

Change-Id: I3cc06c7e32391e68d6cfe084786b18270cdab631
Reviewed-on: https://skia-review.googlesource.com/9074
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoWhen traversing convex paths only consume zero length segments.
Brian Salomon [Tue, 28 Feb 2017 16:21:28 +0000 (11:21 -0500)]
When traversing convex paths only consume zero length segments.

BUG=chromium:688671

Change-Id: Ic27dde1ea7c1fe8b6afa0a05c637d8272e88b803
Reviewed-on: https://skia-review.googlesource.com/9071
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix single leg Compose Shader crash.
Herb Derby [Tue, 28 Feb 2017 16:14:47 +0000 (11:14 -0500)]
Fix single leg Compose Shader crash.

R=halcanary@google.com

BUG=skia:6291

Change-Id: Ifa63dce2b06662e7b535a4f04e1f3f772c099122
Reviewed-on: https://skia-review.googlesource.com/9027
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoReland: Allow DFPathRenderer to store bitmaps at low resolutions
Jim Van Verth [Tue, 28 Feb 2017 15:24:39 +0000 (10:24 -0500)]
Reland: Allow DFPathRenderer to store bitmaps at low resolutions

BUG=chromium:682918

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

7 years agoAdd AVX-512 detection to SkCpu
Mike Klein [Tue, 28 Feb 2017 14:35:03 +0000 (14:35 +0000)]
Add AVX-512 detection to SkCpu

I've added a SKY alias for the five new bits detected on a Skylake Xeon.

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

7 years agoAdd another null check for the Vk NexusPlayer bot
Brian Osman [Tue, 28 Feb 2017 15:05:43 +0000 (10:05 -0500)]
Add another null check for the Vk NexusPlayer bot

That bot has flaky failures creating contexts, and it consistently fails
this test. It probably can't create two contexts at the same time.

BUG=skia:

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

7 years agoRevert "Allow GrSurfaceProxy-derived classes to use flags when instantiating"
Robert Phillips [Tue, 28 Feb 2017 15:05:52 +0000 (15:05 +0000)]
Revert "Allow GrSurfaceProxy-derived classes to use flags when instantiating"

This reverts commit c8f1e3a5c08d58657dddccdeedbe5d6e8c16d891.

Reason for revert: check on ANGLE failure
Original change's description:
> Allow GrSurfaceProxy-derived classes to use flags when instantiating
>
> In some instances proxies must be created that, when instantiated, have no pending IO.
>
> This is split out of: (Add per-Flush callback to GrDrawingManager)
>
> https://skia-review.googlesource.com/c/8679/
>
> Change-Id: I68b5504d35ad436a4ae737ac4bb3c171fc9a5826
> Reviewed-on: https://skia-review.googlesource.com/8988
> 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: I157417c443028b2148ee355ce69c946a96bb9407
Reviewed-on: https://skia-review.googlesource.com/9066
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoGrTessellator: take sweep_gt out behind the woodshed.
Stephen White [Mon, 27 Feb 2017 16:37:55 +0000 (11:37 -0500)]
GrTessellator: take sweep_gt out behind the woodshed.

No need for it, since sweep_gt(a, b) == sweep_lt(b, a).

Change-Id: I9244687845530a8e11673c5360d9ac700933baa0
Reviewed-on: https://skia-review.googlesource.com/8987
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>

7 years agoRevert "Allow distance field path renderer to store bitmaps at low resolutions"
Cary Clark [Tue, 28 Feb 2017 13:59:54 +0000 (13:59 +0000)]
Revert "Allow distance field path renderer to store bitmaps at low resolutions"

This reverts commit c0bc1bb8690e5ce489394112b0cf4fe4601c1f2c.

Reason for revert: broke build with SkTDynamicHash error

Original change's description:
> Allow distance field path renderer to store bitmaps at low resolutions
>
> BUG=chromium:682918
>
> Change-Id: I1a0608f7e6394ab05eebc4b78fb7087ca718f617
> Reviewed-on: https://skia-review.googlesource.com/8971
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:682918

Change-Id: I4a3c370a248915fe7c7e77dd0346d6ab6f0d10c6
Reviewed-on: https://skia-review.googlesource.com/9063
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoAllow GrSurfaceProxy-derived classes to use flags when instantiating
Robert Phillips [Mon, 27 Feb 2017 16:39:51 +0000 (11:39 -0500)]
Allow GrSurfaceProxy-derived classes to use flags when instantiating

In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of: (Add per-Flush callback to GrDrawingManager)

https://skia-review.googlesource.com/c/8679/

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

7 years agoRemove unused Skia OWNERS files
Ravi Mistry [Tue, 28 Feb 2017 13:25:45 +0000 (08:25 -0500)]
Remove unused Skia OWNERS files

Context is in https://bugs.chromium.org/p/skia/issues/detail?id=6285

NOTRY=true
BUG=skia:6285

Change-Id: I4d03f7c76acfcf3463e7895f58889a3d1b0e96fb
Reviewed-on: https://skia-review.googlesource.com/9061
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoAllow distance field path renderer to store bitmaps at low resolutions
Jim Van Verth [Mon, 27 Feb 2017 23:21:16 +0000 (18:21 -0500)]
Allow distance field path renderer to store bitmaps at low resolutions

BUG=chromium:682918

Change-Id: I1a0608f7e6394ab05eebc4b78fb7087ca718f617
Reviewed-on: https://skia-review.googlesource.com/8971
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix stack-overflow in FuzzCanvas
Kevin Lubick [Mon, 27 Feb 2017 21:45:32 +0000 (16:45 -0500)]
Fix stack-overflow in FuzzCanvas

BUG=skia:

Change-Id: Id42dfff7a59218a8158bf93320a64547f98a401b
Reviewed-on: https://skia-review.googlesource.com/9026
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoMove armv7 CPU tests to Nexus 10.
Ben Wagner [Mon, 27 Feb 2017 20:41:17 +0000 (15:41 -0500)]
Move armv7 CPU tests to Nexus 10.

The Android Ones are slow and there aren't enough to keep up.

BUG=skia:

Change-Id: Ib483dc31853c34c3cafca7c8a08193fd747f2094
Reviewed-on: https://skia-review.googlesource.com/9021
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoFuzzCanvas: impl SkPictureShader, SkTypeface, other TextEncodings
Hal Canary [Mon, 27 Feb 2017 18:36:38 +0000 (13:36 -0500)]
FuzzCanvas: impl SkPictureShader, SkTypeface, other TextEncodings

Change-Id: Ie27fbaf6ba9c85f7ec54e8d8251f62a0e193458e
Reviewed-on: https://skia-review.googlesource.com/8996
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoMake the fallback loop very accurate.
Herb Derby [Sat, 25 Feb 2017 21:31:09 +0000 (16:31 -0500)]
Make the fallback loop very accurate.

The summation xs = xs + dx was causing xs to overflow the bounds of the source.
Change the algorithm to eliminate error accumulation. Performance is not a
concern, because the fallback should only be used in the rare cases.

R=mtklein@google.com

BUG=skia:6216

Change-Id: Iff8e55af5eb79606c7b1e693ae825ceaeda44afd
Reviewed-on: https://skia-review.googlesource.com/8975
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
7 years agoFuzz PDF, N32, and Null Canvases
Hal Canary [Tue, 14 Feb 2017 18:35:14 +0000 (13:35 -0500)]
Fuzz PDF, N32, and Null Canvases

run `fuzz --type pdf_canvas` or `fuzz --type null_canvas` or
`fuzz --type n32_canvas`

Change-Id: Id70179d5578ed1e67006aef7823bf75fc1d7a4a6
Reviewed-on: https://skia-review.googlesource.com/8418
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoRe-land of skslc switch support
Ethan Nicholas [Mon, 27 Feb 2017 18:26:45 +0000 (13:26 -0500)]
Re-land of skslc switch support

This reverts commit 7d975fc200bbbea991ec4c04c08f3a5ea7b847af.

BUG=skia:

Change-Id: I57521f7a291a35cfed58d623ea4f8da29582d2c5
Reviewed-on: https://skia-review.googlesource.com/8993
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoAdd msaa flag and UI to viewer
csmartdalton [Fri, 24 Feb 2017 23:04:47 +0000 (16:04 -0700)]
Add msaa flag and UI to viewer

BUG=skia:

Change-Id: I0a24d5e6a4271f84ea5c82eb6d9ede9a1e63f86a
Reviewed-on: https://skia-review.googlesource.com/8787
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoSkGradientShader: Fix multi-byte-read-stack-use-after-scope
Hal Canary [Mon, 27 Feb 2017 14:59:39 +0000 (09:59 -0500)]
SkGradientShader: Fix multi-byte-read-stack-use-after-scope

BUG=chromium:694098
Change-Id: I9dfd61d1eed123fce33acf55f6f68e80ac41da25
Reviewed-on: https://skia-review.googlesource.com/8985
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoDrop SkRasterPipelineBench N to 15.
Mike Klein [Mon, 27 Feb 2017 14:39:38 +0000 (09:39 -0500)]
Drop SkRasterPipelineBench N to 15.

This highlights overheads and instruction set switch costs.

At time of writing on my HSW laptop,
   N = 16:  76ns
   N = 15: 291ns

BUG=skia:6289

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

7 years agoRoll Recipe DEPS
Eric Boren [Mon, 27 Feb 2017 13:58:13 +0000 (08:58 -0500)]
Roll Recipe DEPS

Yet more upstream breaks

BUG=skia:

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

7 years agoFixes to shared context test API
Brian Osman [Fri, 24 Feb 2017 19:51:44 +0000 (14:51 -0500)]
Fixes to shared context test API

Fixes a bug in Windows shared context creation, and makes the API
less fiddly.

BUG=skia:

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

7 years agobegin to hide details of SkPathEffect
Mike Reed [Sun, 26 Feb 2017 03:34:32 +0000 (22:34 -0500)]
begin to hide details of SkPathEffect

BUG=skia:

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

7 years agoUpdate SKP version
UpdateSKPs [Sun, 26 Feb 2017 07:08:50 +0000 (07:08 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

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

7 years agoRemove iHD530 tests.
Ben Wagner [Sun, 26 Feb 2017 02:46:40 +0000 (21:46 -0500)]
Remove iHD530 tests.

The iHD530 bot is fairly similar to the IntelIris540 bot, and the only open bug for iHD530 (skia:5792) also occurs for IntelIris540.

NOTRY=true

Change-Id: I1f9d753a93efd8a26c11f143fe0b523fab4f29ae
Reviewed-on: https://skia-review.googlesource.com/8886
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFix bug handling CMYK images without color profiles
Matt Sarett [Fri, 24 Feb 2017 22:22:09 +0000 (17:22 -0500)]
Fix bug handling CMYK images without color profiles

We need the swizzler to convert CMYK->RGB in some
cases where we do have a color xform.

BUG=skia:

Change-Id: Id467ad03df64368fd5a6c3bd5461566582eb492e
Reviewed-on: https://skia-review.googlesource.com/8973
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoAdd onBackendCreated callback to Viewer
Christopher Dalton [Fri, 24 Feb 2017 20:22:53 +0000 (13:22 -0700)]
Add onBackendCreated callback to Viewer

Also removes fWidth and fHeight from Window and instead
calls into WindowContent to get these values.

BUG=skia:

Change-Id: I72ee506004b7da73db9abb607a3bc82edfcf7d43
Reviewed-on: https://skia-review.googlesource.com/8795
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
7 years agoSet a limit on the size for BMP images
Leon Scroggins III [Fri, 24 Feb 2017 20:33:24 +0000 (15:33 -0500)]
Set a limit on the size for BMP images

This limit matches the limit used by Chromium. I am not aware of any
real world BMPs that are larger than this (or even close to it), but
there are some invalid BMPs that are larger than this, leading to
crashes when we try to read a row.

BUG:34778578
BUG=skia:3617

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

7 years agoRead color space info from raw exif data
Matt Sarett [Fri, 24 Feb 2017 19:51:08 +0000 (14:51 -0500)]
Read color space info from raw exif data

b/35516531

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