Commit Graph

37156 Commits

Author SHA1 Message Date
Robert Phillips
4524e25634 Fix Chrome iOS builder
Change-Id: Ie93981df676e5e525f64ff8754760f24fa317412
Reviewed-on: https://skia-review.googlesource.com/156187
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-21 18:44:17 +00:00
Cary Clark
c9b49fe8d5 sync color4f with docs
NOTRY=true
TBR=brianosman@google.com

Docs-Preview: https://skia.org/?cl=156300
Bug: skia:
Change-Id: I7e4f8079b5c30dfaf08cf719a5d90a0eff64906b
Reviewed-on: https://skia-review.googlesource.com/156300
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-21 18:38:38 +00:00
Lee Salzman
5d8949c119 mark SkCanvas layer device as immutable before compositing it on restore
Making a SkSpecialImage via snapSpecial on the layer device during restore
triggers an unnecessary and problematic copy. The layer device will never
be further modified since it is about to be destroyed, but the snapshot
does not know of this since it is never informed.

This ensures that the layer device's internal bitmap is properly marked
as immutable before it is composited so that snapshotting it does not
create a copy anymore.

Bug: skia:
Change-Id: I13dd3b5c0e1b8e7c9dfededba53d21dbac2d5c63
Reviewed-on: https://skia-review.googlesource.com/155635
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-21 18:34:32 +00:00
Brian Osman
893052ea51 Reland "Preserve colorType and alphaType in SkImage::makeColorSpace"
This reverts commit 0d08b3e4b1.

Reason for revert: Fixed Chrome test.

Original change's description:
> Revert "Preserve colorType and alphaType in SkImage::makeColorSpace"
> 
> This reverts commit d842557c07.
> 
> Reason for revert: Chrome roll failing CanvasAsyncBlobCreatorTest.ColorManagedConvertToBlob test.
> 
> Original change's description:
> > Preserve colorType and alphaType in SkImage::makeColorSpace
> > 
> > Raster images were always converting to N32, and GPU images were
> > always converting to premul. These were unexpected and inconsistent.
> > 
> > Bug: skia:8382
> > Change-Id: I78fe6cff1208eef077a71d08e676cf8f8d5fed9a
> > Reviewed-on: https://skia-review.googlesource.com/156142
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
> 
> TBR=mtklein@google.com,brianosman@google.com
> 
> Change-Id: I366b097644ac1fa920fc9addcad3e09c2a0a63cc
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8382
> Reviewed-on: https://skia-review.googlesource.com/156184
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I860f33a1d57e0e77ce63b78d66d49a1082d2b4dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8382
Reviewed-on: https://skia-review.googlesource.com/156188
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-21 18:21:38 +00:00
Cary Clark
8fe2940ae2 doc change for getAlphaf
Please add this to your CL when you reland.
Thanks!

R=reed@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=156007
Bug: skia:
Change-Id: Iba458272d34d2dee412b95baeabaf6eff181e93a
Reviewed-on: https://skia-review.googlesource.com/156007
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-09-21 18:11:06 +00:00
Mike Reed
c25f440d53 Reland "add getAlphaf() to pixmap/bitmap"
This is a reland of f3ebd312f2

PS 2: use faster half->float routine
PS 3: relax tolerance to 2^-10 for half, keeping others 2^-12

Original change's description:
> add getAlphaf() to pixmap/bitmap
>
> Convenient for just extracting alpha (and more efficient than getColor()) and
> works for super-normal formats w/o loss of precision.
>
> Somewhat inspired by examining multiple chrome call-sites for getColor(), where
> chrome only really cared about the alpha. This new method runs about twice
> as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
> even faster in the complex cases (since retrieving alpha doesn't care about
> colorspaces).
>
> Bug: skia:
> Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
> Reviewed-on: https://skia-review.googlesource.com/155606
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

