Commit Graph

50114 Commits

Author SHA1 Message Date
Herb Derby
17d9caaf8c remove unused scale for direct masks
Using a direct mask, the pixels in the cache are in 1:1 correspondence to the device pixels.
There is no need to scale.

Change-Id: I7d3f48cfb44a51882370527401a3bd0d162d9e76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307875
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-04 20:36:58 +00:00
John Stiles
c461551ef2 Fix debug visualization for SkString.
This was broken by the addition of the sk_sp visualizer.

Change-Id: Ibf7519a8a2e0388275e543a1e5a69d942d50ed96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307867
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-04 19:52:38 +00:00
Ben Wagner
e426df96a1 Remove use of SK_IGNORE_MAC_OPSZ_FORCE
SK_IGNORE_MAC_OPSZ_FORCE should be removed since it is no longer defined
by any users.

Change-Id: Ib99082513292e55465131a42a7f676c5d1179113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307863
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-04 19:43:38 +00:00
Julia Lavrova
093263ce45 Remove SK_PARAGRAPH_OLD_SPACE_RESOLUTION (staging changes done)
Change-Id: Ia67eb9055cb589c1ff73b5ac851a2c7b538c2575
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307790
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-08-04 19:35:38 +00:00
Brian Osman
f265afddf2 Remove bits of code related to sk_Args
AFAICT, there were two unrelated things happening here:

1) .fp files supported referencing class variables as if they existed in
   sk_Args. We never do this (they can be directly referenced).
2) When baking the values of 'in' variables into runtime SkSL, we
   generated intermediate 'Setting' objects that wrapped the literal
   values supplied by the user. Those Setting objects were named
   'sk_Args.<field_name>', even though this logic had nothing to do with
   the fake SkArgs type. In this case, the Setting objects don't appear
   to add any value, so just inject the literals directly (which is what
   constant propagation would do on the next iteration).

Change-Id: Ia54193c5282737653cf10b7aae77e38e5ab78c79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307793
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-04 18:53:03 +00:00
Eric Boren
3f20166c66 Reland "[recipes] Verify that we actually deleted the file/dir on android"
This is a reland of aed15a701a

Original change's description:
> [recipes] Verify that we actually deleted the file/dir on android
> 
> Bug: skia:10539
> Change-Id: I3b51ef8c0106ac439f14a7f0ff61c8b88c7152ff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305957
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>

Bug: skia:10539
Change-Id: I23c6f85e5d446eea3fbd61cff3db29379e0b0702
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307794
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-08-04 18:48:00 +00:00
Adlai Holler
273bc3000d Remove two staging APIs post-Chrome-migration
These two staging flags were removed in Chrome CL 2327135

Bug: skia:104662
Change-Id: I5b794f0c5e2c53cca82ec471dda3da3a722f5c9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307781
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-08-04 18:48:00 +00:00
Ben Wagner
997c907f11 Rename kMultiMaster_FontFlag to kVariable_FontFlag
The older font format is mostly unused now. Use the new name for fonts
with parameteriazable glyph outlines.

Change-Id: Ia632f79684b2c4399d216855cfe0822f535189c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307792
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-08-04 18:12:26 +00:00
Mike Klein
ed80035850 try always setting fvisibility=hidden
It simplifies things to always build this way, to mimic how we're built
by clients, and to better approximate MSVC defaults.  I'm not sure I
believe my old note about making stack traces worse on Linux.

Change-Id: I0554a58573074fc6ae030fa09e11976a718645b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307834
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-04 18:04:36 +00:00
Ben Wagner
6fbd92db65 Better serialize variations, separate SkFontData.
SkFontDescriptor and its serialization and usage are updated to better
reflect how variations should be serialized. In addition this begins
teasing apart SkFontData since it is now mostly an artifact of how the
FreeType port works than anything else.

This also removes SkTypeface::MakeFromFontData since it is no longer
used and since SkFontData (which it takes as a parameter) was never
public. SkFontMgr::makeFromFontData now only exists to support older
skps and may be removed in the future.

Change-Id: I266bd5e87de85788661cdf5c571592ea1f2ae669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307344
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-08-04 16:38:26 +00:00
Michael Ludwig
21efb7c7dd Fix inversion unit test
RRect needs 8 radii, 4 corners x XY, so should pass 8 values, not 4.

