Commit Graph

36204 Commits

Author SHA1 Message Date
Timothy Liang
de0be804d8 only set color index if using dual source blending in Metal gpu backend
also implemented setting blend constants to allow non-dual source blending

Bug: skia:8230
Change-Id: Id342e525f3a0b6a3e676f81058661f5a31e66843
Reviewed-on: https://skia-review.googlesource.com/146762
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-08-10 20:16:57 +00:00
Kevin Lubick
97d6d98402 [PathKit] Add various path effects
API Changes (nothing should be breaking):
 - Exposes conic, although all output formats (SVG, Canvas) need conics
to be approximated with quads. Tests have been added to verify this
happens.
 - Add .dash(), .trim(), .stroke() and examples for them.
 - Expose Stroke enums (StrokeJoin, StrokeCap)

Adds tests for the cubic part and clean up a few spacing things.

There are some changes to the C++ code to simplify the build -
otherwise, I need to appease the linker and add add in a bunch
of files that may or may not get optimized out.  Best make them
not even be compiled, just to make sure.

Bug: skia:8216
Change-Id: I1da3aaab1891f14a5b3dc01bb6523b4fd9a87b04
Reviewed-on: https://skia-review.googlesource.com/146650
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-10 20:07:47 +00:00
Mike Klein
3214f92fe9 clean up SK_LEGACY_CONVERT_PIXELS_IMPL
Change-Id: I991346b1fe7dba8ccceb52dfd95bd5f3897baafd
Reviewed-on: https://skia-review.googlesource.com/146860
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-10 20:04:01 +00:00
Cary Clark
57ca297f0c fix text blob example errors
missed several SkTextBlob::MakeAsDrawText that needed to become
SkTextBlob::MakeFromText.

NOTRY=true
TBR=caryclark@google.com

Docs-Preview: https://skia.org/?cl=146861
Bug: skia:6818
Change-Id: Ief383113823ca7bcd33fa83216e8c452b6a186fe
Reviewed-on: https://skia-review.googlesource.com/146861
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-08-10 19:56:03 +00:00
Cary Clark
87f71c0f7e fix bookmaker check for enum size
upcoming enum size change in public header
exposed missing check in bookmaker

TBR=mtklein@google.com

Bug: skia:6818
Change-Id: Idaf108cb36283805dd0ff8e709646325c78a9d66
Reviewed-on: https://skia-review.googlesource.com/146769
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-08-10 19:07:25 +00:00
Yuqian Li
a9660ec89b Reland "Update ShouldUseAAA with our better complexity estimation"
This is a reland of e847af7e0d

This CL adds the SK_SUPPORT_LEGACY_AA_CHOICE back and it will unblock Google3 and Android.

Original change's description:
> Update ShouldUseAAA with our better complexity estimation
>
> See https://groups.google.com/forum/#!topic/skia-discuss/QrJadRQR5A4 for the issue.
>
> Bug: skia:
> Change-Id: I260d1a57f64ff7a2fc47e6bce00cd8b8dbca81a9
> Reviewed-on: https://skia-review.googlesource.com/144412
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Bug: skia:
Change-Id: I18bece980b8152e7d423a328c1ebf2c61bf5d2f0
Reviewed-on: https://skia-review.googlesource.com/146220
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Yuqian Li <liyuqian@google.com>
2018-08-10 18:38:24 +00:00
Timothy Liang
b1f02f30bb enabled gms and most unit tests for Metal gpu backend
Bug: skia:
Change-Id: Ib8a15931b217c6cb353e0af2d2752cb08a400f1d
Reviewed-on: https://skia-review.googlesource.com/146645
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-08-10 18:29:50 +00:00
Mike Klein
02046a7e2d switch ubsan to blacklist
We're close enough that it's easier to use "undefined"
to turn on all supported UBSAN sanitizers and then
keep a couple in fyi_sanitizers as a blacklist.

I'm going to try to fix "enum" next too, so hopefully
that won't be in there too long.

I did a little flag cleanup too.  -fno-omit-frame-pointer
was harmlessly in there twice for Android builds.

