Commit Graph

4826 Commits

Author SHA1 Message Date
Brian Osman
0af9e5a15c Add shadertoy style 'iTime' to SkSLSlide
Change-Id: I1eaffcce43921632df483e40aa365c645663093a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343418
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-12-11 15:54:40 +00:00
Mike Reed
f7cce2b243 Remove dead code (from old flags)
"SK_SUPPORT_LEGACY_CANVASMATRIX33",
  "SK_SUPPORT_LEGACY_MATRIX_FACTORIES",
  "SK_SUPPORT_LEGACY_SCALEPIXELS_PARAM",

Change-Id: I6e20ba7c553317ce0c2c0c3a6d6706a3555dd51c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343112
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-11 02:35:49 +00:00
Mike Reed
b86cd3d3f0 Use samplingoptions in imageshader
Change-Id: I7d94fe7aed702afd0626a40db201caaf7c2a7764
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342927
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-12-10 21:59:19 +00:00
Brian Salomon
fb018a8d80 Add SurfaceContextReadPixels to excluded wasm tests
Cq-Include-Trybots: luci.skia.skia.primary:Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2

Bug: skia:10869
Change-Id: Ib924218aeb4d6dc2e383b86135123efe6eb5639a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343096
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-12-10 20:20:09 +00:00
Brian Salomon
eebe735dea GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.

Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-10 18:51:19 +00:00
Ravi Mistry
2c98edf07f Spelling and capitalization fixes from GitHub PRs
Inspired by
* https://github.com/google/skia/pull/18
* https://github.com/google/skia/pull/22

Change-Id: I4c092978f928ff2f589b6440d1fcdd846fa2b56f
Docs-Preview: https://skia.org/?cl=342925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342925
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-12-10 18:40:09 +00:00
Mike Reed
410681932a Use explicit sampling param
Change-Id: Ifcb074365da8113fd5e0186d4afcf41041862e82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342761
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-10 14:01:58 +00:00
Nathaniel Nifong
5ef2267a88 Reland "Always attempt to flatten images with mskp image ids"
This is a reland of eca04eeeb8

Problem was that any error during image flattening left the json encoder
in an invalid state. this closes the object before all early returns.

Original change's description:
> Always attempt to flatten images with mskp image ids
>
> b:skia:11041
>
> Change-Id: I9eeac07b5cad7809d1e8ec9f9b12149f016227e0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341798
> Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

Change-Id: I622dbaa3ce5db85c9f790f822d51be247af528bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342463
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-12-09 21:03:17 +00:00
Nathaniel Nifong
050ea3a580 Revert "Always attempt to flatten images with mskp image ids"
This reverts commit eca04eeeb8.

Reason for revert: breaks playback for regular skp files

Original change's description:
> Always attempt to flatten images with mskp image ids
>
> b:skia:11041
>
> Change-Id: I9eeac07b5cad7809d1e8ec9f9b12149f016227e0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341798
> Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

TBR=nifong@google.com,lovisolo@google.com

Change-Id: I034229b5b22aa478cdcc26d3a0bcb4e543606c04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342462
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-12-09 17:58:36 +00:00
Brian Salomon
8670c98875 Remove SkImage::MakeFromYUVATexturesCopyToExternal
It's no longer used by Chrome.

Inline helper that draws yuva->rgba into the now single use case.

Move yuva proxy making helper from SkImage_GpuBase to SkImage_GpuYUVA
since it is only used there now.

Remove gm that tested the API and associated helper code in YUVUtils.

Bug: skia:10632
Change-Id: If6bd49befa1d1098bb6a268b9d856794f7eb80c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342077
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-09 14:50:19 +00:00
Nathaniel Nifong
eca04eeeb8 Always attempt to flatten images with mskp image ids
b:skia:11041

Change-Id: I9eeac07b5cad7809d1e8ec9f9b12149f016227e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341798
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-12-08 22:10:23 +00:00
Mike Reed
99c944647f Add flag to hide non-sampling imageshader factories
Bug: skia:11056
Change-Id: Ic79876106c003f6061cbb50ad2f4a4bf4f446231
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341681
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-08 20:33:23 +00:00
Robert Phillips
b87975c133 Use the ManagedBackendTexture helper in fiddle_main
Change-Id: I84dd14cc3328bf2f9beb0c0ac17a4f98fb62baba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273017
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-08 17:39:12 +00:00
Chris Dalton
ff18ff6b29 Update viewer path renderer options for indirect tessellation
Also includes the tessellation path renderer in the list of path
renderers when tessellation via indirect draws is available.

