Commit Graph

47726 Commits

Author SHA1 Message Date
Brian Salomon
302757148f Make copy proxy in GM budgeted when texgen policy is kDraw.
Change-Id: I7d12c81b195144de217c928f5537665cae21c644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281580
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-04-03 20:31:44 +00:00
Mike Klein
76fbdd4703 every label has a use
Pre-allocating space for one reference to each Label
cuts down a bunch of tiny little mallocs (essentially
moving them to the stack).

Most labels are used once, with a tail, and never 0.

Change-Id: I2862b628e1c3789d32b1600023e0b1e8fa0ad160
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281622
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 20:24:14 +00:00
Chris Dalton
16a5a61b31 ccpr: Don't use half float vertex attribs
Change-Id: I7506a6c72eae30148fcae72ea81af5278a252c1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281620
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 20:15:14 +00:00
Mike Reed
ab7e8b3bcc plumb camera info down to devices
Change-Id: I8bad4ba28034400890f52cd1c4ef0f907de17007
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281579
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-03 20:07:04 +00:00
Jim Van Verth
92411c7d97 Set gn output_dir variable for test apps.
Fixes location of executable for xcode project generation.

Change-Id: I256c4a8f5e784f290f872094ada9949f23e6050b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281578
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-04-03 19:49:34 +00:00
Jim Van Verth
d6ad48086d Add GrD3DBuffer.
Supports buffer creation and destruction.

Bug: skia:9935
Change-Id: I6d8c6d67209a8857989a9384818272e7108177ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281577
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-04-03 19:47:56 +00:00
Kevin Lubick
cc8a76f3c7 [canvaskit] Add gm helper functions to tests.
Note to the reviewer: Look at tests/util.js first and then
look at the others. Gerrit lets you ignore whitespace changes,
which I would recommend for this.

This emulates tests on the C++ side and dramatically reduces
boilerplate on the test code.

This also uses the beforeEach(async () => {}) trick to save
a lot of promise resolutions before each tests.

I try to clean up the style a bit as I go, seriously thinking
about adding eslint for at least the tests.

Change-Id: Iced4abb57f66572035ab5d1a54b374055e8aaa58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281439
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-04-03 19:12:02 +00:00
Mike Reed
b6e7ef1092 Use skvm infix in gradients
Change-Id: Iff3bee6b94a6a196617960554b158720cde97c32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281156
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-03 18:42:44 +00:00
Chris Dalton
bddf60b423 Revert "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
This reverts commit 47d03f6ee5.

Reason for revert: Chrome GL interface not setting up properly

Original change's description:
> Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> 
> This is a reland of d84b691950
> 
> Original change's description:
> > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > 
> > This is a reland of e8c963d474
> > 
> > Original change's description:
> > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > 
> > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I7df1d60d5b33c84179dbe5391b49a84413cc9ec2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281570
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 18:28:54 +00:00
Chris Dalton
7521fb99c6 Revert "Disable baseInstance on SwiftShader"
This reverts commit b1cef9d6f6.

Reason for revert: Not necessary

Original change's description:
> Disable baseInstance on SwiftShader
> 
> Bug: skia:10102
> Change-Id: I4e11b6396574e6f86e31b658bfd2a5fe45b89489
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281507
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I7e9ee1158bfc18719ea775769d2cd55133d5dabc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10102
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281569
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 18:28:23 +00:00
Chris Dalton
d4dec974e3 Add an option to GrMeshTest to save to png
Change-Id: Ie877e995642fe6be48b7e242aa955e87ecc14fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281385
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 18:18:04 +00:00
Mike Klein
cca2acfb77 remove little-used bit_clear() and bytes()
bit_clear() is just another bit_and(),
and bytes() is a way of expression pshufb
that we never really use (yet).

Can always add them back later, but there's
some extra complexity to think about for each
that I'd like to not think about now:

  - common sub-expression elimination between bit_and and bit_clear
  - large constant management JIT'ing bytes

Change-Id: I3a54afa963231fec1d5de949acc647e3430ed0d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281557
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 18:16:54 +00:00
Chris Dalton
b1cef9d6f6 Disable baseInstance on SwiftShader
Bug: skia:10102
Change-Id: I4e11b6396574e6f86e31b658bfd2a5fe45b89489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281507
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 17:22:04 +00:00
Brian Osman
b08cc024cd Switch back to stack-based SkSL interpreter
It's slower, but code size is quite a bit smaller, memory usage is
smaller, and we think that mapping it to SkVM is just as easy.

