Commit Graph

36915 Commits

Author SHA1 Message Date
Cary Clark
cdc371af3e fix bookmaker
add docs for new SkImage methods

Also, the tool slightly adjusted the spacing
for the include comments, and fixed a few references.

TBR=bsalomon@google.com

Docs-Preview: https://skia.org/?cl=155160
Bug: skia:
Change-Id: I7977ca3048bd7d0c23f84db19f62f7accdcd77bb
Reviewed-on: https://skia-review.googlesource.com/155160
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-18 11:58:35 +00:00
skia-autoroll
f533d8a23a Roll third_party/externals/angle2 a49f60fee74d..95277a300f52 (3 commits)
a49f60fee7..95277a300f


git log a49f60fee74d..95277a300f52 --date=short --no-merges --format='%ad %ae %s'
2018-09-18 jie.a.chen@intel.com ES31: Add DispatchComputeIndirect support for D3D11
2018-09-17 courtneygo@google.com Fix AndroidManifest package name
2018-09-17 ynovikov@chromium.org Revert "Inline and micro-optimize more for perf tests."


Created with:
  gclient setdep -r third_party/externals/angle2@95277a300f52

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=reed@google.com

Change-Id: I51bbc3edb3c4871628caf6268bb147dba439880c
Reviewed-on: https://skia-review.googlesource.com/155120
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-18 04:19:17 +00:00
Brian Salomon
d2fcfb5813 WEBGL_video_texture : sharing texture prototype in skia
Bug: 776222

Change-Id: I84c81bdaa6dc0b5548f116a28c6319e601effb32
Reviewed-on: https://skia-review.googlesource.com/146695
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kenneth Russell <kbr@google.com>
2018-09-18 02:22:00 +00:00
Mike Klein
29a49bd220 Revert "implement SkPixmap::getPixel() with this->readPixels()."
This reverts commit 0944ae8afb.

Reason for revert: Chrome roll?

Original change's description:
> implement SkPixmap::getPixel() with this->readPixels().
> 
> Yet another big old switch statement I don't want to maintain.
> 
> Once again, I think this at least makes it explicit that we're
> returning an SkColor in the colorspace of the pixmap.
> 
> Change-Id: I34aa7312c0a1670910586fc5a4b1951275e73e2e
> Reviewed-on: https://skia-review.googlesource.com/154864
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com

Change-Id: I827491cc047645876d5b7d5ac0067d266252f7ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/155040
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-17 23:28:56 +00:00
Mike Klein
f19e3f48b5 simplify src->dst matrix init
src->toXYZD50() and dst->fromXYZD5() always work now.

And if they've somehow got a non-3x3 matrix, fine...  we'll just handle
it wrong.  It's better to initialize the src->dst 3x3 with what we've
got and ignore the outer row and column than to leave it uninitialized
or zero or identity.

Bug: oss-fuzz:10305

Change-Id: I1904a4e297758412a1cc442e88a45b5ec2be9fb5
Reviewed-on: https://skia-review.googlesource.com/154867
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-17 22:59:39 +00:00
Herb Derby
6c8d242b14 Make atomic lists list for bitmaps and paths
Make the listner list for bitmas and paths use a simple atomic
stack. This stack implementation does not have the ABA problem
because you can only pop the entire stack at once
with exchange(nullptr).

BUG=skia:8324

Change-Id: I7b0438a42c473b36cd4b0cbf236bf1692c5afab3
Reviewed-on: https://skia-review.googlesource.com/154861
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-17 20:54:06 +00:00
Brian Osman
90d2d9381e Revert "Add Short4 vertex attributes, and benchmark them as 4.12 colors"
This reverts commit d2ca0473f6.

Reason for revert: Various bots failing.

Original change's description:
> Add Short4 vertex attributes, and benchmark them as 4.12 colors
> 
> This is likely our best widely portable option for encoding wide gamut
> colors that doesnt sacrifice too much performance. The benchmark uses
> them as we're likely to do: 4.12 fixed point, in the destination color
> space. We're using SINT vertex attributes for simplicity, so the encode
> and decode are simple multiply/divide by 4096.
> 
> Bug: skia:
> Change-Id: I9b544f3e187b775d81f83dc9dd44611570ad33c2
> Reviewed-on: https://skia-review.googlesource.com/155001
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: I921e29cf9a121c5752ec7d99a03470b5193afd4a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/154883
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-17 20:41:30 +00:00
Brian Osman
d2ca0473f6 Add Short4 vertex attributes, and benchmark them as 4.12 colors
This is likely our best widely portable option for encoding wide gamut
colors that doesnt sacrifice too much performance. The benchmark uses
them as we're likely to do: 4.12 fixed point, in the destination color
space. We're using SINT vertex attributes for simplicity, so the encode
and decode are simple multiply/divide by 4096.