Change-Id: Ieac9e00d204dd8f9c6401b39179c65e1d8f442aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341491
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-12-08 16:46:22 +00:00
Brian Salomon
14f99fc2f3 Make GrSurfaceContext take GrColorInfo rather than its components.
Bug: skia:11019
Change-Id: I0446e3565c892cddaaeb13d9a8379e144c0ea8ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341419
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-12-08 14:56:22 +00:00
Brian Salomon
b5f880a3f6 Take origin when creating/updating backend texture using pixmaps.
Bug: skia:11042

Change-Id: I511c7556f97f19d7f162031c245019d2da33c129
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341005
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-07 20:31:10 +00:00
Robert Phillips
6c70661f86 Pass GrMipMapped boolean down to GrResourceProvider::createTexture
This is the portion of:

https://skia-review.googlesource.com/c/skia/+/266916/ (Update two of GrResourceProvider's createTexture entry points)

I still care about.

Converting the boolean to an int and passing that down is dubious at best.

Change-Id: I830cc3bfad36526bfa7884e21c9f376585d27f0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341397
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-12-07 18:08:29 +00:00
Brian Osman
e7f68f3644 Tweak ParticlesSlide's resource provider to show how to use PathBinding
Adds an example effect that spawns particles along an SkPath.

Change-Id: I53f3c02fefec814bd9e16f3ac593eac4cf6a297c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341418
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-12-07 17:26:39 +00:00
Nathaniel Nifong
ae95077db6 fix another m44 bug in debugger
Change-Id: Id80344a71b54c80609ec24947014592d6b30eb63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341001
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-12-04 21:41:55 +00:00
Mike Reed
db873dd600 add util for checker image
Change-Id: I6fcf6263a6a261016cb5971872c2f2b5a9943d8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341004
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-04 18:02:24 +00:00
Jim Van Verth
95fb5786c5 Deprecate Metal support on iOS 9.
Also fixes a warning when building for OSes older than MacOS 11/iOS 14.

Change-Id: I81fb5849df41c63f6d10696f6c056451719df906
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340756
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-12-03 21:11:28 +00:00
Mike Reed
1a4140e598 deprecate getTotalMatrix
Change-Id: Iec7d67f4ec3fdf4d5280f3de3d6146a69a60c646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339995
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-03 17:37:35 +00:00
Brian Salomon
70fe17e12f Remove GrRenderTargetContextPriv and GrSurfaceContextPriv
I think this is vestigial from some time in the past where RTC was
public.

Also just expose the methods that add ops rather than have so many
friends + testingOnly versions.

Change-Id: I60d9fdff23b2d67039a7b37815da7ff9e73d8999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339158
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-30 20:13:25 +00:00
Mike Reed
420a9ba7b5 Switch to m44 for the rest of canvas virtuals
Guard flag has been added to clients

Change-Id: Ib61a48781f5dbd52279c8f4257ba3e22fb2704e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338596
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-11-25 21:50:37 +00:00
Brian Osman
452369182f IWYU fix for sk_app/Window.h
Bug: skia:10991
Change-Id: Ie33a37109feba31acf675fc3a7739dcfc2c38668
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338601
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-11-25 19:03:37 +00:00
Jim Van Verth
ecc9108d87 Hide binaryArchive use in Viewer behind a flag.
Still needs more testing before we can enable this all the time.

Bug: skia:10804
Change-Id: I6d8416fa072054d2f44e337641ed5d8379e81559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337216
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-11-25 17:27:47 +00:00
dependabot[bot]
6c5e78d099 Bump bl from 4.0.2 to 4.0.3 in /tools/perf-canvaskit-puppeteer
This is a security fix.

This is an imported pull request from
https://github.com/google/skia/pull/65

GitOrigin-RevId: 38f6e1b1fd360a28135ce0579dbc5521edbcf1a3
Change-Id: I5f38b6f76fcd2943decd5dbe7df7546d4ce2084f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338052
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-11-24 17:10:56 +00:00
Nathaniel Nifong
a084ef4291 Add supporting function for finding image use in layers
Change-Id: I39d3a95a3854875d15992b73ee16521d3bf28c8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337596
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-11-24 17:04:56 +00:00
Robert Phillips
2c21a11923 Remove uses of SkCanvas::flush
afaict the perf surprises associated with:

https://skia-review.googlesource.com/c/skia/+/334417 (Remove SkBaseDevice::flush)

were bc Ganesh resolves MSAA buffers for SkCanvas::flush but doesn't do so for GrDirectContext::flush.

Where possible this CL switches SkCanvas::flush to SkSurface::flush (which will also resolve MSAA buffers) so that when https://skia-review.googlesource.com/c/skia/+/334417 relands there should not be any performance surprises.

