Commit Graph

46543 Commits

Author SHA1 Message Date
Greg Daniel
5c082496e1 Use views throughout gpu blur code.
Bug: skia:9556
Change-Id: I3988c8112d72d5453cf93e58542eb68b16e67e1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267452
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-29 20:37:00 +00:00
Kevin Lubick
8a46f76646 [canvaskit] Add demo for RT shader
No-Try: true
Docs-Preview: https://skia.org/?cl=267453
Change-Id: Iaddd796c8650e4668b9c23e0bf7cb64cbf998af2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267453
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-29 19:42:40 +00:00
Chris Dalton
6ccc032f4b Add a "kSimpleInnerPolygons" mode to GrTessellator
The inner polygons connect the endpoints of each verb. (i.e., they are
the path that would result from collapsing all curves to single
lines.) Requiring it to be simple means the tessellator will abort if
there is any self intersection or double winding.

This exciting new mode will be used by the GPU tessellator. It will
stencil the curves only, then draw the inner polygon directly to the
canvas. This gives us most the advantage of CPU tessellation, at a
fraction of the cost. And the tessellated inner polygon can
potentially be cached and reused independent of the view matrix.

Change-Id: I4c70b18c6f8b011396e00a5b08997cdf9846c9af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266422
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-29 19:08:07 +00:00
Florin Malita
f7d399a6ca [skottie] Cleanup: convert shape stroke/fill to new adapter pattern
TBR=
Change-Id: If4b9e591fdd4349b6a06ce86ba5284ab43634a03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267447
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-01-29 19:02:07 +00:00
Brian Salomon
38c85d262c Check for valid stencil buffer in GrGLGpu::clearStencilClip
Bug: chromium:984747
Change-Id: Ic71786a4de31b8836a4d28863cfaa474ed77502e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267446
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-01-29 18:50:07 +00:00
Brian Salomon
37e7b36a3d Make cache RRect blur masks with exact fit textures.
I made this be kApprox here:
https://skia-review.googlesource.com/c/skia/+/264838

to resolve a TODO. However, it uses more memory and after thinking about
it I'm not sure why it was a TODO to use an approximate texture for a
cached texture. If it's worth caching it's probably worth making a trim
texture.

Bug: chromium:1044017

Change-Id: Iac8302291592231875f5619b33e8ee6e13a92a64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267444
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-29 18:31:59 +00:00
Mike Reed
f4a90679d1 tweak textbox to use subpixel
This makes it line-up with the coretext version.

Bug: skia:9836
Change-Id: I39f51e56ecb0d55ab970a8fa247bede9f4f0f394
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267445
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-29 18:26:27 +00:00
Chris Dalton
022bd3b32a Preserve triangle winding in GrTessellator
Ensures the tessellator's triangles always wind in the same direction
as if the path had been triangulated as a simple fan (a la red book).

Change-Id: I1275a6dc9c2673e5f710ca46c357409dcd233162
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263390
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-01-29 18:24:57 +00:00
Julia Lavrova
db543f60a8 Memory leak in cache
Change-Id: I3edebd64a28584412e0dfac6849ee8d608243262
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267441
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-01-29 17:39:37 +00:00
Greg Daniel
8354717302 Remove asTextureProxyRef from SkSpecialImage.
We replace all uses of the function with asSurfaceProxyViewRef.

Bug: skia:9556
Change-Id: I23d425531d78e30fc401b04169d5dc96072cdd80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267181
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-29 16:47:06 +00:00
Mike Reed
a2a0c8a2c4 extract font from run
Change-Id: Ice98eeb1f815cf07f842b22ddc26e32e849a1218
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267256
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-29 15:28:06 +00:00
Florin Malita
d960cc31b6 [skottie] Cleanup: remove unused header
SkottieAdapter.h is no longer used.

TBR=
Change-Id: I5a6f503c52168a4418540d344e47cdde101a9f90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267396
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-01-29 15:13:36 +00:00
Robert Phillips
99044e1a6a Update wacky_yuv_formats GM to demonstrate YUV resizing on the GPU
Change-Id: Idd2b75ca84c1d7984aa983820b4325fbbda2b753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266203
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-29 14:16:36 +00:00
Robert Phillips
45c9487914 Add SkImage::MakeTextureFromCompressed and deprecate MakeFromCompressed
Bug: skia:9680
Change-Id: Ifb8bc362cb2d2d3c0640f81eb6a11a613bf18de6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267178
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-01-29 13:21:55 +00:00
Kevin Lubick
dc49b0ca98 [canvaskit] Fix support for fonts with CFF
Adds a test to load different font types. Currently supported:
 - .ttf
 - .otf
 - .ttc