Bug: skia:
Change-Id: I9b544f3e187b775d81f83dc9dd44611570ad33c2
Reviewed-on: https://skia-review.googlesource.com/155001
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-17 20:19:07 +00:00
Brian Salomon
c525d4f710 When merging into an already chained op update the head's op bounds.
Also assert in GrRenderTargetOpList that chained ops' bounds are
contained in head op's bounds.

Change-Id: I70303ecfbb314d7d04d03f6ae6eae27e9956a7ce
Reviewed-on: https://skia-review.googlesource.com/154981
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-09-17 20:10:27 +00:00
Ben Wagner
9d289e2775 Use onOnceBeforeDraw instead of constructor for glyphs.
The PathText samples extracted glyph paths in the constructor, which
means that this is done when the sample is created instead of when it is
actually going to be drawn. This interferes with debugging other
samples, so delay extracting the glyph paths until onOnceBeforeDraw.

Change-Id: I342cc728b79426203273e5a19fb5ba3718c50fd6
Reviewed-on: https://skia-review.googlesource.com/155000
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-09-17 19:52:27 +00:00
Kevin Lubick
bc9a1a837d Make fuzz::next overloads more consistent
Some oss-fuzz bugs (like the linked one) would not reproduce
in Skia proper due to the fact that there were subtle overloads
of the various Fuzz::next() methods in FuzzCanvas.cpp that
were pulled in in Skia proper, but not oss-fuzz.

This puts all of them in to FuzzCommon.h and makes the
matrix and rrect ones opt-in (fuzz_matrix, fuzz_rrect).

Additionally, this renames fuzz.cpp -> FuzzMain.cpp so we
can properly include Fuzz.cpp in oss-fuzz without
having two mains.

Bug: oss-fuzz:10378
Change-Id: I6cf9afb471781b9fadb689482109a1e5662358b5
Reviewed-on: https://skia-review.googlesource.com/154900
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-17 19:20:51 +00:00
skia-autoroll
9947752efc Roll third_party/externals/angle2 017bda429667..a49f60fee74d (3 commits)
017bda4296..a49f60fee7


git log 017bda429667..a49f60fee74d --date=short --no-merges --format='%ad %ae %s'
2018-09-17 till.rathmann@gmx.de D3D11: Resolve multisampled EGL surfaces at eglSwapBuffers
2018-09-17 jmadill@chromium.org Inline and micro-optimize more for perf tests.
2018-09-17 jie.a.chen@intel.com Squash State dirty bits for CHROMIUM_path_rendering


Created with:
  gclient setdep -r third_party/externals/angle2@a49f60fee74d

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=reed@google.com

Change-Id: I52d81a5cfeb3d815b1060fdf5a26ef6ba8ef2a6a
Reviewed-on: https://skia-review.googlesource.com/154960
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-17 19:16:50 +00:00
Chinmay Garde
d92d035e00 Allow users of Skia to optionally link against X11 and GL on Linux.
Change-Id: Id46986c0c7865d1877766e1584550e0b9e1af6c2
Reviewed-on: https://skia-review.googlesource.com/154803
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-17 19:15:49 +00:00
Mike Klein
0944ae8afb implement SkPixmap::getPixel() with this->readPixels().
Yet another big old switch statement I don't want to maintain.

Once again, I think this at least makes it explicit that we're
returning an SkColor in the colorspace of the pixmap.

Change-Id: I34aa7312c0a1670910586fc5a4b1951275e73e2e
Reviewed-on: https://skia-review.googlesource.com/154864
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-17 18:28:24 +00:00
Mike Klein
42f29f1181 implement SkPixmap::erase() with draws
I don't want to have to maintain yet another switch on SkColorType.

This should also make color management a bit clearer?