Change-Id: I8216fb0685423b2ff56db2e2be5bbeb4b48f932f
Reviewed-on: https://skia-review.googlesource.com/146760
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-10 18:19:56 +00:00
Ben Wagner
e5416450b7 Change generateAdvance to never chain.
Now set to bool generateAdvance(SkGlyph*)

Change-Id: I48bda7858d4c5d90edcf7b7af810d0da56ae0dd9
Reviewed-on: https://skia-review.googlesource.com/146537
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Bruce Wang <brucewang@google.com>
2018-08-10 18:12:25 +00:00
Cary Clark
af04551333 refresh generated includes
generate include documentation for the first time
for SkRegion.h and SkTextBlob.h, and refresh a
few others.

TBR=reed@google.com

Bug: skia:6818
Change-Id: Ie8ad53095b3d7c5d8418c6cf2163a749ab6ecb53
Reviewed-on: https://skia-review.googlesource.com/146704
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-08-10 17:55:28 +00:00
Florin Malita
679d05c48a [sksg] Simplify ScopedRenderContext
ScopedRenderContext tries really hard to avoid unnecessary RenderContext
initializations.

This is most likely unneeded because

  a) the structure is quite lightweight

and

  b) all ScopedRenderContext instantiation sites imediately call setters
     which require a writable context (assuming no-op args are uncommon)

Let's get rid of that over-engineered gunk.

Bug: skia:
Change-Id: Ieedc20c63c66b4d43744359e881c20639654040c
Reviewed-on: https://skia-review.googlesource.com/146761
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-08-10 17:54:29 +00:00
Cary Clark
d2ca79c271 new batch of docs
new batch of docs

