~eliasnaur/gio-patches

gio: gpu: avoid bounds checks in decode v1 PROPOSED

~egonelbre: 1
 gpu: avoid bounds checks in decode

 1 files changed, 2 insertions(+), 0 deletions(-)
#793498 apple.yml success
#793499 freebsd.yml success
#793500 linux.yml success
#793501 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/33519/mbox | git am -3
Learn more about email & git

[PATCH gio] gpu: avoid bounds checks in decode Export this patch

From: Egon Elbre <egonelbre@gmail.com>

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
---
 gpu/gpu.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gpu/gpu.go b/gpu/gpu.go
index 0977415b..cb566edb 100644
--- a/gpu/gpu.go
+++ b/gpu/gpu.go
@@ -186,6 +186,7 @@ func decodeImageOp(data []byte, refs []interface{}) imageOpData {
}

func decodeColorOp(data []byte) color.NRGBA {
	data = data[:ops.TypeColorLen]
	return color.NRGBA{
		R: data[1],
		G: data[2],
@@ -195,6 +196,7 @@ func decodeColorOp(data []byte) color.NRGBA {
}

func decodeLinearGradientOp(data []byte) linearGradientOpData {
	data = data[:ops.TypeLinearGradientLen]
	bo := binary.LittleEndian
	return linearGradientOpData{
		stop1: f32.Point{
-- 
2.34.2
gio/patches: SUCCESS in 21m5s

[gpu: avoid bounds checks in decode][0] from [~egonelbre][1]

[0]: https://lists.sr.ht/~eliasnaur/gio-patches/patches/33519
[1]: mailto:egonelbre@gmail.com

✓ #793500 SUCCESS gio/patches/linux.yml   https://builds.sr.ht/~eliasnaur/job/793500
✓ #793501 SUCCESS gio/patches/openbsd.yml https://builds.sr.ht/~eliasnaur/job/793501
✓ #793499 SUCCESS gio/patches/freebsd.yml https://builds.sr.ht/~eliasnaur/job/793499
✓ #793498 SUCCESS gio/patches/apple.yml   https://builds.sr.ht/~eliasnaur/job/793498
Thanks, merged.

Elias