Change-Id: I997cbf2a61e6ffb32e4a13d5c95d16cb172152be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307789
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-04 16:09:06 +00:00
Julia Lavrova
2aa72457ba Chromium Project Code Inclusion
Change-Id: Iac6a1ca7131c74f297ee047e0e3841740e24e18b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307703
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-08-04 15:50:46 +00:00
Brian Osman
a8486d10e0 Revert "Revert "Revert "Put top level FPs into their own functions"""
Flutter saw a substantial perf regression:
https://github.com/flutter/flutter/issues/62447

This reverts commit 7a96c2a6bb.

Change-Id: Ib7d73f2df429508d85f9681eb2f0afd84917772e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307782
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-04 15:25:09 +00:00
Jim Van Verth
7e3616a1cf Reland "Revise GrMtlGpu::onUpdateBackendTexture."
This is a reland of c2dc572a03

Original change's description:
> Revise GrMtlGpu::onUpdateBackendTexture.
> 
> * Use main command buffer rather than a temporary
> * Use staging buffer for uploads
> * Set up finishedCallback
> 
> Bug: skia:10530
> Change-Id: I73dbf1466ec4a48de8c1dcb741fa1bb6de1cd554
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307230
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:10530
Change-Id: Ie7e4d5d939a59c42e2e0689b0eac099fa0e640e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307785
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-04 15:21:47 +00:00
Eric Boren
a1cce35537 Revert "[recipes] Verify that we actually deleted the file/dir on android"
This reverts commit aed15a701a.

Reason for revert: some devices don't have "stat"

Original change's description:
> [recipes] Verify that we actually deleted the file/dir on android
> 
> Bug: skia:10539
> Change-Id: I3b51ef8c0106ac439f14a7f0ff61c8b88c7152ff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305957
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>

TBR=borenet@google.com,rmistry@google.com,kjlubick@google.com

Change-Id: I0c03c3ec581cb52829c51891f81c59b900625c50
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10539
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307787
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-08-04 15:17:47 +00:00
Michael Ludwig
80e3d42152 Fix inversion tracking across simplifies in GrShape
Change-Id: I68bb6bb239074d7cf657f56acf6c970771af62f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307717
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2020-08-04 15:13:06 +00:00
Eric Boren
aed15a701a [recipes] Verify that we actually deleted the file/dir on android
Bug: skia:10539
Change-Id: I3b51ef8c0106ac439f14a7f0ff61c8b88c7152ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305957
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-08-04 15:00:26 +00:00
Brian Osman
3000d6b8c2 Validate function return and parameter types in IR generator
Prevents invalid types from making it to the pipeline stage generator,
when it's too late to do anything.

Bug: oss-fuzz:24542
Change-Id: I8b6fa2afd5d586b0e60bea82e0ec4f3ae43de973
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307656
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-04 13:35:16 +00:00
Nathaniel Nifong
e09b314405 Add ParagraphBuilder.pushPaintStyle to allow text to be colors with paints.
Previously one could not color text with paints, even though TextStyle's foregroundColor and
backgroundColor fields are SkPaints. Canvaskit only exposed these as colors in order to allow
SimpleTextStyle to be a value object that would not have to be deleted by the user.

CanvasKit.Paint is a bound SkPaint. I wanted to allow a user to pass a paint to be used
in a text style without alterting SimpleTextStyle's status as a value-object.

So I've added a new bound method, pushPaintStyle which acts just like pushStyle but allows
a foreground and background paint to be supplied which are used to override the existing paints.

The user is responsible for deleting these paints.

Sorry for the kludgy design, if you have got a more elegant way, I'm open to suggestions.

Change-Id: Ib78464171346fe9f717f6d5b9d9428b1d0278498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307596
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2020-08-04 13:23:06 +00:00
Michael Ludwig
1e4158db1c Add contains(SkPoint) to SkRRect
Change-Id: I6709963bae0c69e17f651e9688201f11ceae844e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307700
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2020-08-04 12:57:56 +00:00
skia-autoroll
471235dba5 Roll ANGLE from 41442cce3d0f to 709472c9dd0c (23 revisions)
41442cce3d..709472c9dd