This effectively reverts all of the following commits:

"Fix gcc9 warning around size of memset."
https://skia-review.googlesource.com/c/skia/+/279861

"Remove unused (and misleading) 'instruction' from SkSLInterpreter.h"
https://skia-review.googlesource.com/c/skia/+/278177

"Interpreter: Fix intrinsics when called with vector types"
https://skia-review.googlesource.com/c/skia/+/272721

"Make it easier to add vector versions of byte code instructions"
https://skia-review.googlesource.com/c/skia/+/272527

"Interpreter: Support returns from runStriped"
https://skia-review.googlesource.com/c/skia/+/268941

"add SkSLInterpreter vector instructions"
https://skia-review.googlesource.com/c/skia/+/266560

"Fix crash when editing particle scripts"
https://skia-review.googlesource.com/c/skia/+/269487

"Revert "Revert "Complete rewrite of the SkSL interpreter"""
https://skia-review.googlesource.com/c/skia/+/266205

Change-Id: I4258596399c4ca94489d4faf8aacfec88afeee13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281205
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-03 17:20:04 +00:00
skia-autoroll
d97187cfed Roll skia/third_party/skcms bd0abcd0646a..60d5d65325e6 (1 commits)
https://skia.googlesource.com/skcms.git/+log/bd0abcd0646a..60d5d65325e6

git log bd0abcd0646a..60d5d65325e6 --date=short --first-parent --format='%ad %ae %s'
2020-04-03 mtklein@google.com gn format skcms.gni

Created with:
  gclient setdep -r skia/third_party/skcms@60d5d65325e6

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC michaelludwig@google.com,mtklein@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

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

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Bug: None
Change-Id: Iddb364d4118ddb504281b90738440d9ec4a6e143
Tbr: michaelludwig@google.com,mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281508
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-03 17:12:44 +00:00
Mike Klein
96f6401789 harmonize rewrite-includes and gn-format checks
The CheckGeneratedFiles bot only required rewriting
.gn files, while the presubmit wants both .gn and .gni files.

It also appears that the #includes rewrite script runs on
both the presubmit and CheckGeneratedFiles bots.

These presubmits run on the CQ before landing right?
If so, no need for them in the CheckGeneratedFIles bot at all.

And of course, format .gni files.

Change-Id: Icd4526d62f85088862ad93566cc9ace11dc3e33f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281505
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 17:00:54 +00:00
Heather Miller
e4bcbf83d5 Update release schedule, notes
Bug: skia:
Change-Id: I993eec22654edf93ea93e37282b0e08d19acd589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281516
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-04-03 16:56:04 +00:00
Mike Reed
8970bc2e89 refactor colorspacexform for skvm infix
Change-Id: I51eab1ccf29721bba842d77c9d2b208ad523321d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281388
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-04-03 16:46:04 +00:00
Chris Dalton
10ee0b2401 Merge GrVkVertexBuffer and GrVkIndexBuffer into GrVkMeshBuffer
Change-Id: Icce3f3dce8581ba1ac3817d62c18e93cee616d3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281379
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-04-03 15:54:58 +00:00
Chris Dalton
0aece58215 gn format gn/gpu.gni
Change-Id: I16c392abe36d7aac7be2dee47116d873a8787afd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281378
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-04-03 15:50:03 +00:00
Weston Tracey
470b7793e1 Include fetch-gn in SKQP build recipe.
This is so we can cleanly move to our Debian10 build image which doesn't have a global install of gn.

Bug: skia:9438
Change-Id: Idcbc289580a35590250e2f755f80910f42020fc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281476
Auto-Submit: Weston Tracey <westont@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-04-03 15:49:53 +00:00
Brian Salomon
c524378621 Don't require color type to make proxy copies.
Bug: skia:10078

Change-Id: I3ce0d97f8ada55403cc3f88bb16659085449ea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281207
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-03 15:25:34 +00:00
Mike Klein
9ce08e81f1 schedule() in place
We can use the new_id array to reorder the program in place,
saving another program-sized malloc().

Change-Id: Ia963d27ea4ad7ce52256786999ce07b376bd44a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281429
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 15:18:53 +00:00
Brian Salomon
0029db021a Incorporate sample count into RTC fallback color type.
Formats can be renderable but not support MSAA.

