Commit Graph

45580 Commits

Author SHA1 Message Date
Brian Osman
2715bf5b32 Switch to float vertex colors for wide color vertex attribs
Bug: chromium:985500

Change-Id: Iab73405728dc64c816f736e95b00a23e11fd4888
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258565
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-06 20:13:35 +00:00
Michael Ludwig
406172a617 Avoid implicit conversion back to int
Change-Id: I7aa85e470343825e6ab21ad210f50c2154f03ad0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258570
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-06 19:39:55 +00:00
Kevin Lubick
4b5b645049 [canvaskit] Add _RTShaderFactory for demos
Change-Id: Ib6dc1ff861efe4040508fea09c8a66d8d06db597
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258568
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-06 19:35:25 +00:00
recipe-roller
274a766baf 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/fe18a43d590a5eac0d58e7e555b024746ba290ad [git] Update bootstrapped git version to 2.24 to match fleet. (iannucci@chromium.org)
  https://crrev.com/6b52dc21e166c46707b4c8eb26c74c70d4f9977e Default to origin's default branch instead of always origin/master. (jyasskin@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib9132dc4932df03ab9a1f120fda2a31d6237b9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258604
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-12-06 19:08:15 +00:00
Michael Ludwig
379e4961fd Merge consecutive entries that share proxy in bulk texture op
Previously, a batch draw that reused the same proxy consecutively
would create a ViewCountPair for each set entry, with its count == 1.
This turned into 1 draw per entry, so although there'd still be a single
pipeline, it didn't take advantage of merging those consecutive entries
into a larger draw to reduce draw count as well.

Initially, the thinking for the batch API was that it was for tilers
that used unique images for each tile or render pass. However, Chrome's
compositor is also responsible for rendering 9 patches as part of the UI.
These appear as 9 consecutive entries in the image set that all refer to
the same texture. With this CL the texture op will automatically merge
such occurrences into one ViewCountPair with a count of 9.

The bulkrect_1000_[grid|random]_sharedimage_batch leverages this case.
Before this CL its op would hold 1000 view count pairs that each drew
one quad. Now its op will hold 1 view count pair with a count of 1000.
On my linux workstation, the bulkrect_1000_grid_sharedimage_batch time
went from 377us to 206us. For reference, the _ref variant (which already
was a 1 view count pair with ct == 1000 due to merging of each op) has
a time of 497us. The difference between 497us and 206us represents the
overhead of calling through SkCanvas, op creation, quad optimization
analysis 1000x.

Interestingly the bulkrect_1000_random_sharedimage_batch benchmark did not
change on my workstation. My conjecture is that it is bottlenecked by
overdraw of the many overlapping rectangles.

Change-Id: Icc4195de0bcb2219f424fdaa79728281c0418558
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258418
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-06 18:49:35 +00:00
Mike Klein
456c405d4e simplify GrCCPerFlushResources::recordCopyPathInstance
I should start off with, I don't know this code.  I may have
misunderstood what it's trying to do.  Is it well tested?

GCC pointed out that using memcpy() with CopyPathRange is a bad idea
since CopyPathRange is non-trivial (has an sk_sp).

Further, this appears to be an archetypical dangerous way to use
memcpy(), because the source and destination alias each other.

Am I understanding it correctly that we want to put the new entry at
fCurrCopyAtlasRangesIdx, sliding everything already past that index over
to make room?

I've tried to replace all this with

    1) push_back() to add a slot
    2) move_backwards() to slide everything over to the right
    3) = {...} to fill in the slot.

Step 2) is a no-op when fCurrCopyAtlasRangesIdx was at the end already.

Then now that we're no longer calling emplace_back, the type
CopyPathRange now no longer needs an explicit constructor.

This is the sort of thing I'm going for here...

    ~ $ cat test.cc
    #include <stdio.h>
    #include <vector>

    int main(int, char**) {
        for (int i = 0; i <= 5; i++) {
            std::vector<int> v = {1,2,3,4,5};

            v.push_back(0);
            std::move_backward(v.begin() + i,
                               v.end() - 1,
                               v.end());
            v[i] = 42;

            for (int x : v) {
                printf("%d ", x);
            }
            printf("\n");
        }
        return 0;
    }
    ~ $ clang++ test.cc && ./a.out
    42 1 2 3 4 5
    1 42 2 3 4 5
    1 2 42 3 4 5
    1 2 3 42 4 5
    1 2 3 4 42 5
    1 2 3 4 5 42

