CPU surfaces antialiasing size limit

53 views
Skip to first unread message

Joe

unread,
May 25, 2023, 4:16:26 PM5/25/23
to skia-discuss
Hello!

I just discovered that antialiasing gets disabled on CPU surfaces with size > ~8000px and found the confirmation on this old thread.

More precisely, the content inside the limit is still antialiased, but what's outside the limit is not antialiased.

So I wanted to ask: As of today, is the only workaround still manually tiling the the surface? or is there some new API that allows to bypass the limit?

Thank you

Brian Osman

unread,
May 25, 2023, 4:24:02 PM5/25/23
to skia-d...@googlegroups.com
Yes, manually tiling is still the only workaround.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/d8390d12-33d0-41eb-871b-7d5b5f422806n%40googlegroups.com.

Joe

unread,
May 25, 2023, 4:56:24 PM5/25/23
to skia-discuss
Got it, thanks Brian.

Mike Reed

unread,
May 25, 2023, 5:30:51 PM5/25/23
to skia-d...@googlegroups.com
Interesting. I just created a raster surface 11,000 wide, and drew antialiased circles at both ends -- and they both came out antialiased. What is your test case that shows this not working?



--
"I think I can safely say that nobody understands quantum mechanics." -- Richard Feynman
"It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so." -- Mark Twain
"I am pleased to see that we have differences" -- Surak

Mike Reed

unread,
May 25, 2023, 5:32:24 PM5/25/23
to skia-d...@googlegroups.com
huge.png

bungeman

unread,
May 25, 2023, 11:29:55 PM5/25/23
to skia-discuss
Yes, I was fairly sure this was fixed shortly after that conversation with https://skia-review.googlesource.com/c/skia/+/112723 (and follow ups).

craste...@gmail.com

unread,
May 26, 2023, 12:17:33 AM5/26/23
to skia-discuss
SkDraw?
I had not heard of this beast before. He looks like an SkCanvas?
What is he about?

Joe

unread,
May 26, 2023, 2:58:10 AM5/26/23
to skia-discuss
hey there, after playing with this, I think I have narrowed down the issue.

I created a surface large 2000 x 10000, and the antialiasing seems to get disabled after y > ~8000 when drawing using clipPath (clipPath + drawPaint).
When drawing using drawPath, the issue seems to disappear.


antialias-issue.png

Mike Reed

unread,
May 26, 2023, 8:53:26 AM5/26/23
to skia-d...@googlegroups.com
Good catch! I never thought about AA clips and the size limit.

On May 26, 2023, at 2:58 AM, Joe <giuseppe...@gmail.com> wrote:

hey there, after playing with this, I think I have narrowed down the issue.

I created a surface large 2000 x 10000, and the antialiasing seems to get disabled after y > ~8000 when drawing using clipPath (clipPath + drawPaint).
When drawing using drawPath, the issue seems to disappear.


Brian Osman

unread,
May 26, 2023, 9:05:39 AM5/26/23
to skia-d...@googlegroups.com
Ah, yes. Sorry - I remembered seeing the comment in the code recently about AA turned off after 8k, but I forgot that it was in the clipping (not drawing) code.

Reply all
Reply to author
Forward
0 new messages