This reverts commit c56e2e5aa6.
Reason for revert: suspected of breaking chrome roll
Original change's description:
> Add new virts, hide old ones
>
> Add virtuals for the draw methods that now take sampling/filtermode.
>
> drawImage
> drawImageRect
> drawImageLattice
> drawAtlas
>
> Add a flag that can remove the older virtuals, once each client has
> stopped overriding them. In that situation, the older public methods
> will simplify extract the sampling from the paint, and call the new
> public methods.
>
> Bug: skia:11105, skia:7650
> Change-Id: I8b0029727295caa983e8148fc743a55cfbecd043
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347022
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I0a90952c11a180d918126ea06a630f4a0bf9b49b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11105
Bug: skia:7650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348194
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Add virtuals for the draw methods that now take sampling/filtermode.
drawImage
drawImageRect
drawImageLattice
drawAtlas
Add a flag that can remove the older virtuals, once each client has
stopped overriding them. In that situation, the older public methods
will simplify extract the sampling from the paint, and call the new
public methods.
Bug: skia:11105, skia:7650
Change-Id: I8b0029727295caa983e8148fc743a55cfbecd043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347022
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change readPixels contract to allow unknown->unknown AT reads, but
fail if one side is unknown and the other isn't (and update GPU read
pixels test accordingly).
Also, ProxyUtils::MakeTextureProxyViewFromData takes GrPixmap.
Bug: skia:8862
Change-Id: I771c154833408e666f860413c1a711714696326d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347196
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change SkTypeface::onCreateScalerContext to return std::unique_ptr
instead of a bare pointer. The public SkTypeface::createScalerContext
implementation already returns std::unique_ptr, so this is an internal
change only.
Move SkTypeface::createScalerContext implementation from
SkScalerContext.cpp to SkTypeface.cpp for consistency.
Also change the return type of SkScalerContext::MakeEmptyContext to
std::unique_ptr and rename to SkScalerContext::MakeEmpty.
Change-Id: I965308e8f9c78b887811e428f0de873dc6196479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346658
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
SkPaintPriv methods are just an internal stopgap
Change-Id: Ibe6e37c5871068d8cd67dc0948961444dfd2b62a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347041
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
uint (and bitwise operations) aren't supported by our minimum spec, and
they're going to be removed from public SkSL. For now, convert the
random generator to a good-enough chaotic sequence of high-frequency
sine waves.
If/when the interpreter (and particles) are converted to the newer skvm
backend, it will be straightforward to support custom intrinsics that
emit skvm instructions directly into the builder, and re-introduce a
better integer-based PRNG, without requiring SkSL language support.
Bug: skia:11093
Change-Id: I885b15a51a9e5c12b4274b5938d8deb77219d41b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347036
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Made it private and accessible internally via SkCanvasPriv.
Update SkGpuDevice methods/variables after rename of GrDrawSurfaceContext.
Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3,Canary-Flutter,Canary-Android
Change-Id: I3da64cee1de03c201243ee6c7ccd4b4c44cad8c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346498
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
... and lots and lots of IWYU
Change-Id: Ie5157dcdd2e6d29b95c71b39153278ab48ef4eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346778
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
I found myself updating these for another change and realized they
are very limited tests that are redundant with more thorough tests.
Change-Id: I935da4d1da7ff3825a4042556845a8eb659b6ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346856
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
No longer used by any example content, and it requires unsigned integers
and bitwise ops (which are both going to be hidden from public SkSL).
Bug: skia:11093
Change-Id: I1941f7a1bed6c8512a5117ef256d18e420cbabee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346779
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 6ea387e7c7.
Reason for revert: valgrind failing
Original change's description:
> Enable GrTessellationPathRenderer by default
>
> Moves GrTessellationPathRenderer to the end of the chain and enables
> it by default.
>
> Also updates nvpr to not draw volatile paths. The tessellator is much
> faster at these.
>
> Bug: skia:10419
> Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: I3718ae210ebc403959d187160214cf0df895e4f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345718
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
None of these earliest testing tools are useful anymore
now that we can do useful work with SkVM and SkVMBlitter.
Change-Id: I8b25ef6ddd101c4ff8617c6742343dedb4764922
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345456
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Moves GrTessellationPathRenderer to the end of the chain and enables
it by default.
Also updates nvpr to not draw volatile paths. The tessellator is much
faster at these.
Bug: skia:10419
Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
- that removes the need for onDrawImageNine
- ... that removes a whole lot of plumbing
Bug: skia:11099
Change-Id: I35e2f70320be118aec38a5c783a53c7aa90b3131
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Previous approach using magick's -orient tool didn't actually change the
stored JPEG's orientation (they were all tagged Undefined and the data
was top-left).
Regenerate the images using new method where the PNGs are generated with
transformations that the EXIF tag will undo. The script converts to JPEG
using magick and then modifies the TAG using exiftool.
Change-Id: Ic2276711c0f4faa26620c93b24f4f0e58d658ae3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345127
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Also remove the supporting SkScalerContext::generateGlyphCount. It was
once a possibility that different strikes could have a different number
of glyphs available. This generally does not happen, but if it did this
would now be handled at the typeface level.
Change-Id: I8db7f2726c565447c211a79fe3cdfec619a99a81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345129
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: Id154c3d0b51987d5154e9bcf000e3d4d539a7cdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344916
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 reverts commit fcd68167a2.
Reason for revert: going to do this a different way
Original change's description:
> Fix crash on windows viewer when starting in vulkan.
>
> setRequestedDisplayParams is called when setting up viewer before we've
> inited the Window. On windows this tries to attach the Window for a given
> backend. However, we haven't set fBackend yet. Later on we will directly
> call attach.
>
> Change-Id: I4bd6586478f2b040e5913314c4e47e92fc893a60
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344756
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,brianosman@google.com
Change-Id: Ie4d33b557868e4906df9b7a3988072fdc79a19c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344897
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
setRequestedDisplayParams is called when setting up viewer before we've
inited the Window. On windows this tries to attach the Window for a given
backend. However, we haven't set fBackend yet. Later on we will directly
call attach.
Change-Id: I4bd6586478f2b040e5913314c4e47e92fc893a60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344756
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is a reland of ad8b9fa2d7
Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com
Bug: skia:10419
Change-Id: I0bdf34da134a3a34a5c78b35cc0eb86d6e989bb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344796
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit ad8b9fa2d7.
Reason for revert: Benchmark failure
Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: Ia74dbcec582168870bd3ccc5e52b8dce0fb2bdfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344698
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
The GLSL backdoor for tessellation shaders is only experimental at
this point. In order to enable the tessellation path renderer, we need
to turn off HW tessellation and let it use the indirect draw modes.
Bug: skia:10419
Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
When replaying DDLs w/ offsets it is no longer true that the
dimensions of the recording characterization must match those of
the playback characterization.
Change-Id: I3dba1a91af3d58aaf3619274303f8d2b10a76e24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Before compiling, write the shader text to 'sksl.bak', then remove it if
we succeed. This avoids loss-of-work if you manage to uncover an assert.
Change-Id: Idec7740210ce56cc9522c31e79f6aae1d4c3da1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343425
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: I9fe7e637028ca5345f4ef19e4aedd035ba71070c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343430
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This problem is being fixed on the record side as well, but meanwhile
it need not stop the rest of the debugger from functioning
b:skia:9765
Change-Id: I3b466ff4ea0b04b39c5b79fbc1cd84acfef3e7e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343442
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
No reason to limit the user's painting to the upper left corner.
Change-Id: Ia71f57cda7a26ea9be874eca753e0929cfc10873
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343426
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
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>