Change-Id: I705ad6219f0f625a88cf3f9e8b2418a3182d298c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335866
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-11-20 21:42:38 +00:00
Adlai Holler
da1c4d2a29 Spruce up iOS viewer and cut CPU drain
Main outcome here is that we only draw once per frame instead
of pinning the CPU. We also cut out a little extra traffic – an
autorelease pool per draw, but trivial. We also fix an overrelease
on NSProcessInfo.arguments, and a missing -init for the UIViewController
etc.

Change-Id: Ibb5ea5832bc65d2ff60351d4e3b76fd3b4ff88ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337116
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-11-20 20:32:17 +00:00
John Stiles
f7da92372a Enable Mac to build with SK_VULKAN enabled.
We no longer support MoltenVK, so we can't render using Vulkan on Mac,
but this change allows Macs with the SDK installed to compile Vulkan
code and use SPIRV-Tools.

Change-Id: I5baaf80de259e406495002a5fbfec89dbd1357b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336678
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-11-20 16:32:36 +00:00
Greg Daniel
42dbca51f4 Pass in the color load op to GrProgramInfo.
In follow on CLs we need to know what the load op is when we try to use
discardable msaa attachments. For vulkan the load op affects how we
copy the resolve attachment into the msaa attachment, which changes the
render pass we use (adds extra subpass). We need to be able to make a
compatible render pass to compile programs.

Bug: skia:10979
Change-Id: I40c23a18b251af6a2ad3b78a1f6382bdba0b90c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336598
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-20 16:29:56 +00:00
Adlai Holler
e2296f7a70 Pass the writeView as a const-ref instead of a pointer …
The important part is in GrOpFlushState.h were previously
we were taking a mutable pointer to the view, which should
at least be a const pointer and was making us do funky things
in some of the calling code. But I decided to go all the way
and do a const ref instead which is The Way It Should Be (tm).

Change-Id: I399d102e8b5e0a5059168cc450ae66f12ad47e13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336451
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-11-20 14:59:34 +00:00
Jim Van Verth
9e64047a04 Add MTLBinaryArchive support to iOS Metal build
Change-Id: I7a4f58e4fc1fc18c42de372dd480e0681000e2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333758
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-11-19 20:00:30 +00:00
Robert Phillips
4dbff75f6a Update GrTTopoSort to use pre-existing memory ...
... rather than allocating an extra "result" array.

This CL also changes the sort algorithm to soldier on even after
it has found a loop.

Change-Id: I03fe8da1aade6c9461eb42e1b7d79fae562210f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335824
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-18 22:34:55 +00:00
Jim Van Verth
5a89ed542f Add activation events to sk_app.
Currently only in IOS, makes the iOS app more background-friendly
and sets up for storing Metal context state.

Bug: skia:10804
Change-Id: I267cfad2bf78b1691fe71986716d2986729dd237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334678
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-11-16 16:44:08 +00:00
Nathaniel Nifong
a06b63c56e Deprecate some debugger bindings in favor of ones that better serve the lit html debugger
The deprecated ones can be removed when the polymer debugger is gone.

Change-Id: I351f1c691d7a95fea594c7e001f9b16c15d216a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334160
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-12 23:01:56 +00:00
Jim Van Verth
351c9b53d6 Switch to using GrMtlBackendContext for GrDirectContext creation.
Makes the Metal backend more consistent with the other backends,
and allows new init parameters to be added without significantly
changing API.

Added updated sk_cf_obj because I needed some of its functionality.

Bug: skia:10804
Change-Id: I6f1dd1c03ddc4c4b702ea75eff14bc0f98ab5ad2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334426
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-12 21:03:51 +00:00
Herb Derby
4168981bb0 don't use MASK_FORMAT_UNKNOWN to represent scaler context state
MASK_FORMAT_UNKNOWN was shared state between glyphs, and
SkScalerContext making hard to reason about.

Change-Id: Ifb70bcc288bc46905de5f2c32891c940a0b2a11f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334157
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-11-12 18:10:50 +00:00
Kevin Lubick
6df5cd28db [canvaskit] Revert raster change.
Drawing to a Premul Raster Surface and then copying out Unpremul pixels
was 15x slower. Drawing to an Unpremul Raster surface was a little
slower than the previous RasterDirect surface.

Out of an abundance of caution, I'm going back to the way things were.
We can revisit drawing to a Raster surface in the future.

This also adds better error handling to the SkottieFrames test which
thankfully caught this regression.

Bug: skia:10717
Change-Id: Ib8b9d490c92e013c3311adb1d08de5fa0fc0351c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334356
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-11-12 14:49:47 +00:00
Chris Dalton
e266180173 Don't limit pinch zooming in viewer
I keep getting blocked when I try to zoom in on strokes. I don't think
we need to limit zooming in our test app; the "tap to reset" feature
works very well if we get lost.