Cq-Include-Trybots: skia.primary:Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Debug-All-Android,Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_CPU_LIMIT_SSE2,Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All,Test-Win2016-MSVC-GCE-CPU-AVX2-x86_64-Release-All,Test-Win8-Clang-Golo-CPU-AVX-x86_64-Debug-All
Bug: skia:
Change-Id: Ie94e5c89e185fde12cbd6c56ed4026c4dc5a1623
Reviewed-on: https://skia-review.googlesource.com/156242
Commit-Queue: Ravi Mistry <rmistry@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-21 17:41:03 +00:00
Mike Klein
60900b55f9 move skpipe to experimental
Nothing's using it except test tools.
I'd like to make that a bit clearer by getting it out of src.

Disabled the fuzzer.

Removed the bench so Android's building nanobench doesn't block this.

Bug: chromium:886713

Change-Id: I761f52c40171c27ff4b699409b32647e84684ec3
Reviewed-on: https://skia-review.googlesource.com/156240
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-09-21 17:20:25 +00:00
Kevin Lubick
1466af42a4 [canvaskit] Link demos to fiddles
This adds one more skottie example and spruces up
the demos a bit (including making the star only
respond when you hold down the mouse)

No-Try: true
Docs-Preview: https://skia.org/?cl=156141
Bug: skia:
Change-Id: Ib577d6c06bd9784f4566d506150c451beadf1f1c
Reviewed-on: https://skia-review.googlesource.com/156141
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-09-21 16:49:24 +00:00
Kevin Lubick
4e771faa85 Update lottie samples
I edited some of the samples that had only white things to have
some color so we can see them in gold.  Those now have the
suffix _edit.

Additionally, I removed one that required a bundled image that we
don't have (WeAccept.json)

NOTRY: true
Bug: skia:
Change-Id: Ie5104315f5ebf19f9c5f7f2b7a58454d8def2737
Reviewed-on: https://skia-review.googlesource.com/156182
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-09-21 16:34:04 +00:00
Mike Klein
6e78ae5525 Reland "have SkConvertPixels use SkColorSpaceXformSteps"
This is a reland of 6d0e566e94

On second thought, it's probably better to correct the
types of the swizzle functions to express their required alignment.
This is a more involved CL, but I think leaves things better off.

Original change's description:
> have SkConvertPixels use SkColorSpaceXformSteps
>
> This ought to allow the fast paths in more cases, e.g. memcpy() when
> both src and dst are the same format.  Today if we tag a dst color space
> at all, we'll think we need to fall back to the general case pipeline.
>
> Some refactoring too, but no big functional change beyond using steps.
>
> Change-Id: I8fa01025229e3b9418e7f43241a2f03628a97288
> Reviewed-on: https://skia-review.googlesource.com/155640
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Change-Id: Ia17d93acfe88a36c4c36d29e3a0b243f91178b61
Reviewed-on: https://skia-review.googlesource.com/156241
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-21 16:18:06 +00:00
Brian Osman
0d08b3e4b1 Revert "Preserve colorType and alphaType in SkImage::makeColorSpace"
This reverts commit d842557c07.

Reason for revert: Chrome roll failing CanvasAsyncBlobCreatorTest.ColorManagedConvertToBlob test.

Original change's description:
> Preserve colorType and alphaType in SkImage::makeColorSpace
> 
> Raster images were always converting to N32, and GPU images were
> always converting to premul. These were unexpected and inconsistent.
> 
> Bug: skia:8382
> Change-Id: I78fe6cff1208eef077a71d08e676cf8f8d5fed9a
> Reviewed-on: https://skia-review.googlesource.com/156142
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I366b097644ac1fa920fc9addcad3e09c2a0a63cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8382
Reviewed-on: https://skia-review.googlesource.com/156184
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-21 15:48:51 +00:00
Brian Osman
81cbd03a24 Work toward removing SkPM4f
Added SkColor4f premul/unpremul that just return SkColor4f.
Renamed existing premul to toPM4f. For many uses of SkPM4f,
conversion to pure SkColor4f code was simple. In all other
cases, continue to use SkPM4f for now.

Also convert usage of one-off SkRGBAf class in SkPatchUtils,
and delete that class, along with some truly tautological
unit tests that were the only thing keeping some PM4f API
around.

