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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>