proposed and upcoming APIs and how they may be able to be used with
CanvasKit.
Change-Id: I085e65e7e3c58ef2cbe2ce60ddd813b2c531c890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296752
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Convert many formatted strings to plain old strings.
Favor readability of generator over generated code since
we typically pretty print the generated code if we need
to read it.
Change-Id: I0185cd1133f09d07e8ebd8c959e0397818727611
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297057
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Because GrOvalEffect is used in GrRRectEffect, this will be useful in
followup CLs that port over GrRRectEffect to MakeResult.
Change-Id: Id1d9344af7666d79c62766adfeb920e4ac124a4e
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296596
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
GrQuadEffect and GrConicEffect were the only FPs that supported the
HairlineAA clip-edge type. These FPs have been updated to implicitly
always use HairlineAA, and other FPs no longer need to consider the
HairlineAA case.
This CL also updates the bezier-effects GM images to remove the non-
hairline test columns.
Change-Id: Ice942106344cf48480e972da4aab1c6055f9911e
Bug: skia:10393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297019
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
When the fuzzer is used, some of the positions are so far out in the
float space, that all values become the same making empty rects.
Using joinNonEmptyArg really had no advantages.
Bug: chromium:1095625
Change-Id: I46a61e422ff7053aca2f34494a2f5f0ec7e8fc74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297026
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
For instanced data this value controls how many instances to draw before
going to the next set of instance data in the buffer. For all of Skia's
uses this is 1.
Change-Id: I280ef3fbe431f5d9233657a5e5783c03b3b1cf6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297025
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This should fix the flaky GM results that appeared when caching was
fixed/enabled recently.
Bug: skia:10395
Change-Id: Idd35f6a57e94504d56186be3601b52728ada97e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297018
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I36c748f7e91c0b9695623e60bd87b98605800159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297017
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Renamed all codepoints into utf16Index
Change-Id: Ie915395a56ac825637f6dbb25824cd1635a5b0a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296438
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Plus some minor cleanup and asserts.
Bug: oss-fuzz:23395
Change-Id: I667bee2d7f21864defe2fd97df9eb4e99d69d9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296451
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This reverts commit 6fb3687413.
Reason for revert: breaking a bunch of linux builds
Change-Id: I71dd154785fb00dd20bc157d5d5daf1ee2101fc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296996
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Change-Id: I5c1e6d8fd52ecfe628a78569b4665a64e1499fa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296938
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:10139
Change-Id: I07b95233c7a7892be8b70e7b640c71ce438545f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296803
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This tests the case where the stroke has butt caps and its width
significantly larger than the path itself. There seems to be some
uncertainty over what should actually be drawn in some of these cases,
as evidenced by the variable results from different path renderers
here.
Change-Id: I5b62ec446bfbba73d09ddb4eac710e338bedfc6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296114
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I1c9cd865c3fd37b5d4c911790713d9ca2283aeee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296724
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Previously, all backends allowed the SkSL to be edited, and GL allowed
GLSL to be edited. Now any backend's source can be seen, and they can
all be edited (other than SPIR-V). Tested with HLSL and SPIRV. I don't
have a Mac available, but MSL should work, too.
Change-Id: Ia2a11bb5922dd49a5f25840e48384e0246a28b69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
We were always tagging the stored shaders as SkSL, so they (naturally)
didn't compile when we loaded them.
Change-Id: I96062808751b6233c9e90b29150f66270d0dd198
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296836
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
A follow up CL will use the availability of this information - the full
list of targets of a GrRenderTask – to enable faster storage of the
lastRenderTask association for a given surface proxy in a given drawing
manager.
Bug: skia:10320
Change-Id: I3eb3276b483a7f09481774896a024172b73a4c84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296729
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Change-Id: Id6df54efa6d71d35b682e6910d08371fc8065c88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296799
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Some clients already have SkTypeface objects, and forcing them to pass
these as SkData is awkward - especially since Skottie immediately turns
them into SkTypeface again.
Replace the existing loadFont() callback with loadTypeface().
(for compatibility, we try both for now, but the plan is to phase-out
loadFont)
Change-Id: Ib4c2446a96cb6a5f95581c405d0a1b4ecff7ddb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296718
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
In order to emulate OOP-R's behavior, GM needs to pass GPU-backed resources to a DDL recorder.
This change allows GMs to create GPU resources first (in onGpuSetup w/ a direct context) and then use them in onDraw (with only a GrRecordingContext).
Change-Id: Ifa3002af73eb9926f653fb4c4bf4542c0749d658
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Currently supports SkSL & HLSL. We should see if we can safely serialize
the shader blobs returned by D3DCompile.
We can't (yet) view the HLSL in Viewer - the shader viewer/editor needs
an overhaul to support backend-specific source formats (MSL, HLSL,
disassembled SPIRV). Going to look into that in a separate CL.
Change-Id: Ife1fd1d3d724674b24793df2d86c52a9b8f7de23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296734
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I42db2a887316e9e6487513c56afc730f98111a6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296735
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Don't sort thresholds and allow full 0..1 range
Change-Id: I228be036bb259bea53ac9885e758c9e46ced1d62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: I8e6309b5ae794b0291ecc45267f67328a0f52829
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296716
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This arrangement allows the backend texture to outlive the YCbCr SkImage.
Change-Id: I34939d05bf1091c8efcacb687dc1900729d4cbe5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296478
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Make sure we take into account the origin when setting this rect.
Change-Id: I9cd35a25cb1489984597946bbeb7563a347c7c86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296518
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We already have a stencil buffer class, so this adds the code to bind the
stencil and clear it.
Change-Id: I9af90d999881954cfb26ceb6a31a5ab2cf9bbe3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I813a4e4a5b4b0dc4f8ea59056d125386e6049ab4
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296516
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:10139
Change-Id: I526f8ca77de0ed6ab1fe16b22201043ebf5c3716
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296477
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>