... which I guess is a roundabout way of spelling "insert()".  :P

Change-Id: I0a445aafa9a786ef8044243c7432f8597353a6b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258454
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2019-12-06 18:47:55 +00:00
Jason Simmons
22bb52e95b Get baselines from cached default metrics if the text is empty
Change-Id: Ic04251d60d6d36f80c3e569312495190ba375d85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258488
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2019-12-06 18:36:55 +00:00
Robert Phillips
576b6a19ad Add storage of programInfos to GrRecordingContext and SkDDL
This starts setting up to expose the GrProgramInfos to SkDDL clients.

Bug: skia:9455
Change-Id: Icd89ad88565d13890476463a919bbadcb9210b02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256229
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-12-06 18:34:05 +00:00
Herb Derby
a90476496b WS: reorder GrTextBlob struct and move all methods to .cpp
Move all the GrTextBlob methods to GrTextBlob.cpp. Under the old API
methods were called once per a glyphs so the methods were colocated
with the painter code. The APIs have changed to bulk, so the colocation
is no longer needed. In addition, the SubRun struct is going to move
from the GrTextBlob to the .cpp, so all these methods need to be together
soon.

Change-Id: I41124be0d5bcca29780be1a7f5c105268dadbe87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258566
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-12-06 17:46:05 +00:00
Robert Phillips
3968fcbc3a Pull creation of GrPipeline explicitly into the Ops' onExecute methods
This is a first step towards pulling the creation of the GrProgramInfos explicitly into the Ops' onExecute methods. We need this behavior so programInfo creation can be moved forward to onPrePrepare.

For now, pipeline creation is a static member on GrSimpleMeshDrawOpHelper so GrPipeline creation can be bottle-neckedOps for Ops that don't use the helper. In some future world CreatePipeline could become non-static to reduce some of the duplicate code.

Bug: skia:9455
Change-Id: I2d35dd223db824e84616f5df0f1dca34c1b6e412
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258003
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-12-06 16:33:15 +00:00
Mike Klein
a746fc19ce don't memset TriangulationVertex
GCC gets nervous here, and I think correctly so.  The type is
non-trivial (because the linked list has a constructor from its field
initializers) and we're bypassing that instead with a memset().  That'd
be _close_ to fine, but I think less clear than just =
TriangulationVertex{}.

What's really weird is that we're only zeroing it in Debug builds.
Might be we only added this memset() to stop assertions that the node
wasn't already in another linked list?

Anyway, even ignoring all that, this reads a lot more clearly to me.

Change-Id: Iacfe507be2a53807caf85d30f4c4712d8f6e86dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258449
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-12-06 16:08:45 +00:00
Ben Wagner
24ee4e0341 Add feature support to shaper.
Change-Id: Iab8bf9ab144d1661c0653b617ca394c3663ab35c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248861
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-12-06 14:42:31 +00:00
Nigel Tao
027f89be4d Allow one-pass SkWuffsCodec decoding
Prior to this commit, SkWuffsCodec always used what this commit calls
two pass decoding. After this commit, it can sometimes use one pass
decoding, which means we don't have to allocate that intermediate pixel
buffer. For the "droids.gif" example mentioned in a recent commit,
39da10b5 "Optimize SkWuffsCodec pixbuf zero-initialization", this means
that we allocate 19 MB less than we used to (2560 width x 1920 height x
4 bytes per pixel = 19660800 bytes).

Continuing with "droids.gif" and the image_decode_bench program from
39da10b5, the time taken per decode drops from 35.627ms to 28.655ms.

Bug: chromium:1023191
Bug: chromium:1023129
Bug: skia:8235
Change-Id: Ic4fd6bd2856493eaf777416326f39198aa8d97c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255956
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-12-06 14:38:01 +00:00
Eric Boren
46e2d8d4a1 [infra] Use "mod download" and "install", not "get" in chrome_release_branch
Change-Id: I96bc057df6b538138827fac7129126381038656a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258240
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-12-06 11:16:41 +00:00
skia-autoroll
aa4f7f5582 Roll ../src a25cc4cdcd47..36a639fc2d93 (535 commits)
a25cc4cdcd..36a639fc2d