Not supported:
 - .woff
 - .woff2

This only increases code size by ~4kb, so that big glyph table
has still been successfully removed.

Bug: skia:9829
Change-Id: I0231578b2abf4f36df57ff8073b7697d16606373
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267180
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-01-29 12:39:55 +00:00
skia-recreate-skps
3d23fc123c Update Go Deps
Change-Id: I820d6204b02d73f4a782caaae6c80e0a3ebb8cee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267340
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-01-29 05:23:33 +00:00
skia-autoroll
1b5b51de55 Roll ../src 77c4d4c42f40..243744c215b7 (487 commits)
77c4d4c42f..243744c215


Created with:
  gclient setdep -r ../src@243744c215

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 reed@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: reed@google.com
Change-Id: I80d55ad523bdc88f8e84e3a3e2ed550cd1744645
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267284
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-29 04:53:03 +00:00
skia-autoroll
803aaeb796 Roll third_party/externals/swiftshader 34e16df059f8..6c3dc3581eaf (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/34e16df059f8..6c3dc3581eaf

git log 34e16df059f8..6c3dc3581eaf --date=short --first-parent --format='%ad %ae %s'
2020-01-28 capn@google.com Support LLVM 8+ build changes
2020-01-28 bclayton@google.com SpirvShaderDebugger: Fix double nesting of struct members

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

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 reed@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: reed@google.com
Change-Id: I2535d2e74eee899ec766fca737907a0df308fc87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267283
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-29 04:36:23 +00:00
skia-autoroll
71d5d9c9fd Roll third_party/externals/angle2 086aded3cb74..2bc9cc12f0b0 (19 commits)
086aded3cb..2bc9cc12f0

git log 086aded3cb74..2bc9cc12f0b0 --date=short --first-parent --format='%ad %ae %s'
2020-01-29 spang@chromium.org Fuchsia: Blacklist swiftshader on Fuchsia
2020-01-29 spang@chromium.org Fuchsia: Disable GLES3 testing on Fuchsia ARM
2020-01-29 syoussefi@chromium.org Vulkan: Fix handling of inactive fragment outputs
2020-01-29 spang@chromium.org Vulkan: Disable global merge for volk
2020-01-28 spang@chromium.org Fuchsia: Implement SystemInfo on Fuchsia
2020-01-28 ynovikov@chromium.org Disable 'nodiscard' warning on MSVC for dEQP.
2020-01-28 spang@chromium.org Fuchsia: Switch to gfx_tests sandbox configuration
2020-01-28 shrekshao@google.com Turn on clampArrayAccess globally but off for compute shaders
2020-01-28 jmadill@chromium.org D3D11: Fix uninitialized BufferEx SRV.
2020-01-28 jmadill@chromium.org Fix overlay build.
2020-01-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-headers/src 881bbb347a08..726435870206 (1 commits)
2020-01-28 ianelliott@google.com Vulkan: SwiftShader now getting correct sample positions
2020-01-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 1b3441036a8f..97f1d485b763 (1 commits)
2020-01-28 syoussefi@chromium.org Add a test to expose location'ed varying link bug
2020-01-28 jmadill@chromium.org Make run_code_generation fail if git cl format fails.
2020-01-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 310fb8617946..44ac9b2f406f (2 commits)
2020-01-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src b0ada80356ca..07a55839eed5 (6 commits)
2020-01-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src b181c1a7ddb5..e39b5cf6a1b6 (1 commits)
2020-01-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 748ad200897b..34e16df059f8 (6 commits)

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

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 reed@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: reed@google.com
Change-Id: I77a476c060e226e6cd082dc9cf1e8572429cb637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267282
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-29 04:34:54 +00:00
Mike Klein
9404603ccb remove more vtune references
Obsolete since I added the dylib SkVM JIT mode.

Change-Id: I124f83cd365fd542ca92fab7f187b003ad2e1c90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267279
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-29 04:19:03 +00:00
Mike Klein
caf5ee4451 start on 2pt conical gradients
Couple ways to do this masking, but since we basically
need the same for decal, seems easiest to send it up to
the common code and handle it all together.

Change-Id: Idf806d7feab12a9caf339febd30dd3a2432ec038
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267244
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-29 03:43:42 +00:00
Chris Dalton
dcc8c5431b Convert the "bool antialias" param in GrTessellator to an enum
Change-Id: I685f4fd9e4c5b01a9b727a21f525721f025957a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266421
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-01-29 01:27:02 +00:00
Greg Daniel
c52db71c9b Store GrSurfaceProxyViews on SkSpecial*_Gpu.
To make this change cleaner, GrMakeCachedBitmapProxy now returns a view
and all its callers updated.

Additionally some effects were updated to fully use views in cases
where they had to be updated anyways to support SpecialImages and there
wasn't much additional work to pass them around everywhere.

Bug: skia:9556
Change-Id: Ie5a631cdec481391437e2f74275f958d15676780
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267176
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-29 00:24:33 +00:00
Florin Malita
ad9110026b [skottie] Separate text resize options
The sk_vj text property (Skottie extension) is currently mixing
vertical alignment and resizing semantics into a single enum.  This
precludes certain valid combinations.

Split the resize options into a separate enum (ResizePolicy), and ensure
support for all combinations.

Before:

  "sk_vj": 0 -> Shaper::VAlign::kVisualTop
  "sk_vj": 1 -> Shaper::VAlign::kVisualCenter
  "sk_vj": 2 -> Shaper::VAlign::kVisualBottom
  "sk_vj": 3 -> Shaper::VAlign::kVisualResizeToFit
  "sk_vj": 4 -> Shaper::VAlign::kVisualDownscaleToFit


After:

  "sk_vj": 0 -> Shaper::VAlign::kVisualTop
  "sk_vj": 1 -> Shaper::VAlign::kVisualCenter
  "sk_vj": 2 -> Shaper::VAlign::kVisualBottom

  "sk_rs": 0 -> Shaper::ResizePolicy::kNone
  "sk_rs": 1 -> Shaper::ResizePolicy::kScaleToFit
  "sk_rs": 2 -> Shaper::ResizePolicy::kDownscaleToFit


Bug: skia:9809, skia:9810
Change-Id: I631ae1fa31a9bc9c6958bb480354138591d504ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267040
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Isabel Ren <isabelren@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-01-29 00:09:42 +00:00
Mike Klein
faa34c536b partial strength reduction for bit ops
We had full constant eval of these already; this adds a bunch of
degenerate cases when one argument is known to be true or false.

Change-Id: Ic0535d8a99357947fd73bd9f719eec4645dc919d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267243
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 23:50:01 +00:00
Greg Daniel
6f5441a2f6 Remove create function in proxyProvider that takes a raster SkImage.
Instead in proxyProvider we just have a create a bitmap call which
does no special fallback or logic. All the callers now go through
GrBitmapTextureMaker which handles and special fallbacks or caching
support that we need.

Change-Id: I71bb896cc78f64f9d6d54b54af2490d48e0f5af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266842
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-28 23:29:32 +00:00
Mike Klein
5e58f94d67 tweak grading in gm/skbug_9819 for G8
We can look at the luma to test correctness,
which lets G8 destinations be tested correctly.

Change-Id: I412381e5b2829258f0f9f340fb28ff88344e7f02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267225
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 22:10:36 +00:00
Mike Klein
bd1360f4d7 skvm sweep gradients
Basically the same as SkRasterPipeline version.
Need to thread uniforms through for scale/bias.

Change-Id: I27fd91469d9108d155a751dad71047eded4b6692
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267223
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 22:08:20 +00:00
Mike Reed
04da74633f improvements to shaper_ct
- fix CF leaks
- handle memory allocs better (using arena)

Change-Id: I0282bac288f7e5a785b6aab100251edde4b06b3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267079
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-01-28 22:05:31 +00:00
Brian Salomon
2ea69aa297 Fix asyncRescaleAndReadPixelsYUV420 fallback w/out GL_EXT_texture_rg.
Copying the color type from the RTCs is incorrect because we may have
fallen back to GL_RGBA8 if GL_R8 is not renderable.

Change-Id: Ie8effabfe60c2410d200b1775f463d5edb13fe81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267179
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-01-28 21:46:50 +00:00
Mike Klein
ba9da466cc radial gradients in skvm
- Add sqrt(), vsqrtps for x86.
- Hook into SkRadialGradient.

Change-Id: I66a4598e30fe16610c59a512f7d962323ee5134a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267196
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 21:04:36 +00:00
Herb Derby
0ef780befd Use a monotonic counter for atlas and plot generations
Currently when the GPU resources are freed, the generation counters
are reset back to 1. This could allow stale data to be retained in the
SubRun texture coordinates. In addition, it confuses managing the
GrStrikes.

Use monotonic counters so that no number is ever repeated. This allows
for a simple check of equality without any additional checks or constrinats.

Bug: chromium:1045016

Change-Id: Ib58abf9a99107a37927fa73aef88a95900f70a5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266618
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-01-28 21:01:36 +00:00
Mike Klein
d352529216 incorporate r,g,b,a into shaderHash
Today's shader hash changes if the unordered set of {r,g,b,a} values we
produce changes, but is not sensitive to simple order changes like
sampling RGBA vs BGRA.

Folding in a hash of each value's ID in order will fix this.

This has been difficult to track down (thread-local caches),
so I've added a GM that reliably reproduces the bug.

Live demo: https://fiddle.skia.org/c/30f2e5b731c2e53a6f092424c585ca41

Bug: skia:9819
Change-Id: Iceb09d89eb036735028ae97dc79c576787199ac5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267119
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 20:58:37 +00:00
Robert Phillips
162e04b9a9 Expand the compressed_textures GM
This CL adds testing for some edge cases in compressed texture handling

Bug: skia:9680
Change-Id: I4915f46bca9e2fb5c827a51152f28dc1e9d22942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266201
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-01-28 20:34:18 +00:00
Kevin Lubick
0f4cb09320 [debugger] Use correct archiver
This will allow usage of emscripten 1.39.6 to build

Change-Id: I089f47fa4fa38bf55c5071f5d711856c8ab422b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267080
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-28 19:51:18 +00:00
Herb Derby
6d54a1e5f0 Atlas generation numbers is not tracking plot changes -- disable it
The atlas generation number is used avoid checking if each glyph has
a valid plot location. If the atlas generation number ever misses
an eviction of a plot, then some glyph atlas coordinates will be considered
valid when in fact they are stale.

Fix: Always check the texture coordinates of every glyph. Don't use the
atlas generation numbering to reduce work.

Bug: chromium:1045016
Change-Id: I287d3bbcd0a5d679327002595ae50e0f775dca12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267096
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-01-28 19:35:34 +00:00
Mike Klein
a4ecfd10b4 prune unused SkPostConfig
Mostly this is really just removing strictly unused bits.

Removing SkNO_RETURN_HINT() from SK_ABORT() isn't quite
strictly unused, but I think maybe it's moot since we
added SkUNREACHABLE to the end of SK_ABORT().

Change-Id: I1b23a7f1cb325723b359762b0879110a2c82575f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267071
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-28 19:20:34 +00:00
Mike Klein
9ae06637d0 add --skvm to DM
Change-Id: I54038b34cb10322ec688f24e3869a7481d2e2c66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267070
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 19:07:54 +00:00
Kevin Lubick
e17862a71e Fix wasm builds
After the update to emscripten 1.39.6, source maps don't
work on ASMJS builds and debugger needed the same change
of the default MAIN_MODULE setting as canvaskit and pathkit.

Change-Id: Ifb920dee998ae41fd500adca587b1ad20cfef584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267076
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-28 19:03:49 +00:00
Stephen White
f03c116021 Roll dawn and adjust for new SwapChain API.
Split GrDawnImageInfo into GrDawnTextureInfo and GrDawnRenderTargetInfo.
The former holds only a wgpu::Texture, and the latter holds only a
wgpu::TextureView. This split is necessary because Dawn SwapChains now
vend TextureViews, not Textures.

The TextureView held by GrDawnRenderTargetInfo is always 1-mip, since
it's a requirement for rendering to a texture in Dawn.

Change-Id: Id6e99b5e4bf18f97e939170856a665e2038253ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254810
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-28 18:26:44 +00:00
Brian Salomon
6aa65053d9 Add fallback for asyncRescaleAndReadPixelsYUV420 without PBOs.
Uses synchronous read pixels.

Change-Id: I6dac88a6d33a4771fc3108b43825a2f10dd7b51d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267044
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-28 17:48:14 +00:00
Mike Reed
b2bf28cbbc Experimental coretext backend for SkShaper
Primary goal: API compatibility with SkShaper but reduce code size on iOS.

Change-Id: I6ee8f49827a029569010a69308541b74a21ac3e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266854
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-28 17:41:54 +00:00
Julia Lavrova
89e678dea2 Skip vertical clipping in unclear case of font height=font size
Change-Id: Ib58c34f6ab3ff36e73b2d9d4b0d4f5d03c72c9dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267041
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-01-28 17:17:06 +00:00
Kevin Lubick
f76da63fbd [canvaskit] Update build script to support latest Emscripten
Add workaround for https://github.com/emscripten-core/emscripten/issues/10072

Note to reviewer, please check out the steps I added
in canvaskit/README.md to document this process.

Bug: skia:9816
Change-Id: Idbe7ff08ac62f4f4d70e656384831b8d24c4a684
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266941
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-28 15:41:58 +00:00
Robert Phillips
99dead9830 Add SkImage::MakeRasterFromCompressed and make MakeFromCompressed fall back to decompression for unsupported compression types (take 2)
This is intended to make using compressed textures easier since developers can just provided compressed data and it will be uploaded to the GPU in some way, shape or form.


TBR=reed@google.com
Change-Id: I8c672ccc7db5cd098f629c3469ae7cbdc7436392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266939
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-01-28 14:03:14 +00:00
skia-recreate-skps
9f8c6ea7af Update Go Deps
Change-Id: I848176d90b8e4dceca35d649948bf9e5b6eda721
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266985
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-01-28 05:28:33 +00:00
skia-autoroll
c9653c80c6 Roll ../src 82459860eaf4..77c4d4c42f40 (425 commits)
82459860ea..77c4d4c42f


Created with:
  gclient setdep -r ../src@77c4d4c42f

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 reed@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: reed@google.com
Change-Id: I2e0381cc063b52039ff08b7dba47ec129a4e171b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266979
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-28 04:52:04 +00:00
skia-autoroll
067755621c Roll third_party/externals/swiftshader 748ad200897b..34e16df059f8 (6 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/748ad200897b..34e16df059f8

git log 748ad200897b..34e16df059f8 --date=short --first-parent --format='%ad %ae %s'
2020-01-27 sugoi@google.com Revert "VK_EXT_shader_stencil_export support"
2020-01-27 sugoi@google.com Sample location fix
2020-01-27 capn@google.com Avoid ignoring unsuccessful routine creation
2020-01-27 capn@google.com Implement byte swizzle operations
2020-01-27 bclayton@google.com Docs: Add VulkanShaderDebugging.md
2020-01-27 sugoi@google.com VK_EXT_shader_stencil_export support

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

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 reed@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: reed@google.com
Change-Id: I892d0993e68a9d7e9960a44a46cb04e0934d2931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266980
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-28 04:36:03 +00:00
skia-autoroll
211075b406 Roll third_party/externals/angle2 fcef6dcb6ab2..086aded3cb74 (9 commits)
fcef6dcb6a..086aded3cb

git log fcef6dcb6ab2..086aded3cb74 --date=short --first-parent --format='%ad %ae %s'
2020-01-27 syoussefi@chromium.org Return the correct location count for matrices in structs
2020-01-27 courtneygo@google.com Vulkan: Allow user to specify preferred device
2020-01-27 syoussefi@chromium.org Fix atomicAdd validation w.r.t to swizzles
2020-01-27 jonahr@google.com Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control
2020-01-27 syoussefi@chromium.org Vulkan: updateActiveImages: process each image once
2020-01-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 37d3a235af2c..310fb8617946 (1 commits)
2020-01-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src b97057e7f747..1b3441036a8f (6 commits)
2020-01-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 5ef91b82cbed..748ad200897b (6 commits)
2020-01-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src 93ab50fc27de..b181c1a7ddb5 (4 commits)

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

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 reed@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: reed@google.com
Change-Id: If098f3433234678a7f813eff27ac2c6d8be9cdc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266981
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-28 04:34:23 +00:00
Brian Salomon
7ee8ca5a32 Fix bug in NPOT shader wrap mode impl
TBR: michaelludwig@google.com

Change-Id: Ib44081d8ad2cb6fdb7be0fd6a088eda0eeb653bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266947
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-28 03:18:00 +00:00