Change-Id: I1508e0c30670b1987972f7eeba2dd6d23591c531
Reviewed-on: https://skia-review.googlesource.com/154862
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-17 18:09:26 +00:00
Jim Van Verth
6bdfebeb15 Some more shadow cleanup
Bug: oss-fuzz:10382, oss-fuzz:10399
Change-Id: Ifc3d70fd9f0eb6fb2a862dfd5b087167575330cf
Reviewed-on: https://skia-review.googlesource.com/154821
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-17 17:42:34 +00:00
Mike Klein
62bd12f723 add a couple bitmap cases to P3 GM
This checks drawBitmap() and a few ways to create P3 bitmaps.

Change-Id: I6f891c641a44249d7562f2f5ddeed8cbaa40ad40
Reviewed-on: https://skia-review.googlesource.com/154863
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-17 17:33:23 +00:00
Herb Derby
c03716dd76 Fix nullptr deref in cache lookup
An inner function was taking a ptr where almost everything
calling took a ref. All the ref's were ok, but the test was
still passing in a nullptr. Fix API and test.

Change-Id: I5bcb93f52fc1c58f7bb135b5891223ed863eaede
Reviewed-on: https://skia-review.googlesource.com/154860
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-17 17:14:26 +00:00
Mike Klein
581cf0dfc6 erase _every_ row of F32 SkPixmaps
We're doing a really thorough job of erasing the first row now.
Yet another piece of code that should probably be a draw.

Bug: oss-fuzz:9120

Change-Id: Icd62c3ba3df127f0b89731ec004109c1b0144fc5
Reviewed-on: https://skia-review.googlesource.com/154880
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-17 17:07:05 +00:00
Brian Osman
499bf1a599 Add half-float vertex attribute caps bit and benchmark
Updates the existing vertex color bench with a half-float mode.
Vanilla GL2/ES2 don't have half-float attributes. The extension
(OES_vertex_half_float) uses a different enum value for the type
parameter. For now, just support GL3/ES3. Otherwise, we could
add a check in GrGLGpu::setupGeometry to re-map GL_HALF_FLOAT
to GL_HALF_FLOAT_OES, based on caps?

Bug: skia:
Change-Id: I1325087db4e615023cceffe1c5b051232769d0ac
Reviewed-on: https://skia-review.googlesource.com/154822
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-17 17:05:35 +00:00
Ben Wagner
4c709a2fab [infra] Marker for IntelBayTrail BIOS update.
No-Try: true
Change-Id: I040cfa4f46ed2cf10535eb1782d72f0a2f3b1bcc
Reviewed-on: https://skia-review.googlesource.com/154881
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2018-09-17 16:47:35 +00:00
Chris Dalton
49ec21d7cc ccpr: Don't require flat interpolation
This requirement should have been removed at the time we switched to