Docs-Preview: https://skia.org/?cl=141244
Bug: skia:
Change-Id: I5a285778baaee2734495374adeb7359d524e47e3
Reviewed-on: https://skia-review.googlesource.com/141244
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-08-10 17:44:46 +00:00
Timothy Liang
5422f9aa27 implemented GrMtlGpuCommandBuffer for draws in Metal gpu backend
Bug: skia:
Change-Id: Ifc20a7734a02fe48ef79af201b4ebc882aedefb3
Reviewed-on: https://skia-review.googlesource.com/146382
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-10 17:20:05 +00:00
Mike Klein
8da9fbf89c add bounds sanitizer to ASAN/UBSAN bots
Change-Id: Ibe93cd564a4dcc5b9a4f88ff93770935d560e24f
Reviewed-on: https://skia-review.googlesource.com/146705
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-10 17:11:45 +00:00
swiftshader-skia-autoroll
c533b335e1 Roll third_party/externals/swiftshader dd662d210afc..c47cd435bf6f (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dd662d210afc..c47cd435bf6f


git log dd662d210afc..c47cd435bf6f --date=short --no-merges --format='%ad %ae %s'
2018-08-10 sugoi@google.com Non libX11 build fix


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

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

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=djsollen@google.com

Change-Id: I3851fdd8ff7e18d3066f31f327ae03d6741a6cfa
Reviewed-on: https://skia-review.googlesource.com/146664
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-08-10 16:38:20 +00:00
swiftshader-skia-autoroll
4eac21fee0 Roll third_party/externals/swiftshader d7622ffdd25e..dd662d210afc (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d7622ffdd25e..dd662d210afc


git log d7622ffdd25e..dd662d210afc --date=short --no-merges --format='%ad %ae %s'
2018-08-10 sugoi@google.com SwiftShader on Fuchsia x64


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

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

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=djsollen@google.com

Change-Id: I44f2a6ed85ad0f101e15a715976eef714f510679
Reviewed-on: https://skia-review.googlesource.com/146663
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-08-10 15:38:27 +00:00
Ben Wagner
897dfa2530 Subpixel in Viewer from -1 to 1.
Change the Subpixel positioning in Viewer from 0 to 1 to -1 to 1, with
the origin at the center of the drag area. This allows for observing
what happens when rolling over integer boundaries. Since it is no longer
simple to reset to the origin, closing the collapsing header resets the
drag point to the origin.

Change-Id: I88d4fd489c3bfb914fb843fa261d4097fef3671a
Reviewed-on: https://skia-review.googlesource.com/146643
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-10 15:30:12 +00:00
angle-skia-autoroll
7cd011ab44 Roll third_party/externals/angle2 9b6a3f926032..04c084dd3cf4 (1 commits)
9b6a3f9260..04c084dd3c


git log 9b6a3f926032..04c084dd3cf4 --date=short --no-merges --format='%ad %ae %s'
2018-08-10 jmadill@chromium.org Extend MultiviewDrawValidationTest.


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

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

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=djsollen@google.com

Change-Id: I6ea9f108d65f29768553a670be7af31bbd14d0ac
Reviewed-on: https://skia-review.googlesource.com/146662
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-08-10 15:26:02 +00:00
Herb Derby
c1b482cddb Rename GrTextUtils::Target to GrTextTarget
Change-Id: I29e1c6e117a4cbbde6e43639228b1103966b6358
Reviewed-on: https://skia-review.googlesource.com/146641
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-08-10 15:21:52 +00:00
Timothy Liang
6ed63968a3 implemented GrMtlPipelineState for metal gpu backend
Bug: skia:
Change-Id: I4284b760411d9ec24cccfb89352406dbb696c3c9
Reviewed-on: https://skia-review.googlesource.com/145896
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-10 14:47:18 +00:00
Timothy Liang
7b8875dea7 implemented SK_CLOCKWISE_BUILTIN for Metal SkSLC
Bug: skia:
Change-Id: I0b77113868be8e5a719e9a286ecf7f87e5c86367
Reviewed-on: https://skia-review.googlesource.com/146533
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-10 14:23:13 +00:00
Greg Daniel
c27eb726bd Make sure GrResourceCache frees resources waiting on messages during destruction.
Bug: skia:6812
Change-Id: I86c50a9e301ae4846e638c915f94b797d60ee9a1
Reviewed-on: https://skia-review.googlesource.com/146646
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-10 14:14:47 +00:00
Mike Klein
93ce79dba4 drop SkTextBlob alignas(void*), align in Builder manually
GCC can't handle SK_API and alignas() next to each other,
tested up through GCC 8.1.

Instead, just align up the area we allocate for the SkTextBlob.

Bug: skia:8239

Change-Id: Ibdccfc09649b79a6eaa50ffd731d4bab012d24df
Reviewed-on: https://skia-review.googlesource.com/146703
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-10 13:24:23 +00:00
Robert Phillips
5b5d84cc1f Cache the command buffer objects
Change-Id: I35bc1fab8ed6b72baf75d2e4271a040e0209440d
Reviewed-on: https://skia-review.googlesource.com/145821
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-10 11:22:56 +00:00
angle-skia-autoroll
e9f66b26b1 Roll third_party/externals/angle2 468484201532..9b6a3f926032 (5 commits)
4684842015..9b6a3f9260


git log 468484201532..9b6a3f926032 --date=short --no-merges --format='%ad %ae %s'
2018-08-09 jmadill@chromium.org D3D: Speculative fix for VertexBuffer crash.
2018-08-09 jmadill@chromium.org Make Context handle dirty texture events.
2018-08-09 jmadill@chromium.org Remove some Vulkan perftest configs.
2018-08-09 jmadill@chromium.org Use active textures mask in GL and Vulkan.
2018-08-09 jmadill@chromium.org Program: Add cache samplers and type masks.


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

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

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=djsollen@google.com

Change-Id: I231a3ce5071f59990949ac7fc08883ade0e3a0db
Reviewed-on: https://skia-review.googlesource.com/146661
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-08-10 05:55:49 +00:00
recipe-roller
db9b8245a8 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/bd5111dec043a367d69d85b81289e2207aa26f6e [cipd] Clean docs, pylint errors, add pkg-fetch, pkg-deploy. (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I2069eef7c4f0232ca88da50cc800e14a6a9deb81
Reviewed-on: https://skia-review.googlesource.com/146658
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2018-08-10 00:53:32 +00:00
recipe-roller
52b035b6eb Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/01519bca7833290d850f394b71f46f4dc1b0146e [path] Cleanup pylint warnings, add more docs. (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I250ef5dd993fd933f81d22d59b29287232a32b56
Reviewed-on: https://skia-review.googlesource.com/146656
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2018-08-10 00:19:32 +00:00
Mike Klein
141d408bb0 remove SkColorSpaceXform fast path
SkColorSpaceXform is no longer a particularly fast path
compared to the raster pipeline default case.

Guarded with SK_LEGACY_CONVERT_PIXELS_IMPL for layout tests.

Change-Id: I4beb2f536013058257728558886a754ad49bf16a
Reviewed-on: https://skia-review.googlesource.com/146522
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-08-09 23:59:15 +00:00
recipe-roller
8b1bf5244d Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/d61997d37c8f7cc68080f39d4b516fb7b269b46c Deploy git 2.18 to depot_tools on a bleeding edge. (tandrii@chromium.org)
  https://crrev.com/5e24b0d07ea95e8a8e4a2b95069cd5cb571cd94e Revert "Deploy git 2.18 to depot_tools on a bleeding edge." (tandrii@chromium.org)
  https://crrev.com/15a5a77db4128acdc9f7f21e6b2ce9ed8f022a4d Reland "Deploy git 2.18 to depot_tools on a bleeding edge." (tandrii@chromium.org)
  https://crrev.com/61110ec711159cc393622f2ac203a01b5f8eba9f [osx_sdk] Add mac_toolchain based osx_sdk module. (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5e0d1ff95df0253bd504dd05a9637b45c807fe4e
Reviewed-on: https://skia-review.googlesource.com/146654
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
2018-08-09 23:41:11 +00:00
Mike Klein
015c899d34 port most SkAtomic<T> to std::atomic<T>
The only SkAtomic<T> left are the ones overriding the default memory
order in SkPath.  I think I'd like to try switching them to std::atomic
too, but in another CL.

Trim unused APIs in SkAtomics.h.

Change-Id: Ia1c283355902ccb8fcdad70cdf27bb577e8ca407
Reviewed-on: https://skia-review.googlesource.com/146529
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-09 23:40:31 +00:00
Joe Gregorio
448ddcff82 Fix typo in docs.
No-Try: true
Docs-Preview: https://skia.org/?cl=146653
Bug: skia:
Change-Id: I1c0fb8bfb6f03291939215cceec603c578f68e63
Reviewed-on: https://skia-review.googlesource.com/146653
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2018-08-09 23:05:01 +00:00
Herb Derby
bc6f9c9a8c Remove GrTextUtil::Paint
This was just acting like a pair of SkPaint, GrColor. But,
had an additional pointer to a color space. I changed
everything to just pass the pair around.

BUG=chromium:864564

Change-Id: I9858556b8bca0d5359d4d6e9784d63ff8c4f467b
Reviewed-on: https://skia-review.googlesource.com/146381
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-09 22:25:13 +00:00
Florin Malita
73154babe5 [skottie] Avoid UB while parsing 1-based indices
Current impl can underflow int due to unchecked arithmetic.

Add a Parse<size_t> specialization and convert call sites which use
inline arithmetic.  Underflowing unsigned types should be well defined
and caught in later tests.

Bug: oss-fuzz:9798
Change-Id: Iaebe8aad4009e2511fe1d8733d336f5f119bb384
Reviewed-on: https://skia-review.googlesource.com/146648
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-08-09 22:05:32 +00:00
Mike Klein
94c4f41ab8 in MS land, -include is /FI
Change-Id: Ibfead1121f22277297e16196b37e6e86dc2d2166
Reviewed-on: https://skia-review.googlesource.com/146649
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-09 22:03:27 +00:00
Timothy Liang
2eb8e02756 Reland "implemented GrMtlSampler for metal gpu backend"
This reverts commit 35f9637a78.

Reason for revert: <Removed setting border color since we don't clamp to border anyway>

Original change's description:
> Revert "implemented GrMtlSampler for metal gpu backend"
>
> This reverts commit 93fa10fbbc.
>
> Reason for revert: <Breaking build on macOS ver < 10.12>
>
> Original change's description:
> > implemented GrMtlSampler for metal gpu backend
> >
> > Bug: skia:
> > Change-Id: I936e5510e5ee146c0fc6bdbc0d5f5352359fbe7d
> > Reviewed-on: https://skia-review.googlesource.com/145893
> > Commit-Queue: Timothy Liang <timliang@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,timliang@google.com
>
> Change-Id: I4184890610e3147abc63b7d9bdfa8ec8120a11ef
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/146580
> Reviewed-by: Timothy Liang <timliang@google.com>
> Commit-Queue: Timothy Liang <timliang@google.com>

Bug: skia:
Change-Id: Icbf31144cba79c621eff4741871d27172f1004b7
Reviewed-on: https://skia-review.googlesource.com/146581
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-08-09 22:00:28 +00:00
Adrienne Walker
87785d5573 Add max_fragment_uniform_vectors_32 workaround
Bug: chromium: 829614
Change-Id: I0ce008d8ebadd90758510ea069f0f4384a95751e
Reviewed-on: https://skia-review.googlesource.com/146622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-08-09 21:13:16 +00:00
Mike Klein
475c5e93fe turn on alignment sanitizer
This sanitizer checks for overaligned reads and writes,
or put another way, use of underaligned pointers.

This usually happens when you cast, e.g. char* to int*
without checking that the char* is 4-byte aligned.  Each
of the changes under src/ fixes something just like that.

The unusual setup for tools/xsan.blacklist is there to
force a rebuild whenever tools/xsan.blacklist changes.
I spent a good few minutes debugging rebuilds not happening
this morning, perhaps from some strange ccache interaction.

Align SkTextBlobs as void* (today they're just 4-byte) so the
SkTextBlob::RunRecords we put after them in SkTextBlobBuilder
buffers are properly aligned (for the SkTypeface* inside).

There's no obvious error in void SkRRect::computeType(),
but one bot seems to have seen some sort of issue with

    SK_AT_SCOPE_EXIT(SkASSERT(this->isValid()));

I can't reproduce it locally, so I'm just going to unroll it.

Change-Id: I904d94f65f695e1b626b684c32216a4930b72b0c
Reviewed-on: https://skia-review.googlesource.com/146104
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-08-09 21:13:15 +00:00
Ethan Nicholas
f1b1464d81 fixed early return breaking things in .fp files
Bug: skia:
Change-Id: If91e8cb2f312cb7546967bd9af0d1ae180177870
Reviewed-on: https://skia-review.googlesource.com/146644
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-08-09 21:08:14 +00:00
Brian Osman
11e6d95005 Allow any color space when making a picture backed image
Change-Id: Icb6d56f8e88396b5d2c82d61afd7fd633b39e00c
Reviewed-on: https://skia-review.googlesource.com/146528
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-08-09 21:08:13 +00:00
Florin Malita
e1c9d3c9e2 [skottie] Optimize color filter layerization
Use the deferred paint override mechanism, similar to opacity.

Change-Id: I78fa7f5d73ef333480ec72b0cb663819b1de2404
Reviewed-on: https://skia-review.googlesource.com/146527
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-08-09 21:03:12 +00:00
Ben Wagner
a191597a96 Viewer to resize Samples with window resize.
This adds onResize to sk_app::Window::Layer and uses it to resize
samples in Viewer.

Change-Id: Ia5ec5cf6dc74fbdf712291b9ba8707b076cb625d
Reviewed-on: https://skia-review.googlesource.com/146642
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-09 21:03:11 +00:00
Herb Derby
9f491487df Remove RunPaint
Change-Id: I3742cbf3b636f10bb2006e0c86390661deb9f9b8
Reviewed-on: https://skia-review.googlesource.com/146164
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-09 20:58:10 +00:00
angle-skia-autoroll
b8aa1442c6 Roll third_party/externals/angle2 c43cdad25851..468484201532 (1 commits)
c43cdad258..4684842015


git log c43cdad25851..468484201532 --date=short --no-merges --format='%ad %ae %s'
2018-08-09 jmadill@chromium.org Vulkan: Fix perftests null driver.


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

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

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=djsollen@google.com

Change-Id: I6e8935e869677db178add0256953b58163b725f3
Reviewed-on: https://skia-review.googlesource.com/146660
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-08-09 20:58:09 +00:00
Kevin Lubick
644d8e7175 [PathKit] Add PathOps Op and Simplify tests imported from the C++ tests.
Because of https://skia-review.googlesource.com/c/skia/+/146165 and
https://skia-review.googlesource.com/c/skia/+/146100 we have a way
to turn PathOps tests into JSON, which has input paths (as Cmd arrays),
combination verb and expected output.

In this CL, we make tests from the JSON, compare them to the expected
output and, optionally, create SVGs to visualize the difference if any.

API changes (nothing breaking on release builds):
 - Exposes SkRect as a JS Object.  No need to call delete() on this.
 - expose path.getBounds() and path.computeTightBounds()
 - Remove SkRegion exposure (debug/test only), which was going to be
used for this purpose, but the approach in this CL works fine.
 - Add loadCmdsTypedArray(cmd) helper function to JS [see helper.js].
This was previously known as `floatTypedArrayFrom2D` in the
old shell.html, and is now exposed to avoid clients having to
implement this boilerplate by themselves.
 - Add set/getFillType - mostly for testing the difference between
a Winding and an EvenOdd path.

Bug: skia:8216
Change-Id: I2cd25ce2e1e7f285c79c596678678e62135963f0
Reviewed-on: https://skia-review.googlesource.com/146524
Reviewed-by: Cary Clark <caryclark@google.com>
2018-08-09 18:13:48 +00:00
Brian Osman
2d010b66a6 Remove old sRGB config support from backend render target tool utilities
Bug: skia:
Change-Id: Ie88c16ddb2b072d8bdd7efc3acabc1d9ad89012f
Reviewed-on: https://skia-review.googlesource.com/146526
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-08-09 15:27:24 +00:00
Ben Wagner
b2c4ea6219 Move Views into Sample and Viewer.
What is left of the SkView system is used only by samples or viewer.
As a result, move it out of the Skia source tree and re-organize so it
is a bit easier to understand and use more shared code.

Move samplecode/ClockFaceView.cpp to samplecode/SampleTextEffects.cpp,
sice that's what's actually in it.

Move SkAnimTimer.h to tools/timer, since it's actually shared between gm
and samples.

Change-Id: I55dafd94c64e4f930ddbd19168e0f812af86c455
Reviewed-on: https://skia-review.googlesource.com/146161
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-09 15:25:32 +00:00
Ben Wagner
d1910d5664 Add jobs for GTX1050 eGPU.
No-Try: true
Change-Id: I47ccf632537a71eb0e2957158ce38c4a4421952b
Reviewed-on: https://skia-review.googlesource.com/145334
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-08-09 15:22:21 +00:00
Timothy Liang
35f9637a78 Revert "implemented GrMtlSampler for metal gpu backend"
This reverts commit 93fa10fbbc.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> implemented GrMtlSampler for metal gpu backend
> 
> Bug: skia:
> Change-Id: I936e5510e5ee146c0fc6bdbc0d5f5352359fbe7d
> Reviewed-on: https://skia-review.googlesource.com/145893
> Commit-Queue: Timothy Liang <timliang@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,timliang@google.com

Change-Id: I4184890610e3147abc63b7d9bdfa8ec8120a11ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/146580
Reviewed-by: Timothy Liang <timliang@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-08-09 15:18:08 +00:00
Brian Osman
05271aedaa Stop treating 2.2 gamma as sRGB
Bug: skia:
Change-Id: I023dfbabf691b498363fb227b1d4580dca51bc89
Reviewed-on: https://skia-review.googlesource.com/146525
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-08-09 15:17:17 +00:00
Cary Clark
e12a090a63 make some textblob builders private for now
Move SkTextBlobBuilder::allocRunText* to private: for the time
being, to reduce the documented interface footprint.

No code is deleted; the functions may be restored when a
client is ready to call them.

Also, add SkTextBlob::MakeFromString to complement
SkTextBlob::MakeFromText.

R=halcanary@google.com,fmalita@google.com
TBR=reed@google.com
Bug: skia:6818
Change-Id: If09d4da4ce38b680d73f25d187e3d06eeb0ec652
Reviewed-on: https://skia-review.googlesource.com/146521
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-08-09 15:01:31 +00:00