platform/upstream/libSkiaSharp.git
7 years agoSplit custom font managers.
Ben Wagner [Wed, 8 Feb 2017 22:29:33 +0000 (17:29 -0500)]
Split custom font managers.

Some users would like to use the empty font manager, but the directory
gont manager brings in extra dependencies to work which would otherwise
be unneeded. Allow these users to build just the bits of code they
actually need.

Change-Id: Ib029ef2682883509bad5a2aa39f1ef55631f4d8a
Reviewed-on: https://skia-review.googlesource.com/8200
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoskslc type constructor cleanups
Ethan Nicholas [Tue, 7 Feb 2017 22:28:31 +0000 (17:28 -0500)]
skslc type constructor cleanups

BUG=skia:

Change-Id: I87108b5e107419d99c996ef032eda512a68451ab
Reviewed-on: https://skia-review.googlesource.com/8117
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoFix -Shared bot.
Mike Klein [Thu, 9 Feb 2017 14:35:57 +0000 (09:35 -0500)]
Fix -Shared bot.

It's building a static library today.  By turning on is_component_build,
it should make an .so.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-GCC-x86_64-Release-Shared

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

7 years agoUpdates to viewer gradle scripts
Greg Daniel [Tue, 7 Feb 2017 18:46:27 +0000 (13:46 -0500)]
Updates to viewer gradle scripts

BUG=skia:

Change-Id: Ib847e5ae89d2ac3f496507f69f82f5bac4914f36
Reviewed-on: https://skia-review.googlesource.com/8133
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoadded support for sk_ClipDistance
Ethan Nicholas [Wed, 8 Feb 2017 20:49:56 +0000 (15:49 -0500)]
added support for sk_ClipDistance

Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680
Reviewed-on: https://skia-review.googlesource.com/8225
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years ago[4fLinearGradient] Avoid NaNs for degenerate perspectives
Florin Malita [Wed, 8 Feb 2017 22:03:56 +0000 (17:03 -0500)]
[4fLinearGradient] Avoid NaNs for degenerate perspectives

BUG=skia:6211

Change-Id: I92148497b29860b3844fe35c2985070a197e4085
Reviewed-on: https://skia-review.googlesource.com/8229
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd integer vectors to GrSLType
csmartdalton [Wed, 8 Feb 2017 19:56:27 +0000 (14:56 -0500)]
Add integer vectors to GrSLType

BUG=skia:

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

7 years agoAdd a basic constructor to GrPipeline
csmartdalton [Wed, 8 Feb 2017 19:41:05 +0000 (14:41 -0500)]
Add a basic constructor to GrPipeline

Adds a simple constructor for when we just need to set up basic
internal rendering.

BUG=skia:

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

7 years agoSkRasterPipelineBlitter doesn't need an SkArenaAlloc.
Mike Klein [Tue, 7 Feb 2017 17:05:10 +0000 (12:05 -0500)]
SkRasterPipelineBlitter doesn't need an SkArenaAlloc.

Change-Id: Ie4f8bb1c05dee4639a075c100abbc5262e521fc4
Reviewed-on: https://skia-review.googlesource.com/8128
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years ago[4fGradient] Fix degenerate vertical gradient assert
Florin Malita [Wed, 8 Feb 2017 20:35:42 +0000 (15:35 -0500)]
[4fGradient] Fix degenerate vertical gradient assert

For vertical gradients, we rely on LinearIntervalProcessor to yield a
fAdvX == +inf, thanks to division by dx (== +/-0).

But certain degenerate values may cause the numerator to also collapse
to 0, resulting in fAdvX == NaN.

Instead or relying on float semantics, pin fAdvX to +inf explicitly for
vertical gradients.

BUG=skia:5912

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

7 years agoRemove use of SkSmallAllocator from all Loopers.
Herb Derby [Wed, 8 Feb 2017 20:12:19 +0000 (15:12 -0500)]
Remove use of SkSmallAllocator from all Loopers.

R=reed@google.com

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

7 years agoSkSplicer: begin on sse2/sse4.1 support
Mike Klein [Wed, 8 Feb 2017 17:50:17 +0000 (12:50 -0500)]
SkSplicer: begin on sse2/sse4.1 support

This lets us target older machines with SkSplicer.
SSE2 and SSE4.1 are the sweet spots if we're going to pick two more.

Nothing too interesting here except maybe the f16<->f32 code.

I rearranged a little to keep things consistent across platforms.

Next CL will get this into _generated.h and use it when appropriate.

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

7 years agoSimplify SkCpu.cpp preprocessor guards.
Mike Klein [Tue, 7 Feb 2017 23:03:15 +0000 (18:03 -0500)]
Simplify SkCpu.cpp preprocessor guards.

We have a couple ways to detect CPU features on ARM:
  - on ARMv8, getauxval(AT_HWCAP)
  - on ARMv7, getauxval(AT_HWCAP) and cpu-features.h

This guards each of these methods with preprocessor guards to match
exactly when we can use them.  Today they're sort of a mix of that and
higher level expectations about particular build and operating systems.

I'm looking into doing this directly by reading CPU registers,
much like we do for x86 further up the file.

None of this is super important right now, so as long as we don't decide
that we have these features when we don't, things will be fine.  It's no
big deal for now if we fail to detect them.

Change-Id: I3b7768483086d0f3f4f6516b754c3ea5ec2d03e5
Reviewed-on: https://skia-review.googlesource.com/8182
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove exec bit from source files.
Ben Wagner [Wed, 8 Feb 2017 19:09:08 +0000 (14:09 -0500)]
Remove exec bit from source files.

Ran:
find src include \( -name '*.cpp' -o -name '*.h' \) -executable -exec chmod -x {} \;

BUG=skia:

Change-Id: I04a4adbfcea9fd9860ab83d43734dc5158d3a884
Reviewed-on: https://skia-review.googlesource.com/8220
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoTweak shadow sample for demos.
Jim Van Verth [Mon, 6 Feb 2017 19:36:01 +0000 (14:36 -0500)]
Tweak shadow sample for demos.

BUG=skia:6119

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

7 years agoUpdate valgrind suppressions
Robert Phillips [Wed, 8 Feb 2017 18:04:30 +0000 (13:04 -0500)]
Update valgrind suppressions

It appears that the top-level function named has switched to just "main"

Change-Id: I33a18a8d433867e759312d09e5b258f934f495a4
Reviewed-on: https://skia-review.googlesource.com/8194
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoSimplify viewer's handling of backbuffer surface and color space
Brian Osman [Wed, 8 Feb 2017 15:47:28 +0000 (10:47 -0500)]
Simplify viewer's handling of backbuffer surface and color space

WindowContext still supports color spaces, but not other color
types. Any off-screen rendering is the app's responsibility.

This change also adds (working) F16 support to viewer. Note that
the previous 10-bit and FP16 support in WindowContext was broken.
There was no code to push the off-screen canvas to the window.
If you ever made it to the unreachable off-screen code path in
createSurface, it would have simply stopped drawing.

The decision to limit the window's gamut to sRGB is mostly driven
by my desire to add real-time editing of gamut. This design lets
us do that, without tearing down and rebuilding the window for
every change. An application could still supply a different gamut
via setDisplayParams and render directly to the back buffer with
proper color correction.

BUG=skia:

Change-Id: I94df35c7a42faee396009acc83683e40bb3c284d
Reviewed-on: https://skia-review.googlesource.com/8153
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRemove double free in GM and Bench.
Herb Derby [Wed, 8 Feb 2017 16:45:29 +0000 (11:45 -0500)]
Remove double free in GM and Bench.

Since the SkArenaAlloc handles calling the dtor, it is not longer needed
in the test.

Change-Id: I70a09be7bd0e71bf1e3d55ef08b5e87742e0bd18
Reviewed-on: https://skia-review.googlesource.com/8191
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix whitespace.txt
Chris Craik [Tue, 7 Feb 2017 20:39:43 +0000 (15:39 -0500)]
Fix whitespace.txt

Change-Id: Ia627030d3a5d622b94cc576ea3679daf68f9e635
Reviewed-on: https://skia-review.googlesource.com/8149
Commit-Queue: Chris Craik <ccraik@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoadd virtuals in prep for device-clipping
Mike Reed [Wed, 8 Feb 2017 15:07:53 +0000 (10:07 -0500)]
add virtuals in prep for device-clipping

Build flag available for backends to begin testing their impl.

Need to formalize save/restore, and how to forward these to device but not on picture canvases.

BUG=skia:6214

Change-Id: Ic5c0afba3e8c84fcf124567e63fe2f5880b623e7
Reviewed-on: https://skia-review.googlesource.com/8183
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAdd a blend-wrong mode to SkRasterPipelineBlitter.
Mike Klein [Tue, 7 Feb 2017 16:57:27 +0000 (11:57 -0500)]
Add a blend-wrong mode to SkRasterPipelineBlitter.

This keeps correct linear blending as the only option exericsed,
but it should be easy to see how to turn on blend-wrong mode.

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

7 years agoRevert "Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts""
Matt Sarett [Tue, 7 Feb 2017 21:52:07 +0000 (21:52 +0000)]
Revert "Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts""

This reverts commit 8461506c8b025522eb89cd754c63fb5dbf0cb7f1.

Reason for revert: Fixed some Chrome code, let's try this again.

Original change's description:
> Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts"
>
> This reverts commit ccfd1083a7b9d546735ddd1037f3240635cce72d.
>
> Reason for revert: Roll is failing.
>
> Original change's description:
> > Disallow readPixels() conversions from untagged srcs to tagged dsts
> >
> > This might break the roll into Chrome.  But let's see how.
> >
> > BUG=skia:6021
> >
> > Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80
> > Reviewed-on: https://skia-review.googlesource.com/7127
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Matt Sarett <msarett@google.com>
> >
>
> TBR=msarett@google.com,brianosman@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6021
>
> Change-Id: I4b62178fd7c23f43cf69ca69fc14526ecd503956
> Reviewed-on: https://skia-review.googlesource.com/7205
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,brianosman@google.com,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:6021

Change-Id: I3f3f33fe6b84fbd5c537b60ed5c8b9201d529a6a
Reviewed-on: https://skia-review.googlesource.com/8156
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRevert "Remove asTextureRef from SkSpecialImage & update effects accordingly"
Robert Phillips [Wed, 8 Feb 2017 12:49:00 +0000 (12:49 +0000)]
Revert "Remove asTextureRef from SkSpecialImage & update effects accordingly"

This reverts commit e88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12.

Reason for revert: See if breaking DEPS roll

Original change's description:
> Remove asTextureRef from SkSpecialImage & update effects accordingly
>
> This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef
>
> Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac
> Reviewed-on: https://skia-review.googlesource.com/7995
> 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: I227cbd5fcaf7e2f86e858331d9ec7ff7a5f203ca
Reviewed-on: https://skia-review.googlesource.com/8184
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoReduce stack usage for tests.
Herb Derby [Tue, 7 Feb 2017 22:57:47 +0000 (17:57 -0500)]
Reduce stack usage for tests.

TBR=mtklein@google.com

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

7 years agoSkFontHost_mac.cpp#create_descriptor to handle nullptr familyName.
bungeman [Mon, 6 Feb 2017 18:21:33 +0000 (13:21 -0500)]
SkFontHost_mac.cpp#create_descriptor to handle nullptr familyName.