Bug: skia:
Change-Id: I344c3290ee7af6bbe86c3ff74a2df2f5e87afa38
Reviewed-on: https://skia-review.googlesource.com/156005
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-21 15:44:51 +00:00
Cary Clark
5717e82cf4 shorten animation to work around fiddlecli bug
longer animation for SkImage::makeFromFilter
example breaks fiddlecli.

TBR=jcgregorio@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=156183
Bug: skia:
Change-Id: I512e982bbaf7fb3e4c58706b4d7e416f4ceac294
Reviewed-on: https://skia-review.googlesource.com/156183
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-21 15:41:31 +00:00
Ben Wagner
7b562291a7 Use SkUniqueCFRef in SkImage*CG.
This clarifies ownership and makes the code more readable.

It is safe to use unique_ptr directly for UniqueCFRef, since
unique_ptr does not call the deleter with nullptr.

Change-Id: I4326a86059fb31488d1e163faca95a6c29960039
Reviewed-on: https://skia-review.googlesource.com/155612
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-09-21 15:35:29 +00:00
Jim Van Verth
9ea7682ba4 Fix line distance issue
Bug: oss-fuzz:9430
Change-Id: If785ed487d007fc01a7625686246fe5a66575371
Reviewed-on: https://skia-review.googlesource.com/156180
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-21 15:28:52 +00:00
Brian Osman
d842557c07 Preserve colorType and alphaType in SkImage::makeColorSpace
Raster images were always converting to N32, and GPU images were
always converting to premul. These were unexpected and inconsistent.

Bug: skia:8382
Change-Id: I78fe6cff1208eef077a71d08e676cf8f8d5fed9a
Reviewed-on: https://skia-review.googlesource.com/156142
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-21 14:44:29 +00:00
Brian Osman
7ca284b3e7 Set window dimensions with GetClientRect, not GetWindowRect
Bug: skia:
Change-Id: I7dc2cc011827654c2dd3faf681d1909afeb9bb85
Reviewed-on: https://skia-review.googlesource.com/156143
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-09-21 14:18:18 +00:00
Robert Phillips
b4a8eacb19 Add SkImage_Base API to access planar data
In order to test YUV promise images we need to be able to access the planes.

Split out of: https://skia-review.googlesource.com/c/skia/+/151983 (Test YUV images in DDL)

Bug: skia:7903
Change-Id: If232a5fdeb90833da6db727b1997a3c744bcd9dd
Reviewed-on: https://skia-review.googlesource.com/156140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-21 13:33:36 +00:00
Ethan Nicholas
f610bae661 fixed spelling of 'preferred'
Bug: skia:
Change-Id: I46f456925fa7bb10b87585f7e17f114c2db04d9b
Reviewed-on: https://skia-review.googlesource.com/156006
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-09-21 13:16:25 +00:00
Kevin Lubick
217056c048 [CanvasKit] Implement some basic Canvas/Surface things.
drawText is having issues in a release build.  Skottie sometimes
asserts in debug mode. This possibly has something to do with
memory alignment - like https://skia-review.googlesource.com/c/skia/+/155980
helped fix.

Patchset 9 shows off integrating Skia drawing to
an HTML canvas using Ganesh.

To see it locally, set up https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
and then set $EMSDK to be that directory.  Then run

   make clean
   make local-example

and navigate to http://localhost:8000/skia-wasm/example.html

Patchset 20 shows off Skottie animating directly to a Canvas.

Docs-Preview: https://skia.org/?cl=153882
Bug: skia:
Change-Id: I2ad2f4ffac00925ee901982ccbaeb7aa63b1ea23
Reviewed-on: https://skia-review.googlesource.com/153882
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-09-21 12:03:55 +00:00
skia-autoroll
38ca6d509d Roll third_party/externals/angle2 a977acc85769..ab5fb5edb186 (4 commits)
a977acc857..ab5fb5edb1


