Bug: skia:13040
Bug: skia:9235
Bug: skia:10412
Bug: skia:12437
Change-Id: Ia96f8332b5372ecf65cb20ffb9549bc0dc8f931b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537080
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This removes one branch, one normalize, one max, and switches to
dividing by the magnitude once, instead of doing it twice; invMag may
not be exact but it's accuracy should be similar to doing the divide
directly.
I changed the magnitude scaling to happen after subtracting the two
points, since this was a better balance between dealing with points
that had really large coordinates, and points that differed by epsilon
(where upon dividing the original coordinate value would lose that
precision, but doing it after the subtraction preserved the
direction).
At the very least, this does not cause the accuracy failures for large
coordinates that I was seeing before robust_normalize_diff was first
added, and it avoids issues with epsilon sized stroke rectangles that I
ran into when evaluating other optimization variants of this function.
Bug: skia:13275
Change-Id: I07862b80b67ef905fce2aeeeabed3e907a63796a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535438
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ib81dc1f0c77a8300b20105612b7310d69027ea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537077
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Ia1d43e4814eb23fc111df0c1800425272337936c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536639
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:13263
Change-Id: I045f7c3b5d0ea27fd231309ac4af275257bebf33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534202
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: If5f14828029473afef25c5ef69db3971796cdfc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537076
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
There are two SKP versions we deal with here:
* The min and current supported versions in src/core/SkPicturePriv.h.
* The SKP asset version that is incremented weekly in infra/bots/assets/skp/VERSION.
We will need to update the asset version used by the bot when the min version in src/core/SkPicturePriv.h is updated.
Instructions on how to do that have been documented in src/core/SkPicturePriv.h.
As noted in https://bugs.chromium.org/p/skia/issues/detail?id=13278#c2 DM currently does not fail when it fails to parse an SKP. Till DM is updated to fail, developers will have to look for blank images in Gold via this new bot to determine when we are failing to support the oldest SKP version.
Bug: skia:13278
Change-Id: I8fff62cc289c3bd6abf5179bcee349baf0a8188a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536106
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
We now pass the child output variable names into the snippet code after
all the uniforms.
This leaves the following 3 custom glue code generators:
GenerateImageShaderGlueCode -- sampler
GenerateFixedFunctionBlenderGlueCode -- prior stage's output
GenerateShaderBasedBlenderGlueCode -- dst read & prior stage's output
Bug: skia:12701
Change-Id: I9185d8f292cc45d351218b95fa6d7d70d639e2f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536098
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
I need to add a presubmit that verifies our BUILD.bazel files
(i.e. the new ones) have the appropriate header.
Change-Id: I368d8e773aa59ff17b6d81812c67cb849c0a08fc
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536881
Reviewed-by: Ravi Mistry <rmistry@google.com>
Added Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn
to exercise the Dawn Vulkan backend.
Change-Id: I3679822a1460eda36654f99c70ba9510e394b40c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536736
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
In this CL, GrResourceProvider's functions, like createTexture etc,
get label string passed to it which are called from GrGpu which then
passes the label to setLabel method of GrGpuResource.
Bug: chromium:1164111
Change-Id: Icfd88279c0729e36c105c62c05f382aab0a89310
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534778
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: chromium:1319451
Change-Id: Ibd0187c4d80fa64f2d9eb3aa61da04857ecb9db9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536836
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change the way we transform the matrix on render for specific decorations
Change-Id: I3112c38a95cd1473e9e9c5bfff9eac09e20f6016
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536101
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Bug: skia:13263
Change-Id: I050bba644886fb714bde2d3a800e99eddf30f5fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534201
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This also fixes a bug that the tests revealed -- it wasn't resetting the
reused-buffer offset after transferToCommandBuffer.
Change-Id: I75850ab1cb1e63dc88f95783248f70816611cefc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536103
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is accomplished by adding a preamble to each snippet scope that
computes the correct, accumulated, local matrix for the scope.
Bug: skia:12701
Change-Id: Id93bb3fadd72f58c486a1f208cec150d544f8493
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535577
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This was originally present to control filter mode, and was never
removed when filtering decisions were placed on the SkShader.
Change-Id: I2b91f02f994c508fd986cd1b3e28fa97f15d8469
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536496
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Chromium will only apply this workaround to gpu command buffer clients.
So this is no longer needed in skia.
Bug: chromium:1319451
Change-Id: I6b45524420de36a6cd821136c7da8f4405294d9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535816
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13272
Change-Id: I6ba8d43a723fddf1ecbc06c6f7d1d8295428d342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536436
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
In OT-SVG `var` support is required for palette use. Even without
palette support this is needed to get the fallback color.
Change-Id: Iea8c4502b57933115f5cbf44fcc183fef19da984
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534140
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
In https://skia-review.googlesource.com/c/skia/+/527505 we removed the
'invert' call from 'SetDeviceCoordinateSystem', removing the only place
where the function might return 'false'. This patch changes the return
value from bool to void, as it is obsolete.
Change-Id: I0262f82d2cf339879ea716bdb5f16ca26d453cb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536097
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Graphite requires graphite images to be graphite-backed.
localmatrixshader_nested, in particular, is useful for ensuring
local matrices are handled correctly.
Bug: skia:12701
Change-Id: Idda51eff6db2bfff68d6b6ca54fc292987b5860c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536037
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The SubRunOwner parameter was used exclusively for the
*NoCache SubRun system. This system has been removed from
the code.
Change-Id: Ic3b4a1e4f49dcbd9b297e5011d2e96dd163a9acb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536437
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I4799eb0f6d1c00c220509eadfa16fcb6fabdeebc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536105
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
It is also a requirement that the local matrix be the first uniform.
This will let us more generally handle nested local matrices (in a
follow up CL).
Bug: skia:12701
Change-Id: If093363c4820228f139f383b4e2f94dbc473017a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The compiler can complain about these signed to unsigned conversions.
Explicitly cast them in initWithPreallocatedStorage to match the way
this is already done in init [0].
[0] 311b648013 "pack SkTArray"
Change-Id: I0f723094fd356f9c5971b35998c4ecd59c09332f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536099
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia:13286
Change-Id: Icf09efe04add2418832d6e348190b31fefc79c61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536136
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This CL:
Adds a name to each snippet
Labels the output_%d variables w/ the snippet they are the result of
Labels each set of uniforms w/ the snippet they feed into
Bug: skia:12701
Change-Id: Ib28fe265aaa63affe98386ead83ccdf4fb61c7e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535962
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>