Currently create_descriptor will crash if handed a familyName which is
nullptr. Instead it should simply create a descriptor without a family name
and allow CoreText to resolve a default font. This further simplifies
default font handling on Mac.

BUG=skia:6196

Change-Id: I0a2d081240e4cb5bd51dd3516ea2595277055fe0
Reviewed-on: https://skia-review.googlesource.com/8071
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoadded support for sk_VertexID
Ethan Nicholas [Tue, 7 Feb 2017 19:53:32 +0000 (14:53 -0500)]
added support for sk_VertexID

Change-Id: If3a2b7527ae6805ba54860c6ca6219431e2f3f76
Reviewed-on: https://skia-review.googlesource.com/8145
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agofixed assertion error when calling matrixCompMult()
Ethan Nicholas [Tue, 7 Feb 2017 19:08:31 +0000 (14:08 -0500)]
fixed assertion error when calling matrixCompMult()

Change-Id: I8e702eededf150e82226477558118f1bb7e66fef
Reviewed-on: https://skia-review.googlesource.com/8138
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoReland "Respect canvas size and frame offset in webp decoder"
Matt Sarett [Tue, 7 Feb 2017 22:01:16 +0000 (17:01 -0500)]
Reland "Respect canvas size and frame offset in webp decoder"

Original Change Reviewed At:
https://skia-review.googlesource.com/c/7800

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

BUG=skia:6185

Change-Id: I1a7732832d37920545c1775d7c7c65b43ed810f9
Reviewed-on: https://skia-review.googlesource.com/8157
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoAdd one more whitespace.
Tenghui Zhu [Tue, 7 Feb 2017 21:33:29 +0000 (13:33 -0800)]
Add one more whitespace.

Change-Id: I05ba4275c5d5d5d5c096385ed7cf5c8ff43ea973
Reviewed-on: https://skia-review.googlesource.com/8148
Commit-Queue: Tenghui Zhu <ztenghui@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRemove asTextureRef from SkSpecialImage & update effects accordingly
Robert Phillips [Tue, 7 Feb 2017 16:59:16 +0000 (11:59 -0500)]
Remove asTextureRef from SkSpecialImage & update effects accordingly

This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef

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

7 years agoIn ur code testing my CLs
John Reck [Tue, 7 Feb 2017 20:52:21 +0000 (15:52 -0500)]
In ur code testing my CLs

BUG=skia:

Change-Id: Ie2c41be6626f35231a1d4600f8aef714c648e0f7
Reviewed-on: https://skia-review.googlesource.com/8151
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: John Reck <jreck@google.com>

7 years agoDisable failing test on NexusPlayer Vk
Matt Sarett [Tue, 7 Feb 2017 19:41:20 +0000 (14:41 -0500)]
Disable failing test on NexusPlayer Vk

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android_Vulkan

BUG=skia:6209

Change-Id: Id3c1de249224ebce742bb5abb9d1b17868d91481
Reviewed-on: https://skia-review.googlesource.com/8144
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoOmit nondeterminstic tests on IntelIris540 ANGLE.
Ben Wagner [Tue, 7 Feb 2017 20:01:41 +0000 (15:01 -0500)]
Omit nondeterminstic tests on IntelIris540 ANGLE.

BUG=skia:6103,skia:6141

Change-Id: Ib27aa3fddb907c88c0bc41152ebb90abc0e36fe0
Reviewed-on: https://skia-review.googlesource.com/8146
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoOmit nondeterministic tests on AndroidOne for GPU bot.
Ben Wagner [Tue, 7 Feb 2017 19:25:46 +0000 (14:25 -0500)]
Omit nondeterministic tests on AndroidOne for GPU bot.

These bugs haven't been updated in over a year, so probably not worthwhile to continue to run the tests.

BUG=skia:4697,skia:4704,skia:4694,skia:4705

Change-Id: Ie77cfdf1a4a12a1eb61f90a3f93e479deb0349ab
Reviewed-on: https://skia-review.googlesource.com/5577
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoTack on ret instructions to each SkSplicer stage.
Mike Klein [Tue, 7 Feb 2017 19:32:25 +0000 (14:32 -0500)]
Tack on ret instructions to each SkSplicer stage.

This is just a warm up refactor to make the existing stages more
amenable to running in place without splicing.  Hopefully the driver
interpreter loop for that will be my next CL.

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

7 years agoUse SkArenaAlloc in the SkAutoBlitterChoose code.
Herb Derby [Tue, 7 Feb 2017 19:25:11 +0000 (14:25 -0500)]
Use SkArenaAlloc in the SkAutoBlitterChoose code.

- Added default implementation of onMakeContext to support use in android.

Searches for uses:
"public SkShader"  package:^chromium$ -file:^src/third_party/skia
package:^aosp.* "public SkShader"  -file:external/skia -file:.*third_party/skia
package:^android$ "public SkShader"  -file:external/skia -file:.*third_party/skia

... shows that no subclass overrides onCreateContext.

TBR=reed@google.com
TBR=mtklein@google.com

Change-Id: I8bd5f57a79534574e344b165d31dccee41c31767
Reviewed-on: https://skia-review.googlesource.com/8140
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoSkColorSpace: remove named API, add gamut API
Matt Sarett [Tue, 7 Feb 2017 18:56:11 +0000 (13:56 -0500)]
SkColorSpace: remove named API, add gamut API

Reland from: https://skia-review.googlesource.com/c/8021/

BUG=skia:

Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a
Reviewed-on: https://skia-review.googlesource.com/8136
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRemove Perf upload ACL
Eric Boren [Tue, 7 Feb 2017 17:56:57 +0000 (12:56 -0500)]
Remove Perf upload ACL

BUG=skia:6070

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

7 years agofix tools/git-sync-deps
Hal Canary [Tue, 7 Feb 2017 17:05:47 +0000 (12:05 -0500)]
fix tools/git-sync-deps