Created with:
  gclient setdep -r ../src@36a639fc2d

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 bsalomon@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/+/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
Bug: None
Tbr: bsalomon@google.com
Change-Id: I2c563c9540e68a321ea5d55fff67e9e611ef1c40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258493
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-06 04:42:46 +00:00
skia-autoroll
c067d4d569 Roll third_party/externals/swiftshader dee5b5f3cf3f..b9f03f47d5f5 (14 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dee5b5f3cf3f..b9f03f47d5f5

git log dee5b5f3cf3f..b9f03f47d5f5 --date=short --first-parent --format='%ad %ae %s'
2019-12-05 digit@google.com [vulkan] Add VK_SUBGROUP_FEATURE_ARITHMETIC_BIT support
2019-12-05 bclayton@google.com Vulkan: Optimize shaderClipDistance and shaderCullDistance
2019-12-05 bclayton@google.com Vulkan: Implement shaderClipDistance and shaderCullDistance
2019-12-05 paulthomson@google.com Regres: support GCOV_PREFIX for collecting coverage
2019-12-05 chrisforbes@google.com Regres: update testlists for recent deqp roll
2019-12-05 chrisforbes@google.com Regres: Adjust exit code handling
2019-12-05 digit@google.com [vulkan] Clarify configuration macros for external memory and semaphores.
2019-12-05 amaiorano@google.com ReactorUnitTests: add unit tests for intrinsics
2019-12-05 amaiorano@google.com SubzeroReactor: implement most missing intrinsics
2019-12-05 amaiorano@google.com SubzeroReactor: add stubbed coroutine support
2019-12-05 amaiorano@google.com Subzero: fix assert for sqrt of vector float types
2019-12-05 amaiorano@google.com Subzero: hack fix for assert(Dest->hasReg())
2019-12-05 amaiorano@google.com SubzeroReactor: fix assertion !isVectorType(Ty)
2019-12-05 amaiorano@google.com Subzero: fix assert when dumping unnamed constant

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

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 bsalomon@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: bsalomon@google.com
Change-Id: Ib5860e1daa516e1c13c6130696ffa84468d869f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258494
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-06 04:37:43 +00:00
skia-autoroll
f1ddd3778c Roll third_party/externals/angle2 5f857839b9ec..11e6944ec5a8 (8 commits)
5f857839b9..11e6944ec5

git log 5f857839b9ec..11e6944ec5a8 --date=short --first-parent --format='%ad %ae %s'
2019-12-05 jonahr@google.com Linux AMD crash when src blit region outside framebuffer
2019-12-05 ianelliott@google.com Vulkan: Implement multisample textures
2019-12-05 syoussefi@chromium.org Fix image/sampler uniform range in presence of atomic counters
2019-12-05 syoussefi@chromium.org Fix compute shared memory size validation
2019-12-05 syoussefi@chromium.org Vulkan: EXT_gpu_shader5 support: precise
2019-12-05 jmadill@chromium.org Re-land "Add new test runner harness."
2019-12-05 syoussefi@chromium.org Fix tests checking for major version > 3
2019-12-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src e58c080d4f02..0de87ee9a5bf (1 commits)

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

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 bsalomon@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: bsalomon@google.com
Change-Id: I45f956e54697b9c6ca559f28a8b635b74e6c0335
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258492
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-06 04:37:41 +00:00
Mike Klein
3e01360677 GCC gets worried when we memset Stats
... because it has a constructor, implied by all the initializers.
Luckily, that constructor does exactly what our memset() does.

Change-Id: Ibe538e9d840de9e6fd07d673783709df17b7b4fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258447
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-12-06 01:48:51 +00:00
Mike Reed
0483b46f11 fix make_path to not care about param-eval-order
Change-Id: I2ed4568768628fd1870acda0272056dc7e9920fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258516
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-05 23:05:11 +00:00
Florin Malita
cc92b27c78 [skottie] Optionally-deferred single-frame image loading
Normally, we load single-frame images upfront to avoid instantiating
an animator (as the image content is supposed to be constant).

In certain cases, deferred behavior is desirable (and the extra animator
overhead is minimal).

Generalize MultiFrameAnimator to handle single-frame assets, and add an
optional deferred mode for single-frame image loading
(Animation::Builder::Flags::kDeferImageLoading).

Bug: skia:9686
Change-Id: I4d166cd1a0bf34ccb8679e7553848c831a9193d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258000
Commit-Queue: Avinash Parchuri <aparchur@google.com>
Reviewed-by: Avinash Parchuri <aparchur@google.com>
2019-12-05 21:46:59 +00:00
Mike Klein
7c37f5a610 stifle GCC warning
GCC worries we're copying into a union of non-trivial types here, but we
know they're perfectly fine to memcpy() into.  We can quiet it down by
casting the destination to void*.

Change-Id: I742bcd264da861998fa1e5b7e8ad70aaafc0805d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258450
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-12-05 21:45:39 +00:00
Heather Miller
2e046a246b Update release notes files
Docs-Preview: https://skia.org/?cl=258417
Bug: skia:
Change-Id: I4716231ad260f2f7f29776f7cc455c6837ec6a43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258417
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
2019-12-05 21:10:49 +00:00
recipe-roller
9931ef38c0 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/1f2a908debbd1f17a22d1a92f811871e348c7cd6 Update Tricium proto in recipes to contain showOnUnchangedLines field (ltina@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ifbb442b82c98cdce65b9fc3f6f86219c6794b26a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258441
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-12-05 20:51:33 +00:00
Greg Daniel
ed96bcaa63 Have GrLatticeOp use GrSurfaceProxyView.
Bug: skia:9556
Change-Id: Ibb0fe82edb9c28efd94cc599856ed9afe71dfd09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258416
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-05 20:37:33 +00:00
Mike Klein
d50cc95872 upgrade SkMiniRecorder to c++11
It had been manually std::move()ing without actually
calling it by that name.  GCC noticed.

Oh hey, let's call ~T().

Change-Id: Ie54b8906e3a4334f73e46ca9d31dc8542289f238
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258344
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-05 20:17:13 +00:00
Brian Osman
ffbfd1bc78 Particles: Remove play-position thing, simplify mouse tracking
Change-Id: I36ce78ee1de8096d9aa164444e8af31b3831a3ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258217
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-05 20:07:13 +00:00
Brian Salomon
b0047b57b7 Revert "Remove most of GrConfig.h"
This reverts commit 80e334dad8.

Reason for revert: Chrome is including our private headers which means this breaks the Chrome roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1953757

Original change's description:
> Remove most of GrConfig.h
> 
> Change-Id: I0f693bed0778151f93d07cd42c6b597566695ab1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257999
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie206db9865a7f9a7e334eb248de8cff38dd31d15
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258356
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 19:52:48 +00:00
Mike Reed
76c5192db7 clip paths in perspective (as needed)
Change-Id: I3807312a20e8c9699b9ede8706a6e47bb354480a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258243
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-05 19:44:53 +00:00
Herb Derby
c9ab3ff632 Have direct mask glyphs happen after SDFT
Direct ARGB fallback is only needed when rendering SDFT. So,
the direct mask stage follows the SDFT case to handle any colored
glyphs the SDFT could not handle.

Change-Id: I97dfbcf3177f113402bfa363eef287b2617f3bb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252260
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-12-05 19:33:43 +00:00
Mike Klein
ae2e6073b6 more "SkScalerContextRec is bytes"
Just like the first CL, this time hopefully I got all the rest
for SkScalerContextRec.  (I had been going file by file...)

Change-Id: Icae83ff0f6f6b360b1f13069c467a40d8f1d8d62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258343
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-12-05 19:21:12 +00:00
Brian Salomon
80e334dad8 Remove most of GrConfig.h
Change-Id: I0f693bed0778151f93d07cd42c6b597566695ab1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 18:37:33 +00:00
Mike Klein
786be72765 tell GCC copying into SkScalerContextRect is safe
GCC warns now about memcpy()ing into types that have no trival copy
assignment.  (I think it's the mix of public and private fields that
makes SkScalerContextRec non-trivial.)

Yet SkScalarContextRec really is designed for memcpy(), so we can just
stifle it by casting the memcpy() destination pointer to void*.

Change-Id: I72f9aedd3e1ff9d496db066260bcde7178c1bf7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258338
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-12-05 18:22:02 +00:00
Mike Klein
908b4a1158 stifle GCC warnings in Sk4px
GCC warngs that we're memcpy()ing into Sk4px, a non-trivial type.  We're
really quite sure about its layout (now asserted) so I think it's safe
to just cast to void* to quiet the warnings.

Change-Id: I6b868e0dc7113302914c37b0aac187272203329f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258270
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-12-05 18:20:33 +00:00
Robert Phillips
7f11fb5025 Add mutex to guard GrSkSLFPFactoryCache accesses
In the DDL-recording world we're now computing GrProgramDescs at record time. This ends up creating the GrSkSLFPFactories involved in multiple threads. As part of the GrContextThreadSafeProxy, the GrSkSLFPFactoryCache has to be thread safe.

This CL also forces GrSkSLFP.h and GrSkSLFPFactoryCache.h to only ever be included in .cpp files.

Bug: skia:9455
Change-Id: Ic5e87c28d2c1c5b468ac81e07b66c1191efbbd65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257634
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-12-05 17:58:03 +00:00
Michael Ludwig
4384f04356 Help MSVC pack GrTextureOps bitfields
Bug: skia:
Change-Id: I868da59cfcd4357ea4b2f4018dc3b94bae6d0287
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258237
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-12-05 17:46:13 +00:00
Mike Klein
1713fcc5b4 Stifle GCC false positive
When deserializing SkRRects we copy the raw data then recreate a little
more analysis stored at the end of the struct that is not serialized.

GCC worries we've not copied enough, but we have.  We can stifle the
warning by casting the pointer to void* before calling memcpy().

Change-Id: I3ae0007927611d4fc84ced8d12f62e0fa23ee3ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258267
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-05 17:45:37 +00:00
Mike Klein
9b849047b8 clearing fFlags is redundant here
GCC noticed that we're memset()ing fFlags to zero even though
it's non-trivial... non-trivial for having default initializers
that already set all its fields to false.  So like, well warned,
but also, the memset() was totally redundant?

Change-Id: I115f41cb5026804ffbb4a0ffacfc9cdb89161d8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258266
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-12-05 17:41:09 +00:00
Mike Reed
b4068ed946 show perspective bug (need for clipping)
Next CL will add call to SkPathPriv::PerspectiveClip() to fix this

Change-Id: Ia52ab019457f363184dc4730ab3e3582669e55e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258242
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-05 17:40:33 +00:00
Mike Klein
ba094e59b9 GCC 8 reminds us, don't memcpy() sk_sp
../../include/private/SkTArray.h:496:15:
    error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type
    ‘class sk_sp<GrTextBlob>’ with no trivial copy-assignment; use copy-assignment
    or copy-initialization instead [-Werror=class-memaccess]
             memcpy(&fItemArray[dst], &fItemArray[src], sizeof(T));
             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This may be safe in context and the sort of thing we're used to getting
away with, but I think it's probably also the sort of thing we should
try to do as little as possible.

If this is really a major performance choke point, it might make sense
to going back to an array of raw pointers?  That's what we had back
before https://skia-review.googlesource.com/c/skia/+/9535/.

Change-Id: If16918f908e8950b81e73b70764bae200bda2e62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258265
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-12-05 17:36:03 +00:00
Brian Salomon
fa9232ccfd Some changes to GrYUVToRGBEffect.
Don't implement domains, use child effects instead.

Don't do a 4x4 matrix mul. Do 3x3 + a translate.

Undo some of effects of this effect's stint as .fp generated code.

Specify optimization flags using resulting alpha type.

Multiply computed color with input color (so this is more interchangeable
with GrSimpleTextureEffect used for non-planar texture images)

Change-Id: I9d3d0ff7aed9177cd32ab16e9ceb67d458c3d88c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257883
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 17:28:32 +00:00
Mike Reed
fae46e4043 move perspective-clipper into SkPathPriv
From here we can start trying it out for real
- skottie could call it directly
- SkDraw could call it for the raster-backend

Change-Id: I703838241d67c539afd3d3e31d0ddf1c66645799
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258001
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-05 16:18:52 +00:00
Ben Wagner
3af8955037 Add additional Mac Metal jobs
Add Perf testing for Metal on MacBookAir7,2 and MacMini7,1. Also run
Test Debug Metal on MacMini7,1.

Change-Id: Id1a457cd41dda1dee8fc6893e87a6701782b0b2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258002
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-12-05 16:08:42 +00:00
Heather Miller
6b738b588c Update Skia milestone to 81
Change-Id: If4173d0ac0028d3595f85c66182a22cabf444955
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258216
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
2019-12-05 15:52:12 +00:00
Greg Daniel
f0e04f0c31 Always destroy resources instead of simply "abandoning" them in Vulkan backend.
This also now requires that when using a vulkan GrContext, the backing VkDevice,
Queue, and Instance must be alive when the GrContext is first destroyed or
abandoned. Additionally any GrBackendTextures created from the GrContext must
be deleted before destroying or abandoning the GrContext.

Bug: skia:9603
Change-Id: Ibf194d2ffdcddd61e34214d7d59a2d9a33c880e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257921
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-05 14:45:45 +00:00
Florin Malita
6cc49538b3 [skottie] Fix precomposed camera sizing
Precomp layers can have a different size vs. main composition.

Instead of relying on the global animation (main comp) size, use the
current (pre)comp size when setting up cameras.

Change-Id: I54106375fb39dde2bfd11e14a38e5ec3e7190764
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258156
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-12-05 14:34:15 +00:00
Kevin Lubick
0af13b3caf [canvaskit] update shaping example to have emoji
Docs-Preview: https://skia.org/?cl=257998
Change-Id: I4892f00d80375874198fc60edadf84ffe41a5f5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257998
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-12-05 13:08:52 +00:00
skia-autoroll
f5542b6aa3 Roll third_party/externals/swiftshader bbd0694f9ab2..dee5b5f3cf3f (4 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/bbd0694f9ab2..dee5b5f3cf3f

git log bbd0694f9ab2..dee5b5f3cf3f --date=short --first-parent --format='%ad %ae %s'
2019-12-05 chrisforbes@google.com Regres: roll deqp forward to current tip of 1.1.6
2019-12-04 sugoi@google.com Enable the fullDrawIndexUint32 feature
2019-12-04 swiftshader.regress@gmail.com Regres: Update test lists @ bbd0694f
2019-12-04 bclayton@google.com VulkanUnitTests: Fix bad comment on assembly.

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

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 bsalomon@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: bsalomon@google.com
Change-Id: I8cc815fe3d13a651d7490c07b8faedcecf22283c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258100
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-05 07:30:25 +00:00
skia-autoroll
1f19aa99cd Roll ../src d02b0cb4d389..a25cc4cdcd47 (492 commits)
d02b0cb4d3..a25cc4cdcd


Created with:
  gclient setdep -r ../src@a25cc4cdcd

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 bsalomon@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/+/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
Bug: None
Tbr: bsalomon@google.com
Change-Id: I4295c0e57efac950c5179ce611323fb60a148bcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258099
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-05 07:25:05 +00:00
skia-autoroll
57e05d8106 Roll third_party/externals/angle2 249cb200173f..5f857839b9ec (14 commits)
249cb20017..5f857839b9

git log 249cb200173f..5f857839b9ec --date=short --first-parent --format='%ad %ae %s'
2019-12-05 ianelliott@google.com Improve current multisampled renderbuffer/texture support
2019-12-04 syoussefi@chromium.org Remove build_apk_secondary_abi from gn files
2019-12-04 jmadill@chromium.org gn: Minor improvements.
2019-12-04 syoussefi@chromium.org Vulkan: Optimize unused uniform cleanup in glslang wrapper
2019-12-04 syoussefi@chromium.org Re-enable atomic counter tests on !windows
2019-12-04 jmadill@chromium.org Vulkan: Fold read access into write flags on buffer writes
2019-12-04 shrekshao@google.com Turn on fboRenderMipmap for D3D11
2019-12-04 courtneygo@google.com Split out core.compute_shader expectations
2019-12-04 courtneygo@google.com Add Compute Shared Memory Size Validation
2019-12-04 thomasanderson@chromium.org Expose GL_ARB_sync for GL
2019-12-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 4fde9b750992..e72b61c7c20d (1 commits)
2019-12-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader b64fbfec4dcd..bbd0694f9ab2 (3 commits)
2019-12-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 3ed4586044f2..e82a428605f6 (3 commits)
2019-12-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src a4af7676feb0..e58c080d4f02 (1 commits)

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

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 bsalomon@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: bsalomon@google.com
Change-Id: Ie309f15e7769ab1b972b07b2779825291ed7ba35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258098
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-05 07:20:55 +00:00
Michael Ludwig
77eae2c7ae Revert "Specialize inset/outset/reset based on known quad type"
This reverts commit d83912bc81.

Reason for revert: Chrome+Android complains about mutable constant GrQuadUtils::TessellationHelper::kFunctionTables; maybe also layout test failures?

Original change's description:
> Specialize inset/outset/reset based on known quad type
> 
> Change-Id: I5ca35be216cf6e7d863f2d7638905a61a0b9ef00
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257392
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ibc3ec464c42ba8f3a16ac9c773700868400f3ed9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258116
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-12-05 03:56:30 +00:00