git log a977acc85769..ab5fb5edb186 --date=short --no-merges --format='%ad %ae %s'
2018-09-21 oetuaho@nvidia.com Reland "Support EXT_blend_func_extended in the GLES2 context"
2018-09-21 jmadill@chromium.org Remove secondary Texture rendering loop check.
2018-09-21 oetuaho@nvidia.com Fix using a large vertex attrib divisor on D3D11
2018-09-21 jmadill@chromium.org Move sampler sync out of syncProgramTextures.


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

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: I7224ee76ad73a44c2b150f0ec193745e4382c261
Reviewed-on: https://skia-review.googlesource.com/156100
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-21 11:21:15 +00:00
skia-autoroll
05cf051f02 Roll third_party/externals/angle2 52ea49706fd7..a977acc85769 (2 commits)
52ea49706f..a977acc857


git log 52ea49706fd7..a977acc85769 --date=short --no-merges --format='%ad %ae %s'
2018-09-21 jiawei.shao@intel.com ES31: Support translating textureGather into HLSL - Part I
2018-09-20 ianelliott@google.com Change the name of the opt'ed-in app from maps to cubey.


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

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: I68afea91f967c6b6443221528badb4a210ebed7c
Reviewed-on: https://skia-review.googlesource.com/155861
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-21 02:20:51 +00:00
Brian Osman
82e0e444a5 Remove a largue quantity of 4444 and/or dithering code
Most of this was entirely unused. Some was only used by the dithering
sample (which is now also deleted).

Bug: skia:
Change-Id: Ibafe61e9b19cae8738fd8df2c94dca182722e2e6
Reviewed-on: https://skia-review.googlesource.com/155921
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-21 00:50:06 +00:00
Hal Canary
bf79d5b837 SkPDF: add SK_API to new public factory.
Change-Id: I2396cb156d486f65d49a5f83a34886007b36026a
Reviewed-on: https://skia-review.googlesource.com/156009
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-09-21 00:45:03 +00:00
Mike Klein
7ea977bc5e Reland "always optimize third_party code"
This is a reland of c766370d86

Original change's description:
> always optimize third_party code
> 
> Change-Id: I5b2244460a4760e9336640f597d0f74c374a0d04
> Reviewed-on: https://skia-review.googlesource.com/155641
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: I63e7f9ca852fc99728d7a01d9987b3506115d266
Reviewed-on: https://skia-review.googlesource.com/155760
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-20 23:21:01 +00:00
Mike Klein
44c6167c41 Revert "have SkConvertPixels use SkColorSpaceXformSteps"
This reverts commit 6d0e566e94.

Reason for revert: broke flutter post-roll, apparently

Original change's description:
> have SkConvertPixels use SkColorSpaceXformSteps
> 
> This ought to allow the fast paths in more cases, e.g. memcpy() when
> both src and dst are the same format.  Today if we tag a dst color space
> at all, we'll think we need to fall back to the general case pipeline.
> 
> Some refactoring too, but no big functional change beyond using steps.
> 
> Change-Id: I8fa01025229e3b9418e7f43241a2f03628a97288
> Reviewed-on: https://skia-review.googlesource.com/155640
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: Ie32c763bb637f959696c4458826a02919938a578
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/156008
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-20 23:13:35 +00:00
Mike Klein
32f12aca36 roll zilb
This rolls in a few things, most saliently today's bug fix.

Change-Id: I9818b9cc408e48243bd6d48dcb555f9fb7c76fd2
Reviewed-on: https://skia-review.googlesource.com/156042
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-20 21:17:20 +00:00
Mike Klein
7780c4c4e1 remove pin in SkColor4f::premul()
As prep for fusing SkPM4f into SkColor4f,
we noticed this pin.  It's usually premature to pin
when premultiplying here if the output format is wide.

We might want to replace this with pinThenPremul(),
and add a new premul() that starts fresh without a pin?