2020-08-04 m.maiya@samsung.com Vulkan: Fix variable scope bug during vkCreateInstance
2020-08-03 jmadill@chromium.org Vulkan: Add an overlay counter for descriptor writes.
2020-08-03 jmadill@chromium.org Vulkan: Move Resource Serial gen into Renderer.
2020-08-03 jmadill@chromium.org Trace Tests: Disable timestamp queries.
2020-08-03 jonahr@google.com Metal: Enable EGL_KHR_surfaceless_context.
2020-08-03 nguyenmh@google.com Add vertex array serialization capability
2020-08-03 m.maiya@samsung.com Capture/Replay: Account for EGL_KHR_no_config_context
2020-08-03 nguyenmh@google.com Add texture serialization capability
2020-08-03 lehoangq@gmail.com Metal: Implement EGL_ANGLE_iosurface_client_buffer.
2020-08-03 lehoangq@gmail.com Metal: Enable end2end tests on Intel.
2020-08-03 jonahr@google.com Add entry points for OES/EXT_texture_buffer
2020-08-03 cclao@google.com Vulkan: Set depthStencil loadOp to DontCare when not used and stored
2020-08-03 jmadill@chromium.org Capture/Replay: Use vector for resource maps.
2020-08-03 lehoangq@gmail.com Metal: Fix Intel's LOD clamp and blit shader's filtering.
2020-08-03 jmadill@chromium.org Vulkan: Remove ImageHelper::mSerial.
2020-08-03 jmadill@chromium.org Trace Tests: Scale results based on frames in capture.
2020-08-03 jmadill@chromium.org Vulkan: Clean up ScopedDescriptorSetUpdates.
2020-08-03 nguyenmh@google.com Add shaders and programs serialization capability
2020-08-03 jmadill@chromium.org Rename RenderPass test to performance counter test.
2020-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 71573c7f64cb to c967a2ddf18b (8 revisions)
2020-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 7ab4564696a7 to 928b7b26bd73 (1 revision)
2020-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 2aaa8653da4f to b78f4b1518e0 (2 revisions)
2020-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from aa5bd7657e6c to 4568d8587998 (1 revision)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: herb@google.com
Change-Id: Ic81a5016beb711e93c491290eab56dd649045e99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307740
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-04 06:48:06 +00:00
skia-autoroll
fcfe541ee5 Roll Chromium from c28de0e53968 to be02bd1a2326 (5894 revisions)
c28de0e539..be02bd1a23

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: herb@google.com
Change-Id: I8fd1726f499cf7fe5d2c6a41ca4b96f0aa4575fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307741
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-04 05:30:36 +00:00
skia-autoroll
254d03cae5 Roll SwiftShader from 4568d8587998 to 74cc8ea2b8df (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/4568d8587998..74cc8ea2b8df

2020-08-04 capn@google.com Remove VK_KHR_16bit_storage support
2020-08-03 capn@google.com Replace github.com code links with cs.opensource.google

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: herb@google.com
Change-Id: I4fb82431f435c6c4efde13d886fa39ec5842ec5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307738
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-04 04:38:26 +00:00
skia-autoroll
e1729a3eeb Roll dawn from 8c9858e9b8e3 to 1ea3a22f521e (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/8c9858e9b8e3..1ea3a22f521e

2020-08-03 tommek@google.com Adding a validation for destroyed textures in Queue::WriteTexture
2020-08-03 tommek@google.com Fixing a deprecated arrayLayer value inside Queue::WriteTexture
2020-08-03 cwallez@chromium.org Allow arrayLayerCount=0 during the deprecation period.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: Icbf81d1401ab7837a436ec302018f6c5f6c8484d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307739
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-04 04:30:06 +00:00
Mike Reed
093de4eb2c Use more of pathbuilder
Bug: skia:9000
Change-Id: Ia5c16ffbaeebbdd027c692c96095cfa181030d35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-03 21:04:55 +00:00
Jim Van Verth
f37f5d144b Revert "Revise GrMtlGpu::onUpdateBackendTexture."
This reverts commit c2dc572a03.

Reason for revert: Breaking ASAN bot.

Original change's description:
> Revise GrMtlGpu::onUpdateBackendTexture.
> 
> * Use main command buffer rather than a temporary
> * Use staging buffer for uploads
> * Set up finishedCallback
> 
> Bug: skia:10530
> Change-Id: I73dbf1466ec4a48de8c1dcb741fa1bb6de1cd554
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307230
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=jvanverth@google.com,robertphillips@google.com

Change-Id: Ia20a007942194e8127dff09769fcff5fdef26199
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307704
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-03 20:53:18 +00:00
Ethan Nicholas
d2dc2064dd fix clang-tidy make_unique warning
No-Try: true
TBR=johnstiles@google.com
Change-Id: Ie545a6b9b713d0caba5bdf2fcb118b71b8e5c369
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307716
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-08-03 20:08:16 +00:00
Herb Derby
1318e450da move source padding to the AtlasLocator for small path
Change-Id: I3596695190e33644e4adddd2a5ca4c03859798ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307699
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-03 19:43:55 +00:00
Nathaniel Nifong
1b7ce5a055 A quick start guide for CanvasKit app structure
Change-Id: I013e4a949055f9fc0b4978a55659392a9d286ba6
No-Try: true
Docs-Preview: https://skia.org/?cl=306654
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306654
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-03 19:17:17 +00:00
Michael Ludwig
7716f6597c Add comments to blend coefficient table to help readability
Change-Id: I2ea97fa2fed83fde49155189cd31fee877cd4a69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307698
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-03 19:13:55 +00:00
Ethan Nicholas
7b9da25e1b Can now swizzle SkSL scalars
This adds support for things like "foo.xxx1", which is equivalent to
"float4(foo, foo, foo, 1)".

Change-Id: Id52111917e30d7dd8ba2e0633074b64d7ac6c72a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306727
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-08-03 18:54:34 +00:00
Jim Van Verth
c2dc572a03 Revise GrMtlGpu::onUpdateBackendTexture.
* Use main command buffer rather than a temporary
* Use staging buffer for uploads
* Set up finishedCallback

Bug: skia:10530
Change-Id: I73dbf1466ec4a48de8c1dcb741fa1bb6de1cd554
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307230
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-03 18:37:32 +00:00
Herb Derby
f426a93ac4 add chrome bug triage to the Sheriff's Documentation
Change-Id: I24a083a5c53212913f50f2b1da6c24b2cd31b42a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307565
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-08-03 18:12:22 +00:00
Herb Derby
71984a480b move source padding to the AtlasLocator
Make the rect in the AtlasLocator account for the padding for the different types of atlas entries.

Change-Id: I53ccc1c2aa7c7811379f3bb8555cd9e7060fddf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307300
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-03 18:11:02 +00:00
Brian Osman
e7809c74bc Always send premul paint color to shader FPs
Fixes a bug with alpha-only image shaders not being modulated by paint
alpha (demonstrated by included GM). Compose shaders were the only
thing relaying on the old behavior, so make those manually unpremul the
input color, with a comment explaining the rationale.

This makes runtime shaders (and other new FPs) simpler to reason about:
sampling a child shader always produces a premul color, even if that
child is null (eg, the input color).

Bug: skia:10556
Change-Id: Ie629a9129d04ea80dae0b263c3811ca754202aab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306947
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-03 18:04:22 +00:00
John Stiles
fbd050bd0b Enable ClangTidy check modernize-make-unique.
The majority of existing call sites were automatically updated using
clang-tidy -fix. A small handful required a manual update,
e.g. CppCodeGen.

This check is a bit lenient, and in particular will not flag cases like
`std::unique_ptr<Base>(new Derived())` which is still pretty common
throughout our codebase. This CL does not attempt to replace all the
cases that ClangTidy does not flag.

Change-Id: I5eba48ef880e25d22de80f321a68c389ba769e36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307459
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-03 17:53:52 +00:00
Jim Van Verth
1788380a97 Fix texture errors on iOS Metal
Change-Id: I027b5e4a8ab737047e9fcd16be8b7597644c7dd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307569
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-03 17:27:10 +00:00
Mike Reed
cfb130c662 Add arc methods to path builder
Bug: skia:9000
Change-Id: I0a25c6f792f59230762651386da74e547b073930
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307558
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-03 15:50:01 +00:00
Jim Van Verth
a52442ab76 Remove unused dynamic allocation code from GrMtlResourceProvider.
We never hit a case where uniforms are large enough to need a uniform
buffer, and we don't support any API version older than iOS 9.0 so the
backup interfaces aren't needed.

Bug: skia:10530
Change-Id: Ia5e2d61243033d30d9010b8890cd7a4fd796cb21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307219
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-03 15:42:39 +00:00
Corentin Wallez
5619c3af3d GN: Add support for GN's framework variable in the toolchain
This is a recent addition to GN that Dawn takes advantages of but which
Skia's GN toolchain didn't implement yet.

Bug:
Change-Id: I7a592bd4663db5c9726767bedf46c38d9c86ed2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307576
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-03 15:41:37 +00:00
John Stiles
789578011e Increase ClangTidy code coverage by enabling features.
Change-Id: Ibb296dde9a412bf7f9de23f08cd4db700843729f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307557
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-03 15:37:30 +00:00
John Stiles
4b9b34558f Migrate GrGetIntelGpuFamily into a cpp file.
Putting the entire body of the function into a header risks an ODR
violation.

Change-Id: I6d32df195049058f781defc2aace23a2bbd66150
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307559
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-03 15:36:30 +00:00
Mike Reed
74a7a81b98 fix addOval and addRRect on builder
Need to notify the underlying pathref if we've made oval or rrect

Bug: skia:9000
Change-Id: I57a801f1fb446b99634d7b028249a812a5a978f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307516
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-03 13:18:17 +00:00
Eric Boren
a6df9da289 [infra] Update recipe dependencies
I'm hoping that updating depot_tools will fix the Chromium -> Skia roll.

Change-Id: I9bb581e88e4bbffe3ad68adf794e662b76622710
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307137
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-08-03 11:34:57 +00:00
skia-autoroll
fdd736ffce Roll ANGLE from cbd5bee81dc6 to 41442cce3d0f (10 revisions)
cbd5bee81d..41442cce3d

2020-08-01 syoussefi@chromium.org Autogenerated changes for GL_EXT_multisampled_render_to_texture2
2020-07-31 jmadill@chromium.org Vulkan: Add RenderPass count test.
2020-07-31 cclao@google.com Vulkan: Avoid clearWithClearAttachment if RP command buffer is empty
2020-07-31 syoussefi@chromium.org Fix validation of glFramebufferTexture2DMultisampleEXT
2020-07-31 cclao@google.com Vulkan: Make CommandBufferHelper::empty() logic less obtuse
2020-07-31 nguyenmh@google.com Add renderbuffer serialization capability
2020-07-31 jmadill@chromium.org Trace Tests: Fix Win/x86 crash.
2020-07-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 08a3cc4cfbaa to aa5bd7657e6c (3 revisions)
2020-07-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 4400cab64b22 to 71573c7f64cb (8 revisions)
2020-07-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from c6e6597c4f51 to 2aaa8653da4f (5 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:1111764
Tbr: herb@google.com
Change-Id: Ib8fc6bf3010522986e011132113ba4e313a58e4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307485
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-03 06:36:11 +00:00
skia-autoroll
b82d9b5d3b Roll SwiftShader from aa5bd7657e6c to 4568d8587998 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/aa5bd7657e6c..4568d8587998

2020-08-02 swiftshader.regress@gmail.com Regres: Update test lists @ aa5bd765

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: herb@google.com
Change-Id: If9e100c685ab7ad9caa64f8e6e572c2a9d57183f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307484
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-03 04:46:07 +00:00
skia-autoroll
92d72ce6af Roll dawn from fada50119020 to 8c9858e9b8e3 (1 revision)
https://dawn.googlesource.com/dawn.git/+log/fada50119020..8c9858e9b8e3

2020-08-01 jiawei.shao@intel.com Fix clearing sint/uint color attachments on Vulkan and OpenGL

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I120c1c71399eb8d5aa2b95b32b7ad29d9cebe1fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307483
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-03 04:29:07 +00:00
Mike Reed
b746d5c02b add static factories for SkPath
Bug: skia:9000
Change-Id: I474d512cafd79d7c74b42ee86cb34c039fd960b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307458
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-02 23:40:06 +00:00
Mike Reed
4b4cd13d44 Builder has addPolygon, plus start hiding edit methods
Bug: skia:9000
Change-Id: I5d7df2d720090a6d9c80443b39041fb17ede4b48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307347
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-02 21:33:06 +00:00
John Stiles
0633f76324 Enable ClangTidy check misc-definitions-in-headers.
https://clang.llvm.org/extra/clang-tidy/checks/misc-definitions-in-headers.html

Finds non-extern non-inline function and variable definitions in header
files, which can lead to potential ODR violations in case these headers
are included from multiple translation units.

Change-Id: I5a80d8bddbc7fae97a3b714ac4e376bcefc3b060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307436
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-02 18:53:15 +00:00