Change-Id: Icf2b364b94128512f7117299b607131c5065cc36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-11-11 17:51:35 +00:00
Brian Osman
ba3e8f9779 Improve Viewer on UNIX
- We were using the wrong keycodes for letters, so we never triggered
  undo/redo/copy/paste in response to Ctrl+Letter combos.

- ImGui comes with system clipboard support on Windows and Mac, but not
  UNIX/Linux. I added a bare bones X11 implementation, enough to support
  copying and pasting text in and out of the ImGui text windows. There
  is a bit of a delay when pasting to another program, probably because
  we're not running a dedicated thread to handle those events. It looks
  like we get a flurry of events before the real SelectionRequest.

- Note that this leaves the virtual clipboard functions on Window only
  implemented for UNIX. We could supply our own copies for Win/Mac and
  other platforms, if anyone really cares.

Change-Id: I2701e077ff2b6dff5ae3c5127c24b0937b893c89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334049
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-11-11 16:24:25 +00:00
Brian Salomon
bd3792de72 Add SkYUVAInfo-based promise texture image factory
Bug: skia:10632
Change-Id: I6a31f2d712f704850ba5246208dc8a4a6e6916eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333519
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-11 14:38:55 +00:00
Florin Malita
7006e15df5 [svg] Allow clients to pass a custom SkFontMgr
Introduce a Builder helper and plumb the client-provided SkFontMgr for
font resolution.

Also clean up some of the legacy SkSVGDom factories.

Bug: skia:10840
Change-Id: I6e1eabe7c257cb75dfdb5bf67054f93f25769027
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333577
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-11-11 01:51:44 +00:00
Robert Phillips
0c0884991d Update DDL testing harness to support drawing DDL w/ integer offsets
This isn't hooked up anywhere but breaks up the omnibus CL.

Change-Id: I15c200e57450e7cc8ee95a3f7969926d0eb8487f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333129
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-10 14:34:46 +00:00
Brian Salomon
f143274cda Simplify promise image callbacks.
Remove done and release distinction. Chrome is not using either as
it tracks texture access using other synchronization mechanisms
(semaphores, flush finish procs). Now there is just fulfill and release
where release is called when the texture can be deleted. Also,
release proc can be null.

Simplify texture idle mechanism as the "flushed" state was only used to
implement the old idea of a release proc. The "finished" idle state is
still used to implement the new release proc. Though, it could also be
removed if GrTexture were to be removed for textures returned by fulfill.

Not directly tied to this bug, but a new YUVA factory will be required
and it's good to clean things up first to avoid adding another
instance of the current complexity.

Bug: skia:10632

Change-Id: I4fe3c0af3f5a591506b1b3c736fd3284a38465a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331836
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-10 02:47:56 +00:00
Kevin Lubick
823b1537f7 [canvaskit] Add config key and manual mode to unit test harness.
Change-Id: Ic72f31ba7833c23f7baf4872d05671a7c3808e34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-11-09 21:12:39 +00:00
Kevin Lubick
2f30936d46 [canvaskit] Disable GrTextBlobMoveAround
Failing with RuntimeError: function signature mismatch

Bug: skia:10869
Change-Id: Ifd2f78362e2fd30b1c53be56a811551974e3cac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333119
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-09 15:05:52 +00:00
Brian Salomon
88d7e625f9 Make ManagedBackendTexture fail on invalid GrBackendTexture
Makes it more sensible.

A bunch of call sites we're already written to expect this. Update
some others.

Change-Id: I77c28045ebf01e6aa9d92d2ebc37287604ec10c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332544
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-05 20:21:14 +00:00
Brian Salomon
694ff17357 Revert "Revert changes to unbreak bots."
This reverts commit 49721c8437.

Reason for revert: fixed double usage of plane release context in
 YUVUtils.

Original change's description:
> Revert changes to unbreak bots.
>
> f01a9d9020
> is the culprit
>
>
> Revert "GrRefCntedCallback has Make function."
>
> This reverts commit b2c42140ea.
>
> Revert "Add SkImage::MakeFromYUVATexturesCopyToExternal"
>
> This reverts commit f01a9d9020.
>
> Bug: skia:10632
> Change-Id: Ief076f168b63ff8ca15b607163a13d5f52a733d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331798
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I41cdfe0d5b8587f85fae0c804c059c0d6ff92800


Bug: skia:10632
Change-Id: I41cdfe0d5b8587f85fae0c804c059c0d6ff92800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331876
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-05 14:35:23 +00:00