Interpolation::kCanBeFlat.
Bug: skia:
Change-Id: I0b6d548e8a0fa691bb94d8169ba1c1c064f8f61d
Reviewed-on: https://skia-review.googlesource.com/154848
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-09-17 16:02:18 +00:00
Herb Derby
48415e96cf Simplify descriptors and thighten context lifetime
This should have the same context lifetimes as the orignal
(Khushal's) code. This still works with the shared
GPU/Remote rendering framework.

BUG=chromium:879321

Change-Id: I5e346b2c2eb5868d7b37b08ba769f0e52d29f185
Reviewed-on: https://skia-review.googlesource.com/153740
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-17 15:15:01 +00:00
Ben Wagner
17d1896a44 Update OS on GalaxyS7.
Change-Id: Iee1dbb2f008a4b79f7c213016ff97b9b50fbd673
Reviewed-on: https://skia-review.googlesource.com/154500
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2018-09-17 14:49:05 +00:00
Robert Phillips
736f83c307 Always reset the SkPathRef's RRect and Oval-ness flags in growForVerb and growForRepeatedVerb
Follow up change to https://skia-review.googlesource.com/c/skia/+/154629 (Make a moveTo after an SkPath::addRRect invalidate the rrect-ness of the path)

Change-Id: Id546aa576bfab6773a9e17d695fe5f1d2f60f66e
Reviewed-on: https://skia-review.googlesource.com/154820
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-17 14:24:48 +00:00
Robert Phillips
8dce87a936 Cleanup SkCornerPathEffect a bit
Change-Id: I960362c8253506e254923224d5d87b79e3e0b5b2
Reviewed-on: https://skia-review.googlesource.com/154631
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-09-17 14:24:19 +00:00
Robert Phillips
68408df01e Make a moveTo after an SkPath::addRRect invalidate the rrect-ness of the path
For posterity:

Prior to this CL, after we added a round rect to a path, the subsequent addition of moveTos didn't invalidate the 'round-rect-ness' of that path.
This caused trouble later when we tried to extract the RRect from the path.
The addition of the moveTos altered the bounds of the path (so the rect portion of the returned RRect was incorrect) and, bc the bounds were used to determine which corner each conic represented (to extract the radii), the extracted radii were incorrect.

To make this more concrete, here is the rrect that went in:
		fLeft	7.49565078e-27	float
		fTop	5.01922015e+33	float
		fRight	5.13968144e+36	float
		fBottom	5.02191391e+33	float
-	fRadii
+		[0]	{fX=0.000000000 fY=0.000000000 }	SkPoint
+		[1]	{fX=0.000000000 fY=0.000000000 }	SkPoint
+		[2]	{fX=1.92122573e+10 fY=10069.3330 }	SkPoint
+		[3]	{fX=0.000000000 fY=0.000000000 }	SkPoint

and here is the rrect that came out:

		fLeft	0.000000000	float
		fTop	0.000000000	float
		fRight	5.13968144e+36	float
		fBottom	5.02191391e+33	float
-	fRadii
+		[0]	{fX=0.000000000 fY=0.000000000 }	SkPoint
+		[1]	{fX=0.000000000 fY=0.000000000 }	SkPoint
+		[2]	{fX=0.000000000 fY=0.000000000 }	SkPoint
+		[3]	{fX=0.000000000 fY=0.000000000 }	SkPoint

where the additional moveTos all moved to (0.0f, 0.0f)

Change-Id: I8c98d83f8a483d14104f80ac4e22963949f19fe4
Reviewed-on: https://skia-review.googlesource.com/154629
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-17 13:23:59 +00:00
Robert Phillips
389dc1166f Fix SkRRect::setRectXY case where rescaling results in a rect
In the observed fuzzer case the rescale was forcing both the xRadius and the yRadius to zero. The type validation was then failing since the RRect should've been a rect.

Change-Id: I73abcca4ced7bb3dfd74141af2f28051175d574d
Reviewed-on: https://skia-review.googlesource.com/154633
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-17 13:17:20 +00:00
Jim Van Verth
3a039d59df Add perspective support to blur shadows
Bug: skia:7971
Change-Id: Iaf6049bc9b8286c7ee314cfa5a0b8e3287b95bfd
Reviewed-on: https://skia-review.googlesource.com/154632
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-17 12:56:25 +00:00
skia-autoroll
060e992ef5 Roll third_party/externals/angle2 62114aae8550..017bda429667 (1 commits)
62114aae85..017bda4296


git log 62114aae8550..017bda429667 --date=short --no-merges --format='%ad %ae %s'
2018-09-17 jiajia.qin@intel.com Fix the ASSERT error


Created with:
  gclient setdep -r third_party/externals/angle2@017bda429667

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=reed@google.com

Change-Id: I0d246102b723e360ea6bceaa3bd836272c75d106
Reviewed-on: https://skia-review.googlesource.com/154711
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-17 10:12:19 +00:00
skia-recreate-skps
098c1355bf Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: If01c4d665f18b80042068a3ba9697925b9df5b98
Reviewed-on: https://skia-review.googlesource.com/154808
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2018-09-16 08:33:24 +00:00
Mike Reed
840debe9c7 don't try to extract or blur a zero-sized bitmap
Bug:884473
Change-Id: Ic61238633f65c66db0d5d00c2c438f03552ec7c9
Reviewed-on: https://skia-review.googlesource.com/154634
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-09-15 16:33:33 +00:00
skia-autoroll
8e73f4b6bb Roll third_party/externals/angle2 4230d4847fdc..62114aae8550 (1 commits)
4230d4847f..62114aae85


git log 4230d4847fdc..62114aae8550 --date=short --no-merges --format='%ad %ae %s'
2018-09-14 courtneygo@google.com glBufferSubData: Exit early if size is zero


Created with:
  gclient setdep -r third_party/externals/angle2@62114aae8550

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=caryclark@google.com

Change-Id: Iac2f6f7733b9fc389dc67af8765677e0dd160ac2
Reviewed-on: https://skia-review.googlesource.com/154703
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-15 04:59:02 +00:00
Michael Ludwig
afebe1614e Remove all old gpu gradient code
At this point, all gradient configurations should be handled by the new
FP gradient code path so this removes all of the dead code.

Bug: skia:
Change-Id: If6041edcd8417d8f345e17000ccb27d9efea0bb3
Reviewed-on: https://skia-review.googlesource.com/152383
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 22:21:56 +00:00
Brian Osman
d4c29709ca Specify CPU (buffer) and GPU (shader) types explicitly in Attribute
The CPU type is still specified using GrVertexAttribType.
The GPU type is specified directly using GrSLType.

kHalfX_GrVertexAttribType now really means half-float buffer
data, rather than float. (Caveat: The GL enum is only correct
with ES3/GL3 - ES2+extension needs a different value. Sigh.)

Bug: skia:
Change-Id: Ife101db68a5d4ea1ddc2f6c60fbec0c66d725c16
Reviewed-on: https://skia-review.googlesource.com/154628
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-14 21:54:03 +00:00
skia-autoroll
1de063cb45 Roll third_party/externals/swiftshader a764381ef9f3..25c541e51cbd (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/a764381ef9f3..25c541e51cbd


git log a764381ef9f3..25c541e51cbd --date=short --no-merges --format='%ad %ae %s'
2018-09-14 sugoi@google.com Build fix


Created with:
  gclient setdep -r third_party/externals/swiftshader@25c541e51cbd

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=caryclark@google.com

Change-Id: If797aae4d4d81505519bddf081dedfa275e77a77
Reviewed-on: https://skia-review.googlesource.com/154702
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-14 21:38:22 +00:00
Chris Dalton
ce038dce94 ccpr: Clamp the number of linear stroke segments
Clamps the number of linear segments before indexing into arrays with
it (oops). Also adds some minor fixups surrounding NaNs.

Bug: skia:8360
Change-Id: Id520ac49df2ebce71bda9fcaa0f164ddb6ddf2d2
Reviewed-on: https://skia-review.googlesource.com/154771
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-14 20:35:50 +00:00
Michael Ludwig
7f8c5249d5 Port gradient unit tests over to new FPs
Previously, the GPU gradient tests were included in the SkXGradient
implementation and provided a processor factory that used the public
SkGradientShader::MakeX() end points to get at the final GrFragmentProcessor.

This factory approach is maintained as well, so there are no individual
tests for the specific colorizers. The tests are added to the layouts that
correspond to the public gradient constructor.

Bug: skia:
Change-Id: Iac74d8490efd0fb7395ad9fc0581906abb815742
Reviewed-on: https://skia-review.googlesource.com/151548
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 20:16:03 +00:00
Mike Klein
be569494c4 add bitmap shaders to P3
Update SkImageShader/SkBlitter_sprite to use SkPaint::getColor4f().

Split the set_rgb into bounded and unbounded variants, just like we did
with uniform_color (the exact rgba variant).  Without this we'd try to
draw out-of-gamut colors in lowp for the non-scaled shader draw in
--config srgb, and that can't work.  SkRasterPipeline::append_set_rgb()
now checks to see if it's safe to use ::set_rgb and lowp, falling back
on ::unbounded_set_rgb and floats.

In the GM, the new "sprite" case is handled by SkImageShader, and the
old "sprite" case is handled as a uniform color draw through an A8 mask.
I'm having trouble constructing a call that reaches the A8 code in
SkBlitter_Sprite, but I have confirmed that it's definitely used by
quickly running the other GMs.  I've updated it to use the float paint
color just like SkImageShader.

Change-Id: I1ca8c08b79631165ac0c0032a1406add80e55c9f
Reviewed-on: https://skia-review.googlesource.com/154624
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-14 20:05:32 +00:00
skia-autoroll
6fd6631123 Roll third_party/externals/angle2 7f2329398fe8..4230d4847fdc (2 commits)
7f2329398f..4230d4847f


git log 7f2329398fe8..4230d4847fdc --date=short --no-merges --format='%ad %ae %s'
2018-09-14 jmadill@chromium.org Finish fixing EGL enums.
2018-09-14 jmadill@chromium.org Vulkan: Fix cube map attachment clears and readpixels.


Created with:
  gclient setdep -r third_party/externals/angle2@4230d4847fdc

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=caryclark@google.com

Change-Id: I9f770fd46b978f45da954a2a0d608db8eb2c90d6
Reviewed-on: https://skia-review.googlesource.com/154701
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-14 19:55:12 +00:00
Michael Ludwig
b96cba3f1a Report optimizations in master gradient effects
All of the FPs for the gradient components have had to be updated to
include the @optimizationFlags section. Layout FPs now can use the
opacity preserving optimization to report whether or not they might
reject a fragment (e.g. 2 point conical gradients).

The previous composition logic that handled ensuring the gradient shader
output a premul color was removing optimizations that should have been
valid for gradients, so the make premul logic has been inlined into
the top-level effect FPs.

Bug: skia:
Change-Id: I73e4224d8dc0e3420a215b0aa805d829b08f6c76
Reviewed-on: https://skia-review.googlesource.com/151547
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 19:13:23 +00:00
Jim Van Verth
7b617a7fc8 Fix some issues with shadow tesselation
Bug: oss-fuzz:10348
Change-Id: I818f741452bdb8092796f78bb73d9b518502e4c9
Reviewed-on: https://skia-review.googlesource.com/154627
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-14 18:51:14 +00:00
Herb Derby
04e0c8b2f1 Make setupForAsPaths produce a canonical paint
There are three call sites two of them clear the path
effect and set the style. The third is SkCanonicalizePaint
which is used for measureText, getTextWidths, getFontMetrics,
and breakText.

Change-Id: Idb85323a55d3efaf7713884cf757ea2ff88b4a45
Reviewed-on: https://skia-review.googlesource.com/154460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-14 18:47:54 +00:00
Michael Ludwig
a7914d3a8e Implement textured gradients
Also clones SkGradientBitmapCache into GrGradientBitmapCache in the
gpu/gradients folder. But after cleaning up the old gradient code,
SkGradientBitmapCache will go away and SkGradientShader will have no
reference to the bitmap cache or support for building bitmaps.

The "new" GrGradientBitmapCache has been updated to hide the thread
safety responsibilities and gradient bitmap generation code that had
originally been a part of SkGradientShader.

Bug: skia:
Change-Id: Ida134c6437c866439fac44fa453d09a6a11549e7
Reviewed-on: https://skia-review.googlesource.com/150917
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 17:31:53 +00:00
Chris Dalton
b68bcc4398 ccpr: Remove the dangling pointer from GrCCDrawPathsOp
Actually takes a ref on fOwningPerOpListPaths, instead of just
asserting it continues to exist. Removes unnecessary asserts
surrounding dangling pointers.

Bug: skia:8359
Change-Id: Ie80da55510f320452bd9ee3a4b38bd59d48681a0
Reviewed-on: https://skia-review.googlesource.com/154684
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-09-14 16:32:58 +00:00
Robert Phillips
66f6ef41b9 Harden SerializedImageFilter fuzzer against filter creation failure
Change-Id: Ic9cc0e17af55300a0de4eab7a61d150f2c07314a
Reviewed-on: https://skia-review.googlesource.com/154626
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-14 16:18:22 +00:00
Robert Phillips
f026d896dc Preserve fLastMoveToIndex in SkPath::transform
This should remedy some of the SkPath::reverseAddPath fuzzer failures

Change-Id: Ic9fe6106b4a0693084b75f0544b672cea78be3cc
Reviewed-on: https://skia-review.googlesource.com/154625
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-14 15:37:22 +00:00
Cary Clark
7724d3f494 fix error reporting for doc examples
Switching parts of bookmaker to use SkJSONCPP.h
introduced a couple of bugs. Fix them.

Report errors found when parsing fiddleout.json,
the results of compiling doc examples.

Parse status.json correctly for spell checking.

TBR=fmalita@chromium.org

Bug: skia:8376
Change-Id: I86d92b0613ece54495efb43424b8fca56aa2cdaf
Reviewed-on: https://skia-review.googlesource.com/154623
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-09-14 13:34:16 +00:00
Michael Ludwig
0495f7aec3 Implement dual interval gradients
Adds a new colorizer implementation that supports gradients with two
interpolation intervals. The two intervals can share a middle color
to represent the usual 3-color gradient, or can have different colors
to represent a hard stop at an arbitrary point.

Bug: skia:
Change-Id: I8c73705e83b99e28ad5c834230ced4e3b7b9d1c4
Reviewed-on: https://skia-review.googlesource.com/150700
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 13:12:52 +00:00
Brian Salomon
776a411b52 Pin miter sin half angle to 0 in GrAAConvexTessellator.
Covers slightly concave ring outsets.

Bug: chromium:883331
Change-Id: I1d3d5be5d2ad9d7cd8953356164e9763922b274a
Reviewed-on: https://skia-review.googlesource.com/154541
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-09-14 13:00:32 +00:00