Change-Id: I33fd295cce0b4b11a0c132c40a85fc7a7d4973b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281477
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-03 15:17:44 +00:00
Brian Osman
613deb07a7 In 3D sample, fix the matrix used for normal transformation
It needs to be the inverse transpose of the upper-left 3x3.

Change-Id: I6c6441c394f4aa9e39a810f97b27567f73dcc43a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281215
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-04-03 14:12:33 +00:00
Mike Klein
5fd013733f eliminate use of Usage in finalize
It's just as easy to calculate the death time directly as it is to use
Usage, and it saves some allocations and a little CPU time we don't need
to spend.

Left Usage in place in schedule() for you,
but did leave in the slight tweak to the assert.

Change-Id: I285833e3aaf855e7bc3cc7cf1ff826a5c01313e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281235
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 13:54:33 +00:00
skia-recreate-skps
939a881c70 Update Go Deps
Change-Id: I441abcdec8b04ce4637c19168ed4be0614cf6625
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281416
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-04-03 05:30:59 +00:00
skia-autoroll
513d454f30 Roll third_party/externals/angle2 745e071241ab..1cc49bb2e230 (9 commits)
745e071241..1cc49bb2e2

git log 745e071241ab..1cc49bb2e230 --date=short --first-parent --format='%ad %ae %s'
2020-04-02 jmadill@chromium.org Squash State::mContext and State::mID.
2020-04-02 geofflang@chromium.org Include the fragment output locations in the program cache key.
2020-04-02 thakis@chromium.org Vulkan: Use shader stage specific barrier
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 1fff36235504..0b66fa3b62cb (1 commits)
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 5cf1e9a31c90..cb58662302c8 (7 commits)
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src c37c94929bf5..f20c0d7971c6 (1 commits)
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src f5504529553f..499f6df688c9 (7 commits)
2020-04-02 cwallez@chromium.org Suppress failures after Win Intel driver upgrade.
2020-04-02 timvp@google.com Vulkan: Don't detach separable shaders in Program::detachShader()

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

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 michaelludwig@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: michaelludwig@google.com
Change-Id: I189fd12531657810808d82dcf4980bd54ebaa8a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281391
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-03 04:56:09 +00:00
skia-autoroll
1fcf8c8d2e Roll ../src deeb0d54a08c..d086f1bdb67d (467 commits)
deeb0d54a0..d086f1bdb6


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

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 michaelludwig@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: michaelludwig@google.com
Change-Id: I0961ef81c3b5e760f1909fc7214262b50dd35f74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281390
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-03 04:52:29 +00:00
skia-autoroll
e70e0c055f Roll third_party/externals/swiftshader cb58662302c8..f99302c4efe6 (7 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/cb58662302c8..f99302c4efe6

git log cb58662302c8..f99302c4efe6 --date=short --first-parent --format='%ad %ae %s'
2020-04-02 capn@google.com Remove the D3D9 and D3D8 source code
2020-04-02 capn@google.com Remove the custom Visual Studio solution and projects
2020-04-02 capn@google.com Fix GN build
2020-04-02 bclayton@google.com Reactor: Fix remove_if brokenness
2020-04-02 capn@google.com Remove the sw::Color<> class
2020-04-02 bclayton@google.com Change for loops to use const refs, per performance-for-range-copy clang-tidy.
2020-04-02 sugoi@google.com Fix ImageView size computation

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

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 michaelludwig@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: michaelludwig@google.com
Change-Id: I475a2ed0b766525d792402041fee1b59b59d4845
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281389
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-03 04:40:29 +00:00
Brian Salomon
8efbbbc0d1 image_from_yuv_textures GM recreates YUVA image before each draw.
Otherwise if any draw flattens the image all subsequent draws of
the image use the flattened texture.

Change-Id: Id1aa58e33f2ec5a13cf1ff75d15f6137aafd556e

Bug: skia:9570
Change-Id: I3a45c4e2b9fead3a5a2500bf5f738ab5d1fbfc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281336
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-02 21:34:06 +00:00
Chris Dalton
47d03f6ee5 Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
This is a reland of d84b691950

Original change's description:
> Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> 
> This is a reland of e8c963d474
> 
> Original change's description:
> > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > 
> > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-02 20:48:31 +00:00
Kevin Lubick
c89ca0ba09 [canvaskit] Tweak matrix benchmarks
Change-Id: Id75580debf87b2c88cfb4c8b052367bffdac8d56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281210
Reviewed-by: Mike Reed <reed@google.com>
2020-04-02 20:42:30 +00:00
Kevin Lubick
6bffe39c98 [canvaskit] Handle passing matrix values into CK ourselves.
This means we take DOMMatrix everywhere now.

This reduced the *_makeShader benchmark by ~25% (4 us -> 3 us)
and cleaned up several callsites.

Trimming this down saves ~3kb in uncompressed code size.

Change-Id: Ie677c7ebb7bc97ed8cd4d4851a039b78b6f8079d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281018
Reviewed-by: Mike Reed <reed@google.com>
2020-04-02 20:42:30 +00:00
Mike Klein
5384f4036f eliminate_dead_code in place
Not too tricky, and saves a program copy.

Change-Id: I3f7e97c1f1935df50905b6cc1ee4de33da2148ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281285
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-02 20:36:40 +00:00
Leandro Lovisolo
17fbcd145b ios.py: Bugfix to prevent iOS tasks from failing with "Error: ImageMountFailed".
This CL fixes a bug in the logic that checks whether there's an image mounted on the attached iOS device.

Currently this is determined by checking whether strings "ImagePresent: true" or "ImageSignature:" are present in the output of command "ideviceimagemounter --list". However, these strings do not match the command's actual output:

  # No image mounted.
  $ ideviceimagemounter --list
  Status: Complete

  # Image mounted (fake signature for illustrative purposes).
  $ ideviceimagemounter --list
  ImageSignature[1]:
   0: Rm9yIGlsbHVzdHJhdGl2ZSBwdXJwb3NlcyBvbmx5LiBUaGlzIGlzIG5vdCBhIHJlYWwgc2lnbmF0dXJlLg==
  Status: Complete

As is, the recipe fails to detect that an image is already mounted on the attached iOS device. The recipe then tries to mount one, which makes the "ideviceimagemounter" command fail with "Error: ImageAlreadyMounted". The following example shows how to reproduce this error:

  # Initially no image is mounted.
  $ ideviceimagemounter --list
  Status: Complete

  # Mount an image.
  $ ideviceimagemounter DeveloperDiskImage.dmg DeveloperDiskImage.dmg.signature
  Uploading DeveloperDiskImage.dmg
  done.
  Mounting...
  Done.
  Status: Complete

  # Verify that the image is mounted.
  $ ideviceimagemounter --list
  ImageSignature[1]:
   0: Rm9yIGlsbHVzdHJhdGl2ZSBwdXJwb3NlcyBvbmx5LiBUaGlzIGlzIG5vdCBhIHJlYWwgc2lnbmF0dXJlLg==
  Status: Complete

  # Try to mount an image when one is already mounted.
  $ ideviceimagemounter DeveloperDiskImage.dmg DeveloperDiskImage.dmg.signature
  Uploading DeveloperDiskImage.dmg
  done.
  Mounting...
  Error: ImageMountFailed

Checking for presence of string "ImageSignature" in the ideviceimagemounter command's output seems to solve the problem.

In the process I also discovered that self._run() requires keyword argument stdout=self.m.raw_io.output() in order to return the command's output. As is, the returned stdout is always blank.

Note to reviewer:
- Patchsets 1 to 11 iterate on a potential fix.
- Patchset 12 reproduces the bug. See the failing tryjob.
- Patchset 13 tries the fix. See the successful tryjob.
- Patchsets 14+ clean up the CL.

Change-Id: I3ca1cdbf4bfa450c3e87d6d87b5f615f28c4aaba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281058
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
2020-04-02 19:18:06 +00:00
Mike Klein
9a11a866fc don't need Builders
eliminate_dead_code() and specialize() both use temporary
Builders but there's no benefit to them, at least for now:

  - eliminate_dead_code() never introduces new instructions,
  so there's nothing for Builder's CSE to catch, and there
  never will be.

  - specialize() only replaces instructions 1:1 today,
  so as written there's nothing much builder can CSE[1];
  any CSE opportunities have already been taken.

[1] technically we can CSE bit_and and bit_clears together,
but that's peanuts, and I'm thinking the real fix there is
eliminating Op::bit_clear and just keeping bit_and.

Trims about 30% off `nanobench -m SkVM_Overhead_VM`.

Change-Id: I1d73d502426db8eec094b37cc63677a2b69f63a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281227
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-02 18:57:26 +00:00
Chris Dalton
56fa47b630 Disable baseVertexBaseInstanceSupport if instancing is not supported
Bug: angleproject:4538
Change-Id: I54f30fb7a3aac593e6978baa54458a44e408f9b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281231
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-02 18:43:56 +00:00
Florin Malita
523f02ded3 [skottie] Cleanup pass
A bunch of boring renames, code relocations, unused code removal.

Also specialize TextValueKeyframeAnimator explicitly and remove the
templated KeyframeAnimator.

No functional changes.

TBR=
Change-Id: I229dd5d3adc28456a886ac5004ae3413c65e73b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281198
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-02 17:23:28 +00:00
Eric Boren
249dcdfa7a Update Go Deps
Change-Id: Ia5ffbc3314c7b05bab06e2d521871961ec051a38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280863
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-04-02 17:05:36 +00:00
Mike Klein
5b701e127c pass around programs by value
It's clearer to see the flow of data this way and to read each pass'
implementation without all the pointer indirection, and move semantics
should let this be just as efficient.

Change-Id: I1ac211fbe54bec37de6d126eec0c211573c2a568
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281218
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-02 16:44:06 +00:00
Mike Klein
b7d87903df pull out schedule, finalize
This finishes up the main refactoring.
Still some follow-ups I want to try.

I got tired of typing usage.users(id) so I converted that to operator[],
which I think is clear for now.  If we add more methods that don't refer
to the users, we can undo?

Change-Id: I0ac563cfb1899f7a3f8b2cb6d50ca1646dd05071
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281216
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-02 16:37:29 +00:00
Brian Salomon
d005b69be4 Reland x2 "Assert that all GrCaps colortype/format -> swizzle queries are legal."
This reverts commit e8d2080a34.

Change-Id: I3e1d586939fbc2763aa7b7eb0b35cd6e34f2922d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-02 16:26:07 +00:00
Brian Osman
43542fc57f Add GrVkPipelineStateBuilder and GrMtlPipelineStateBuilder trace events
Bug: skia:10098
Change-Id: If46bab35b0b7bfcb45880ca9f73f3409fd8df80c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281199
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-02 15:38:39 +00:00
Brian Salomon
8afde5f395 Rename outputView->writeView and outputSwizzle->writeSwizzle
Change-Id: Ib09550201bc1556e04555fc7dc9408ab469684a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280964
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-04-02 15:06:16 +00:00
Brian Salomon
c3ce54a8a7 Remove color type from promise image proxy callback.
The color type used to influence the GrPixelConfig and the swizzles
used with the proxy and its GrTextures. So we had to create a new proxy
if the same API texture was used to fulfill a promise image of a
different color type. That has all been removed or lifted out of proxies
and into views. So now it is fine to reuse the same proxy/GrTexture with
a different color type.

Also remove unit test that checked required a new GrTexture be made if
a different color type was used.

Bug: skia:10078

Change-Id: Ib74c419b5d54d382ea95720af7026640e35013f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281056
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-02 14:59:18 +00:00
Weston Tracey
27801a82e4 Broke Debian9 things in skolo.
Revert "[infra] Upgrade to Debian 10 for GCE tasks."

This reverts commit b5d39b54a3.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [infra] Upgrade to Debian 10 for GCE tasks.
> 
> Bug: skia:9438
> Change-Id: I1326f55fa8546d141c43ef4c6fcee6f65ed0e600
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280901
> Commit-Queue: Weston Tracey <westont@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>

TBR=borenet@google.com,westont@google.com

Change-Id: I866444b0b88ebc335a5cda8ab388b621c1b22c36
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281201
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Weston Tracey <westont@google.com>
2020-04-02 14:51:36 +00:00
Mike Klein
7542ab5e5b reframe liveness_analysis as eliminate_dead_code
Seems nicer to keep encapsulated in a program->program pass
so nothing upstream of it has to think about liveness.

I will be circling back around to profiling the cost of these
tempoaries, copies, etc.  I just want to start writing them as
if cost were no object first.

Change-Id: I1d1187b521fbe963e720e0d8de90316a549f7797
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281182
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-02 14:44:36 +00:00
Weston Tracey
b5d39b54a3 [infra] Upgrade to Debian 10 for GCE tasks.
Bug: skia:9438
Change-Id: I1326f55fa8546d141c43ef4c6fcee6f65ed0e600
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280901
Commit-Queue: Weston Tracey <westont@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-04-02 14:15:20 +00:00
Brian Osman
717d386e0b Remove more remnants of SkVertices bone support
Bug: skia:9984
Change-Id: Ib79cf2509f5f92672cbb0b6060b8b33f99e9ac28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281162
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-02 14:12:06 +00:00