Losing Antialiasing with Large Raster Canvas

92 views
Skip to first unread message

Corey Lucier

unread,
Jan 24, 2018, 10:32:22 AM1/24/18
to skia-discuss
We are using raster Skia to render a large array of vector shapes to an image and encode to PNG.

When the size of the image/canvas exceeds say 8K or so on a dimension, we lose antialiasing but just for the rendered content beyond the 8K size.

Before I file something any idea if this is a known issue or if there is a workaround? We're using M62 FWIW.

The content above is rendered at around y = 9000 - no antialiasing:
The content below is rendered at y = 7000 - aa is just fine:





Corey Lucier

unread,
Jan 24, 2018, 11:19:06 AM1/24/18
to skia-discuss
FWIW It seems to be everything outside (>=) 8192.

Mike Reed

unread,
Jan 24, 2018, 11:21:48 AM1/24/18
to skia-d...@googlegroups.com
We have 2 limits today around raster and dimensions:

1. maximum raster size is 32K
2. maximum antialias raster size is 8K

Both of these stem (mostly) from our using 16.16 in our edge structs.

I think we can extend these in a couple of ways:

1. Use 32.32 or some other 64bit fixed-point for our structs (makes them twice as big in ram)
2. Internally we can tile (probably on 8K or smaller boundaries)

Either of these would (I think) fix both of the limitations.

For now, I think you'll have to tile yourself (sorry).


--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

sha...@infograph.com

unread,
Jan 24, 2018, 1:30:34 PM1/24/18
to skia-discuss
When you say max raster size, do you mean for rasters to be drawn?  Or raster size of surface and canvas to be drawn to?  Or both?

I know that there is a 32k limit to surface size.



On Wednesday, January 24, 2018 at 9:21:48 AM UTC-7, Mike Reed wrote:
We have 2 limits today around raster and dimensions:

1. maximum raster size is 32K
2. maximum antialias raster size is 8K

Both of these stem (mostly) from our using 16.16 in our edge structs.

I think we can extend these in a couple of ways:

1. Use 32.32 or some other 64bit fixed-point for our structs (makes them twice as big in ram)
2. Internally we can tile (probably on 8K or smaller boundaries)

Either of these would (I think) fix both of the limitations.

For now, I think you'll have to tile yourself (sorry).

On Wed, Jan 24, 2018 at 10:32 AM, Corey Lucier <corey....@gmail.com> wrote:
We are using raster Skia to render a large array of vector shapes to an image and encode to PNG.

When the size of the image/canvas exceeds say 8K or so on a dimension, we lose antialiasing but just for the rendered content beyond the 8K size.

Before I file something any idea if this is a known issue or if there is a workaround? We're using M62 FWIW.

The content above is rendered at around y = 9000 - no antialiasing:
The content below is rendered at y = 7000 - aa is just fine:





--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.

Mike Reed

unread,
Jan 24, 2018, 1:37:07 PM1/24/18
to skia-d...@googlegroups.com
surface size

To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.

Corey Lucier

unread,
Jan 25, 2018, 10:39:44 AM1/25/18
to skia-discuss
Definite astonishing Mike. Especially given this new high-dpi and megapixel world we are living in. ;)

Is there an issue already filed tracking this? Kinda feel it should be addressed by the core (long term).

Thanks.

Mike Reed

unread,
Jan 25, 2018, 12:14:48 PM1/25/18
to skia-d...@googlegroups.com
It will be addressed by the core, just not today, hence the need for a work-around.

--
Reply all
Reply to author
Forward
0 new messages