Change-Id: I0a8df58060ccab249f4df86eb88289dbf5934fb4
Reviewed-on: https://skia-review.googlesource.com/156002
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-20 21:09:29 +00:00
Heather Miller
63fd39701a progress on canvaskit page
No-Try: true
Docs-Preview: https://skia.org/?cl=155920
Bug: skia:
Change-Id: I9badf67a68c234520796ee0da4940ffb32a56f9d
Reviewed-on: https://skia-review.googlesource.com/155920
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-09-20 20:36:52 +00:00
Ben Wagner
cc62b5d638 Fix bzl missing include dir.
No-Try: true
Change-Id: Ic9b22cf8859417b6f757124a12903e630af94feb
Reviewed-on: https://skia-review.googlesource.com/156003
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2018-09-20 20:30:48 +00:00
Ben Wagner
71a2e00784 Fix bzl formatting.
No-Try: true
Bug: skia:8210
Change-Id: Id1efcb23b58bfff024d04d2a9b1ed3e9dd89cba7
Reviewed-on: https://skia-review.googlesource.com/156001
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2018-09-20 20:10:28 +00:00
Ben Wagner
75d6db7c79 Properly align inside GrTextBlob.
In particular, on 32 bit machines GrTextBlob::Run may have higher
alignment requirements than the types which are stored before it in the
slab allocation. This sometimes manifests in unaligned access errors
when drawing an odd number of glyphs.

Change-Id: I6445001b3b3f1401eb53d988efd4cba835a100db
Reviewed-on: https://skia-review.googlesource.com/155980
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-09-20 20:04:28 +00:00
Robert Phillips
be852e44ef Revert "add getAlphaf() to pixmap/bitmap"
This reverts commit f3ebd312f2.

Reason for revert: unhappy bots

Original change's description:
> add getAlphaf() to pixmap/bitmap
> 
> Convenient for just extracting alpha (and more efficient than getColor()) and
> works for super-normal formats w/o loss of precision.
> 
> Somewhat inspired by examining multiple chrome call-sites for getColor(), where
> chrome only really cared about the alpha. This new method runs about twice
> as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
> even faster in the complex cases (since retrieving alpha doesn't care about
> colorspaces).
> 
> Bug: skia:
> Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
> Reviewed-on: https://skia-review.googlesource.com/155606
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I82ce00c09d16bf3e9b04f1c1bccd8cc6aa706ab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/156000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-20 19:48:08 +00:00
Jim Van Verth
c79b5dd351 Check for valid input to text draw.
Bug: oss-fuzz:8821
Change-Id: I170b64f97cd7189f8dbe3982b8dcc47afcb14cde
Reviewed-on: https://skia-review.googlesource.com/155940
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-09-20 19:36:36 +00:00
Mike Reed
f3ebd312f2 add getAlphaf() to pixmap/bitmap
Convenient for just extracting alpha (and more efficient than getColor()) and
works for super-normal formats w/o loss of precision.

Somewhat inspired by examining multiple chrome call-sites for getColor(), where
chrome only really cared about the alpha. This new method runs about twice
as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
even faster in the complex cases (since retrieving alpha doesn't care about
colorspaces).

Bug: skia:
Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
Reviewed-on: https://skia-review.googlesource.com/155606
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-20 19:25:22 +00:00
Florin Malita
268707284d [skottie] GM exercising external font loading
Sets up a fake web font loader which serves a local/resource font to
the sample text animation.

Also rename resources/skotty/skotty_* -> resources/skottie/skottie_*.

Change-Id: I4af5b24fc3cc5c63c78801979f9be56744047134
Reviewed-on: https://skia-review.googlesource.com/155881
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-09-20 19:05:35 +00:00
Mike Klein
a85838c22e send SkPMColor::toPMColor() through Sk4f_toL32()
This doesn't fix that 8888 gradient if we stop clamping,
but it seems like a good idea to land first anyway.