Change-Id: I8755fd7a316d284627e25f88e02b69e2f67f9622
Reviewed-on: https://skia-review.googlesource.com/8126
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoAddress feedback on makeTextureImage
Brian Osman [Tue, 7 Feb 2017 17:31:02 +0000 (12:31 -0500)]
Address feedback on makeTextureImage

BUG=skia:

Whitespace change in public API.

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

7 years agoFix infratests
Eric Boren [Tue, 7 Feb 2017 18:00:46 +0000 (13:00 -0500)]
Fix infratests

BUG=skia:

Change-Id: I19ff5750e12bbd66ba6c43fe8d6c3234f9bb1372
Reviewed-on: https://skia-review.googlesource.com/8132
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRevert "Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code."
Robert Phillips [Tue, 7 Feb 2017 17:28:15 +0000 (17:28 +0000)]
Revert "Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code."

This reverts commit 2b57b7f7a7fc97db57f190b5a8ebcf68e177ee2d.

Reason for revert: Android compile failing

Original change's description:
> Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.
>
>
> TBR=reed@google.com
> Change-Id: Iefb044bf7657fbf982f23aa91a3f4d013ce2c626
> Reviewed-on: https://skia-review.googlesource.com/7786
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>

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

Change-Id: Id09c35377dddae0811d998b7d0c34c422325a5bc
Reviewed-on: https://skia-review.googlesource.com/8129
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "SkColorSpace: remove named API, add gamut API"
Matt Sarett [Tue, 7 Feb 2017 17:06:09 +0000 (17:06 +0000)]
Revert "SkColorSpace: remove named API, add gamut API"

This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8.

Reason for revert: Breaks everything

Original change's description:
> SkColorSpace: remove named API, add gamut API
>
> BUG=skia:
>
> Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
> Reviewed-on: https://skia-review.googlesource.com/8021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

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

Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4
Reviewed-on: https://skia-review.googlesource.com/8127
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoSkColorSpace: remove named API, add gamut API
Matt Sarett [Mon, 6 Feb 2017 17:59:48 +0000 (12:59 -0500)]
SkColorSpace: remove named API, add gamut API

BUG=skia:

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

7 years agoBring back SkImage::makeTextureImage
Brian Osman [Tue, 7 Feb 2017 16:23:28 +0000 (11:23 -0500)]
Bring back SkImage::makeTextureImage

Ensures that an image is GPU backed on the passed-in GrContxt. The new
version requires a destination color space (intended usage of the image),
so we can make a proper decision about decoded format.

This reverts commit d263413a2a92cafe3fd3b051c67d00206c9a0e4d.

BUG=skia:

Change-Id: Ibccddbafc301779559592045ed5a5fa9264e7432
Reviewed-on: https://skia-review.googlesource.com/8116
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Reland "Respect canvas size and frame offset in webp decoder""
Matt Sarett [Tue, 7 Feb 2017 16:39:23 +0000 (16:39 +0000)]
Revert "Reland "Respect canvas size and frame offset in webp decoder""

This reverts commit 604971e39a20392fd4c74a56bcdc187311cf86dc.

Reason for revert: Strange vk failures

Original change's description:
> Reland "Respect canvas size and frame offset in webp decoder"
>
> Original Change Reviewed At:
> https://skia-review.googlesource.com/c/7800
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN
>
> BUG=skia:6185
>
> Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10
> Reviewed-on: https://skia-review.googlesource.com/8050
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6185
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Change-Id: Ice93b62c55ea13fce83140567be16225ff0e2fdb
Reviewed-on: https://skia-review.googlesource.com/8123
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoTear down 32-bit iOS test/perf bots.
Mike Klein [Tue, 7 Feb 2017 15:22:43 +0000 (10:22 -0500)]
Tear down 32-bit iOS test/perf bots.

The 64-bit bots look fine.  We're only testing GPU on iOS, so it's not
super critical to have 32-bit iOS testers.  I'll keep the builders.

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

7 years agoRemove _lowp SkSplicer experiment for now.
Mike Klein [Tue, 7 Feb 2017 15:11:52 +0000 (10:11 -0500)]
Remove _lowp SkSplicer experiment for now.

SkSplicer is an experiment, and _lowp SkSplicer is an experiment^2.
It's not that it's a bad idea... it just makes working on the main
SkSplicer experiment more complicated.

While not live at head, it'll live on in my heart.

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

7 years agoharfbuzz 1.3.0 → 1.4.2
Hal Canary [Fri, 27 Jan 2017 19:12:32 +0000 (14:12 -0500)]
harfbuzz 1.3.0 â†’ 1.4.2

Change-Id: I0c2f050c70755523abfbe98c17e90a90ecbedff5
Reviewed-on: https://skia-review.googlesource.com/8113
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoAnother workaround for libstdc++ unique_ptr
Brian Salomon [Tue, 7 Feb 2017 15:46:33 +0000 (10:46 -0500)]
Another workaround for libstdc++ unique_ptr

Change-Id: Ic08bf6f23e2509db332fcc0f6cab577189c2f558
Reviewed-on: https://skia-review.googlesource.com/8115
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUse SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.
Herb Derby [Mon, 6 Feb 2017 20:26:09 +0000 (15:26 -0500)]
Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.

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

7 years agoFix canvas size of new tiled bitmap GM
Brian Osman [Tue, 7 Feb 2017 14:19:17 +0000 (09:19 -0500)]
Fix canvas size of new tiled bitmap GM

Copy-paste error.

BUG=skia:

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

7 years agoUse SkVertices for tessellated spot and ambient shadow rendering.
Brian Salomon [Mon, 6 Feb 2017 20:47:44 +0000 (15:47 -0500)]
Use SkVertices for tessellated spot and ambient shadow rendering.

