Issue 8877 in skia: questionable cast in AAA

0 views
Skip to first unread message

mtkl… via monorail

unread,
Mar 18, 2019, 11:14:16 AM3/18/19
to bu...@skia.org
Status: Accepted
Owner: mtkl...@google.com
CC: brian...@google.com, liyu...@google.com
Priority: Medium
Type: Defect

New issue 8877 by mtkl...@google.com: questionable cast in AAA
https://bugs.chromium.org/p/skia/issues/detail?id=8877

> > > We're getting here with a very large b (0x80000), such that the triangle area is larger than 1. Okay to just squelch?
> >
> > Sounds like maybe we caught a bug. I think this partialTriangleToAlpha() should only be used to calculate the area of a subpixel triangle, where the whole pixel's area is 1. Shouldn't even be possible to get area=1 here, much less area >= 1, I think.
>
> Well, it's easy to repro with Ghostscript_Tiger.svg.

See https://skia-review.googlesource.com/c/skia/+/201646

I figure asserts / ubsan ought to also catch this?

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

liyuq… via monorail

unread,
Mar 18, 2019, 2:32:38 PM3/18/19
to bu...@skia.org

Comment #1 on issue 8877 by liyu...@google.com: questionable cast in AAA
https://bugs.chromium.org/p/skia/issues/detail?id=8877#c1

Both a and b should be within [0, 1] (i.e., a, b <= (1 << 16) = 0x10000) in order for partialTriangleToAlpha to work properly. It seems to be a bug to have b = 0x80000. Would `./out/Debug/viewer --svgs Ghostscript_Tiger.svg -m Ghostscript_Tiger` reproduce it?

mtkl… via monorail

unread,
Mar 18, 2019, 2:40:41 PM3/18/19
to bu...@skia.org

Comment #2 on issue 8877 by mtkl...@google.com: questionable cast in AAA
https://bugs.chromium.org/p/skia/issues/detail?id=8877#c2

Yeah, that's what I thought, but it's definitely coming up 8<<16.

If I add an SkTo<SkAlpha>() there, I have to fiddle with the zoom a little to get it to repro in viewer. On the other hand, DM is pretty easy:

ninja -C out dm && out/dm --src svg --svgs svgs/Ghostscript_Tiger.svg -m Ghostscript_Tiger --config gl

To repo make sure you sync up, or at least make sure you're checked out to a CL where CCPR is disabled.

--config 8888 seems ok oddly. Might be a clue.

liyuq… via monorail

unread,
Mar 18, 2019, 2:55:21 PM3/18/19
to bu...@skia.org

Comment #3 on issue 8877 by liyu...@google.com: questionable cast in AAA
https://bugs.chromium.org/p/skia/issues/detail?id=8877#c3

I see. Thanks for the repro instruction. That will be very helpful. I'll try to reproduce and debug it as soon as I have time.

FYI, I'm not sure if https://bugs.chromium.org/p/chromium/issues/detail?id=924630 is related or not. I haven't got a chance to debug it yet.

I'm still fixing a Google internal P0 bug at the moment... Hopefully will get it done by this week.

mtkl… via monorail

unread,
Mar 18, 2019, 3:11:06 PM3/18/19
to bu...@skia.org

Comment #4 on issue 8877 by mtkl...@google.com: questionable cast in AAA
https://bugs.chromium.org/p/skia/issues/detail?id=8877#c4

ok, do you want me to assign this to you then?

mtkl… via monorail

unread,
Mar 18, 2019, 3:31:15 PM3/18/19
to bu...@skia.org
Updates:
Cc: -liy...@google.com mtkl...@google.com
Owner: liyu...@google.com

Comment #5 on issue 8877 by mtkl...@google.com: questionable cast in AAA
https://bugs.chromium.org/p/skia/issues/detail?id=8877#c5

(No comment was entered for this change.)

brian… via monorail

unread,
Jul 20, 2023, 1:46:43 PM7/20/23
to bu...@skia.org
Reply all
Reply to author
Forward
0 new messages