Change-Id: Ie0feda67da5996223db2fe4458f99d57cf13db71
Reviewed-on: https://skia-review.googlesource.com/155782
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-20 19:01:17 +00:00
Robert Phillips
e0e8393e10 Disable LCD text when drawing SkPictureImageFilter content
Bug: 878874
Change-Id: I6c1e4a024014079dfdca5d8082acc43640049f85
Reviewed-on: https://skia-review.googlesource.com/155922
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-20 18:57:47 +00:00
Brian Osman
2cbf12c333 Always use portable fonts in image filter test
Bug: skia:
Change-Id: I94defb54899bba4c2ef54bc970d5f35d12073788
Reviewed-on: https://skia-review.googlesource.com/155923
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-20 18:52:18 +00:00
Mike Klein
983886e573 add interp-in-premul case to GM
Change-Id: I9811c76c3db38d5ab49ba0312e433aa46744df05
Reviewed-on: https://skia-review.googlesource.com/155781
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-20 18:36:21 +00:00
Jim Van Verth
0f1bb92097 Add new PolyUtils benches
Bug: skia:
Change-Id: I62f02a122b431e6c9a866e80c441f3e18b1e69fb
Reviewed-on: https://skia-review.googlesource.com/155842
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-20 18:34:20 +00:00
Hal Canary
23564b9249 SkDocument: Factories now located in SkPDFDocument.h and SkXPSDocument.h
Change-Id: I48e73b27e52511292c2c0bd51ef0168766f53a80
Reviewed-on: https://skia-review.googlesource.com/152780
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-09-20 18:21:07 +00:00
Hal Canary
8b354dca8c SkPDF: draw persepctive rectangles
Improvement to following render tests:
    gradients_view_perspective_nodither
    gradients_view_perspective
    persp_shaders_aa
    persp_shaders_bw
    poly2poly

Bug: chromium:884150
Change-Id: Ie0dd45e7756aa15af2f3c3855ceca1d3141844d6
Reviewed-on: https://skia-review.googlesource.com/155880
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-09-20 17:47:43 +00:00
Brian Osman
1cf418b4d0 Some SkPM4f cleanup
Bug: skia:
Change-Id: I6a06b2ff951b9a1319c40b16b33840e220fecc37
Reviewed-on: https://skia-review.googlesource.com/155900
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-20 17:47:02 +00:00
Ben Wagner
0d96a4bc71 Remove SkAutoTCallIProc.
No longer used anywhere.

Change-Id: I029d0caf1bb60ba3e77761648193c01d39c37183
Reviewed-on: https://skia-review.googlesource.com/155843
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-09-20 17:42:02 +00:00
Mike Klein
6d0e566e94 have SkConvertPixels use SkColorSpaceXformSteps
This ought to allow the fast paths in more cases, e.g. memcpy() when
both src and dst are the same format.  Today if we tag a dst color space
at all, we'll think we need to fall back to the general case pipeline.

Some refactoring too, but no big functional change beyond using steps.

Change-Id: I8fa01025229e3b9418e7f43241a2f03628a97288
Reviewed-on: https://skia-review.googlesource.com/155640
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-20 17:35:22 +00:00
skia-autoroll
d3419a685e Roll third_party/externals/angle2 d511948b9f82..52ea49706fd7 (1 commits)
d511948b9f..52ea49706f


git log d511948b9f82..52ea49706fd7 --date=short --no-merges --format='%ad %ae %s'
2018-09-20 jmadill@chromium.org Vulkan: Enable a few BufferDataTests.


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

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: I29fdae1b8f14a2cfcb4649771f2e693f5d4e5cb5
Reviewed-on: https://skia-review.googlesource.com/155860
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-20 17:19:21 +00:00
Brian Osman
1b15198557 Fix/simplify equal_pixels
Luckily without maxDiff, we can completely remove the buggy
implementation of diff().

Bug: skia:
Change-Id: I365fb6e595e3b670950a016bcb8ee553d85a8b75
Reviewed-on: https://skia-review.googlesource.com/155844
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-20 17:10:23 +00:00
Hal Canary
c9873a5f8b Document headers: IWYU
Change-Id: If0c5b7d540d9f5980b30ff4209c57f8c57421282
Reviewed-on: https://skia-review.googlesource.com/155761
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-09-20 16:07:02 +00:00
Joe Gregorio
e9326bebdf Use new build targets in continuous build of skottie and debugger.
The new targets were added here: https://skia-review.googlesource.com/c/buildbot/+/155820

Bug: skia:
Change-Id: Iac387fb033cf66dff353efb83f52a442b3441539
Reviewed-on: https://skia-review.googlesource.com/155841
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2018-09-20 15:26:18 +00:00