Change-Id: Ia81e7a771d345286533752708e4304c1ae3b97c9
Reviewed-on: https://skia-review.googlesource.com/8042
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stan Iliev <stani@google.com>

7 years agogen_tasks.go: Add --builder_name_schema flag
Eric Boren [Tue, 7 Feb 2017 14:16:30 +0000 (09:16 -0500)]
gen_tasks.go: Add --builder_name_schema flag

BUG=skia:6070

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

7 years agoShadowUtils: Fix umbra inset calculation when determining if umbra is fully occluded.
Brian Salomon [Mon, 6 Feb 2017 19:23:53 +0000 (14:23 -0500)]
ShadowUtils: Fix umbra inset calculation when determining if umbra is fully occluded.

Change-Id: Id0db49ad45b341d39abf7ee532ecc0799a832192
Reviewed-on: https://skia-review.googlesource.com/8079
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoAdd GM to exercise some of the darker corners of SkMagnifierImageFilter
Robert Phillips [Mon, 6 Feb 2017 17:32:55 +0000 (12:32 -0500)]
Add GM to exercise some of the darker corners of SkMagnifierImageFilter

An upcoming CL (https://skia-review.googlesource.com/c/7995/ (Remove asTextureRef from SkSpecialImage & update effects accordingly)) modifies some untested portions of the SkMagnifierImageFilter.

This adds a test to prevents regressions.

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

7 years agoAdd 64-bit iOS bots.
Mike Klein [Tue, 7 Feb 2017 00:30:51 +0000 (19:30 -0500)]
Add 64-bit iOS bots.

Because it's 2017.

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Debug,Perf-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Release,Test-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Debug,Test-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Release

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

7 years agoAdd a fast case for copying vertices in GrDrawVerticesOp.
Brian Salomon [Tue, 7 Feb 2017 00:06:22 +0000 (19:06 -0500)]
Add a fast case for copying vertices in GrDrawVerticesOp.

Uses Sk2f to apply a translation-only matrix when the vertex attributes contain only positions and colors.

We should look at how to generalize this for other draw vertices cases and other ops.

Change-Id: I5eb692982dc216b1c0a71209c969672b0562143c
Reviewed-on: https://skia-review.googlesource.com/8103
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix rounding error with tiled bitmap draws
Brian Osman [Mon, 6 Feb 2017 21:48:57 +0000 (16:48 -0500)]
Fix rounding error with tiled bitmap draws

We were snapping the top-left of the destination rectangle to integers,
but using the original (fractional) size. This led to us losing rows or
columns of pixels at the first tile boundary.

Also added a GM that demonstrates the bug (now renders correctly).

BUG=skia:

Change-Id: I50629dab9dd90fedad2c7e3393a1b1d1c7a8d45e
Reviewed-on: https://skia-review.googlesource.com/8102
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoGrTessellator (AA): improve antialiasing of thin shapes.
Stephen White [Mon, 6 Feb 2017 14:50:27 +0000 (09:50 -0500)]
GrTessellator (AA): improve antialiasing of thin shapes.

(Long description, but actually quite a small change.)

This is the first change inspired by the "straight skeleton" algorithm.
This algorithm gives us a mental model to describe the edge-antialiasing
problem: consider the shape as walls of a house, the outer alpha
geometry is a 45-degree "roof" up to a flat top at a height of 1.0
(the filled interior).  The faces of the sloping roof join at the
bisectors between the inner and outer points.

When the shape being drawn is sufficiently thin, there should be no flat
roof, and the sloping roof meets at an edge (the straight skeleton).

This patch detects cases where an edge inverts on stroking, which
indicates that the flat roof has turned inside out, and should be
reduced to a point instead. The model above describes what to do:
follow down the "roof" along the bisectors to their intersection.
This is the point to which an inverted edge should be collapsed.
Fortunately, the bisector edges are easy to compute: they're the
connector edges joining inner and outer points. Linearly interpolating
the distance from the top to the bottom point gives the alpha we
should use to approximate coverage.

Now that we are correctly handling inversions, bevelling outer edges
is no longer necesary, since pointy outer edges won't cause nasty
opaque artifacts.

A couple of other quality improvements: on intersection, always lerp
the alpha of connector edge, even if the opposite edge is an inner edge
(later, when these edges are collapsed, we need this value to compute
the correct alpha). Fix the case where an intruding outer vertex
intersects exactly with an inner edge by maxing its alpha with the
computed value in check_for_intersection(). Finally, we also no longer
round off the intersections produced by Line::intersect(), since it
introduces a loss of quality with no measurable performance benefit.

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

7 years agoMake recipes upload results to bucket specified in top-level config
Eric Boren [Mon, 6 Feb 2017 20:38:41 +0000 (15:38 -0500)]
Make recipes upload results to bucket specified in top-level config

BUG=skia:6070

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

7 years agoSet IOS_BUNDLE_ID in recipes.
Mike Klein [Mon, 6 Feb 2017 18:44:12 +0000 (13:44 -0500)]
Set IOS_BUNDLE_ID in recipes.

Instead of hard coding to com.google.dm, which will only work for Test
bots, set it in the environment when we know which bundle we're using.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release,Perf-iOS-Clang-iPadMini4-GPU-GX6450-arm-Debug

Change-Id: I43a0c832ff70e3b3c9bb987173784f4b6b992403
Reviewed-on: https://skia-review.googlesource.com/8076
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoMake workaround for std::unique_ptr<const T[]> bug in old libstdc++ work.
Brian Salomon [Mon, 6 Feb 2017 20:30:06 +0000 (15:30 -0500)]
Make workaround for std::unique_ptr<const T[]> bug in old libstdc++ work.

BUG=skia:

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

7 years agoWork around broken std::unique_ptr<const T[]> constructor from std::unique_ptr<T...
Brian Salomon [Mon, 6 Feb 2017 19:11:51 +0000 (14:11 -0500)]
Work around broken std::unique_ptr<const T[]> constructor from std::unique_ptr<T>&& in older libstdc++.

Change-Id: Ie4190800369515168203ff98b3e3fe0e2d790f1a
Reviewed-on: https://skia-review.googlesource.com/8072
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoUpdate image cipd version.
Joe Gregorio [Mon, 6 Feb 2017 19:37:49 +0000 (14:37 -0500)]
Update image cipd version.

BUG=skia:
NOTRY=true

DOCS_PREVIEW= https://skia.org/?cl=8083

Change-Id: Ie3750b6a4b5d49e2b45dc9b9a5f2de8da8d31c49
Reviewed-on: https://skia-review.googlesource.com/8083
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>

7 years agoAdd sk_sp make variant to SkArenaAlloc.
Herb Derby [Mon, 6 Feb 2017 18:03:49 +0000 (13:03 -0500)]
Add sk_sp make variant to SkArenaAlloc.

R=bungeman@google.com
BUG=skia:

Change-Id: Iec588cb6946f0230ff3d3ec46499c365aa6b8d09
Reviewed-on: https://skia-review.googlesource.com/8067
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoRevert "Added dead variable / code elimination to skslc."
Ethan Nicholas [Mon, 6 Feb 2017 18:53:07 +0000 (18:53 +0000)]
Revert "Added dead variable / code elimination to skslc."

This reverts commit 113628d76176a1ab3e6719c59efff23cd10ab213.

Reason for revert: Looks to have caused https://bugs.chromium.org/p/chromium/issues/detail?id=688939

Original change's description:
> Added dead variable / code elimination to skslc.
>
> BUG=skia:
>
> Change-Id: Ib037730803a8f222f099de0e001fe06ad452a22c
> Reviewed-on: https://skia-review.googlesource.com/7584
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
>

TBR=egdaniel@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I85599e4ca2bc6bfd782edc163f67b64195d6ae65
Reviewed-on: https://skia-review.googlesource.com/8077
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoHave ShadowTessellators transform path; add SkShadowTessellator base class
Jim Van Verth [Mon, 6 Feb 2017 18:38:23 +0000 (13:38 -0500)]
Have ShadowTessellators transform path; add SkShadowTessellator base class

BUG=skia:6119

Change-Id: I37639ebab43c9f32f48d2d7dbb8d4619efb9b09e
Reviewed-on: https://skia-review.googlesource.com/8061
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "Allow conversion from non-opaque to opaque"
Matt Sarett [Mon, 6 Feb 2017 18:28:49 +0000 (18:28 +0000)]
Revert "Allow conversion from non-opaque to opaque"

This reverts commit bfe8dca7dfdd9cafbccba0a637f2fcd58c7a54fb.

Reason for revert: I believe I've fixed all the call sites,
so this is now ok.

Original change's description:
> Allow conversion from non-opaque to opaque
>
> BUG:683787
>
> Change-Id: I1b78cc8d1b5d3917a2a952da036b93022e99e053
> Reviewed-on: https://skia-review.googlesource.com/7374
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

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

Change-Id: I2369c9b81321ca83a7063bb85e66ddbc03914d2b
Reviewed-on: https://skia-review.googlesource.com/8073
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoFix two bugs when deciding to tile. Large images were always tiling.
Brian Osman [Mon, 6 Feb 2017 18:24:47 +0000 (13:24 -0500)]
Fix two bugs when deciding to tile. Large images were always tiling.

usedTileBytes was actually usedTileTexels, so we underestimated how much
of the image we were using by a factor of 4.

Then, to determine if we were using more than 50% of the image, we wrote:
usedTileBytes < 2 * bmpSize;

That meant we were off by another factor of 4.

BUG=skia:

Change-Id: Iba2acc75c5e7603543f05e4473b73f76a2937d7a
Reviewed-on: https://skia-review.googlesource.com/8063
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSkXPS: new document API.
Hal Canary [Mon, 6 Feb 2017 14:51:42 +0000 (09:51 -0500)]
SkXPS: new document API.

Now requires a IXpsOMObjectFactory pointer.  This will allow sandboxing
to be used in Chromium.  (Chrome will create a IXpsOMObjectFactory, then
go into sandbox mode, then call SkDocumenent::MakeXPS().)

Change-Id: Ic4b48d4b148c44e188d12a9481fb74735546528a
Reviewed-on: https://skia-review.googlesource.com/8052
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoReland "Respect canvas size and frame offset in webp decoder"
Matt Sarett [Mon, 6 Feb 2017 14:51:48 +0000 (09:51 -0500)]
Reland "Respect canvas size and frame offset in webp decoder"

Original Change Reviewed At:
https://skia-review.googlesource.com/c/7800

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

BUG=skia:6185

Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10
Reviewed-on: https://skia-review.googlesource.com/8050
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoSK_USE_SDL is never defined
Hal Canary [Mon, 6 Feb 2017 18:03:36 +0000 (13:03 -0500)]
SK_USE_SDL is never defined

This CL also removes dead code, SkOSWindow_SDL.cpp.

Change-Id: I659dc271a4bcceba7fe29ac5ac6e79d684153870
Reviewed-on: https://skia-review.googlesource.com/8070
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoGet linux vulkan running on Intel NUC
Kevin Lubick [Mon, 6 Feb 2017 17:45:29 +0000 (12:45 -0500)]
Get linux vulkan running on Intel NUC

This CL includes a few things.

First, it creates two CIPD assets, a Debug and Release version
of the Linux Vulkan Intel Driver. The driver is still young,
so the Debug version helps us submit better bugs to the
developers.  The current version is Mesa 13.04:
ftp://ftp.freedesktop.org/pub/mesa/13.0.4/

Second, it fixes the GN flavor to not purge out all environment
variables - a leftover from the GYP -> GN migration.

Third, it sets environment variables on both Test and Perf such
that the vulkan sdk, libraries and drivers all linked in from
their homes in CIPD.

BUG=skia:6133

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

7 years agoRemove unused files in third_party/libsdl.
Mike Klein [Mon, 6 Feb 2017 18:01:47 +0000 (13:01 -0500)]
Remove unused files in third_party/libsdl.

Change-Id: I44c95341e7bc631322a9802bce3fdc5a0e8c4bb5
Reviewed-on: https://skia-review.googlesource.com/8066
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoMake iOS main() functions normal.
Mike Klein [Mon, 6 Feb 2017 17:46:20 +0000 (12:46 -0500)]
Make iOS main() functions normal.

The weird foo_mains are no longer needed when we build with GN.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS

Change-Id: Iae50696741e0dc277d96dda4968a1ae41cb17c8a
Reviewed-on: https://skia-review.googlesource.com/8064
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Stephan Altmueller <stephana@google.com>
7 years agoClean up more references to GYP.
Mike Klein [Mon, 6 Feb 2017 17:26:51 +0000 (12:26 -0500)]
Clean up more references to GYP.

Delete files only used by GYP, and files that used GYP.  Neither can
possibly be actively used.  Beyond that, just a couple doc tweaks.

Change-Id: I0220d7226e7bb9ed7c54a7d8f2906a718313c521
Reviewed-on: https://skia-review.googlesource.com/8062
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoAdd refcnt'ed immutable vertices class for SkCanvas::drawVertices.
Brian Salomon [Mon, 6 Feb 2017 14:41:10 +0000 (09:41 -0500)]
Add refcnt'ed immutable vertices class for SkCanvas::drawVertices.

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

7 years agoSkXPS: Begin refactoring SkXPSDevice
Hal Canary [Mon, 6 Feb 2017 14:26:49 +0000 (09:26 -0500)]
SkXPS:  Begin refactoring SkXPSDevice

A later CL will move all document-level fields  and methods into
SkXPSDocument.

  * SkXPSDocument cnstructor requires a xps factory ptr.

  * All device layers share ownership of a single factory.

  * renames SkDocument_XPS to the easier-to-say SkXPSDocument.

  * Moves autocoinitialize to DM.

TODO: pipe the IXpsOMObjectFactory* into the SkDocument api.

No change in rendered documents.

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

7 years agoFix getMaxResidentSetSizeMB() on iOS.
Mike Klein [Mon, 6 Feb 2017 15:41:11 +0000 (10:41 -0500)]
Fix getMaxResidentSetSizeMB() on iOS.

It's reporting numbers rather too large to be plausible.

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

7 years agoAdd back a gaggle of iOS bots.
Mike Klein [Mon, 6 Feb 2017 15:12:32 +0000 (10:12 -0500)]
Add back a gaggle of iOS bots.

These should match the old ones I removed last week.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS,Build-Mac-Clang-arm64-Debug-iOS,Build-Mac-Clang-arm64-Release-iOS

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

7 years agoremove all GYP files
Hal Canary [Mon, 6 Feb 2017 15:39:48 +0000 (10:39 -0500)]
remove all GYP files

Change-Id: I66e4fb028664f1e20cd307da0a784ff5d7b9eb5e
Reviewed-on: https://skia-review.googlesource.com/8056
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agostart removing uses of SkScalarMul
Mike Reed [Sat, 4 Feb 2017 16:04:26 +0000 (11:04 -0500)]
start removing uses of SkScalarMul

BUG=skia:6197

Change-Id: Ic444c7ee4ca547f483dc8232dcacd6d4ba87d913
Reviewed-on: https://skia-review.googlesource.com/8041
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoiOS: cd into Documents folder at startup
Mike Klein [Mon, 6 Feb 2017 14:26:14 +0000 (09:26 -0500)]
iOS: cd into Documents folder at startup

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release

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

7 years agoStart updating iOS docs.
Mike Klein [Fri, 3 Feb 2017 18:13:29 +0000 (13:13 -0500)]
Start updating iOS docs.

This removes the docs for the old GYP-based local development and
replaces them with ones for GN-based development.

I have not yet updated the docs for iOS on the bots... still in flux.

Change-Id: I1f9c5c1a3331ae192dc08c614ef7da26924f808e
Reviewed-on: https://skia-review.googlesource.com/8002
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoAdd toXYZD50() to SkColorSpace API
Matt Sarett [Fri, 3 Feb 2017 23:03:58 +0000 (15:03 -0800)]
Add toXYZD50() to SkColorSpace API

BUG=skia:

Change-Id: I996877c9482453fc5ff58b0f66fa29715bea2191
Reviewed-on: https://skia-review.googlesource.com/8024
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRevert "Respect canvas size and frame offset in webp decoder"
Robert Phillips [Mon, 6 Feb 2017 13:12:18 +0000 (13:12 +0000)]
Revert "Respect canvas size and frame offset in webp decoder"

This reverts commit 0f33970c8d950a68b7d83cc626ac0500953d6b15.

Reason for revert: msan complaint

Original change's description:
> Respect canvas size and frame offset in webp decoder
>
> BUG=skia:6185
>
> Change-Id: Id543cb689a5e33b800ebbc18f4a234e78a4c4298
> Reviewed-on: https://skia-review.googlesource.com/7800
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
>

TBR=borenet@google.com,msarett@google.com,scroggo@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:6185

Change-Id: Ie01dc7d7ebfebe36a235335d0d8cb28bccb2ecff
Reviewed-on: https://skia-review.googlesource.com/8046
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRoll recipe DEPS
Eric Boren [Mon, 6 Feb 2017 12:21:29 +0000 (07:21 -0500)]
Roll recipe DEPS

BUG=skia:

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

7 years agoRemove unused assignment in SkScan::AntiFillXRect.
Jeremy Roman [Sun, 5 Feb 2017 04:25:46 +0000 (23:25 -0500)]
Remove unused assignment in SkScan::AntiFillXRect.

Found by static analysis.

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

7 years agoUpdate SKP version
UpdateSKPs [Sun, 5 Feb 2017 07:00:53 +0000 (07:00 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

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

7 years agoRespect canvas size and frame offset in webp decoder
Matt Sarett [Fri, 3 Feb 2017 20:24:19 +0000 (15:24 -0500)]
Respect canvas size and frame offset in webp decoder

BUG=skia:6185

Change-Id: Id543cb689a5e33b800ebbc18f4a234e78a4c4298
Reviewed-on: https://skia-review.googlesource.com/7800
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoImproved SkShadowUtils caching
Brian Salomon [Fri, 3 Feb 2017 19:25:02 +0000 (14:25 -0500)]
Improved SkShadowUtils caching

Multiple ambient and spot shadows can be cached for each geometry.

Spot shadows can be reused when x,y light offset is different.

We categorize spot shadows for rrects as either transparent, opaque with partial umbra occlusion, or opaque with full umbra occlusion and use that to improve cache performance.

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

7 years agoDisable unpremul f16 image tests
Matt Sarett [Fri, 3 Feb 2017 19:58:59 +0000 (11:58 -0800)]
Disable unpremul f16 image tests

Testing premul f16 is enough test coverage, and we aren't doing
this correctly right now anyways (the drawing code assumes a
premul bitmap, we would need to premultiply after the unpremul
decode).

BUG=skia:

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

7 years agoiOS: set up device dirs to be relative
Mike Klein [Fri, 3 Feb 2017 18:31:05 +0000 (13:31 -0500)]
iOS: set up device dirs to be relative

Hopefully this get things pushed to and reading from directories under
com.google.dm's Documents.  I've hardcoded to DM's app for now.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release

Change-Id: Iea54b3604b65551e4a486b50d6c7ea9aba26f869
Reviewed-on: https://skia-review.googlesource.com/8004
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRevert "Revert "Don't instantiate shaders with non-invertible local matrix""
Florin Malita [Fri, 3 Feb 2017 18:21:17 +0000 (18:21 +0000)]
Revert "Revert "Don't instantiate shaders with non-invertible local matrix""

This reverts commit 0e86725ba4f667056ff1ef65275165853a47303b.

Reason for revert: landed Blink fix, should pass layout tests now

Original change's description:
> Revert "Don't instantiate shaders with non-invertible local matrix"
>
> This reverts commit ebfbba9bbdacd754c8ad7429ee066f53f17bc66b.
>
> Reason for revert: breaks chrome blink tests for linux_trusty_blink_rel
>
> Original change's description:
> > Don't instantiate shaders with non-invertible local matrix
> >
> > Change-Id: If11f7d57cbf45929632d858f91c02d8f5fa9f442
> > Reviewed-on: https://skia-review.googlesource.com/7885
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> >
>
> TBR=fmalita@chromium.org,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I41c5513523c27dc4bad68008f08369185897b7a2
> Reviewed-on: https://skia-review.googlesource.com/7948
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>
>

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

Change-Id: I373ea6c61a256fd8cfbfb34f8b2d39a3ff8109db
Reviewed-on: https://skia-review.googlesource.com/8003
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoexpose new tight-bounds method on SkPath
Mike Reed [Fri, 3 Feb 2017 16:34:13 +0000 (11:34 -0500)]
expose new tight-bounds method on SkPath

BUG=skia:

Change-Id: Ie50df49c1758af203042a84dc2cd505046373d2c
Reviewed-on: https://skia-review.googlesource.com/7996
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRestore ios_flavor.
Mike Klein [Thu, 2 Feb 2017 23:55:03 +0000 (18:55 -0500)]
Restore ios_flavor.

Just like Android, there's enough special ceremony needed to move files
to and from iOS devices that this reads most clearly as its own flavor.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release

Change-Id: I01c8e5494c364cc61e219568f022219f7c3f5fdc
Reviewed-on: https://skia-review.googlesource.com/7988
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoMake shadow tessellators fail gracefully and add unit test for this.
Brian Salomon [Fri, 3 Feb 2017 15:33:25 +0000 (10:33 -0500)]
Make shadow tessellators fail gracefully and add unit test for this.

Change-Id: I42a9d06a18928588347a6dea2f6150518ba29aa8
Reviewed-on: https://skia-review.googlesource.com/7886
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoGrTessellator (AA): Fix for missing fill artifacts.
Stephen White [Fri, 3 Feb 2017 15:15:16 +0000 (10:15 -0500)]
GrTessellator (AA): Fix for missing fill artifacts.

Some regions were being incorrectly filled due to setting
connector edges winding to zero *after* merging collinear edges.
This would cause the merge to add the wrong winding value. Putting the
adjust before the call to merge_collinear_edges() fixes the problem.

Also, some pixels were not getting coverage due the inner edge being
+1 winding. Using -2 winding for inner edges ensure the interior
regions are -1 winding, which gives coverage in more cases of
self-intersection. This required flipping the comparisons on the
intruding-vertices workaround.

BUG=skia:

Change-Id: I216fa3d30c196a6b7773637e48802f6572c993c7
Reviewed-on: https://skia-review.googlesource.com/7962
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoInitialize some more variables in SpotShadowTessellator
Jim Van Verth [Fri, 3 Feb 2017 14:22:37 +0000 (09:22 -0500)]
Initialize some more variables in SpotShadowTessellator

BUG=skia:6119

Change-Id: Id3a3042df6254e3367713b82f3b08257e0be71b1
Reviewed-on: https://skia-review.googlesource.com/7992
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>