setColor very slow when there is a transparency color

Skip to first unread message

l1 shu

May 16, 2021, 7:23:47 AMMay 16
to skia-discuss

When I setColor a color with transparency, the rendering becomes very slow

SkColor c = 2147548928; // rgba(0, 255, 0, 0.5), very slow, about 400ms

SkColor c = 4278255360; // rgba(0, 255, 0, 1), slow, about 20ms

SkColor color = SkColorSetARGB(SkColorGetA(c), SkColorGetR(c), SkColorGetG(c), SkColorGetB(c));


This is how I create surface, it is based on cpu

SkImageInfo imageInfo = SkImageInfo::Make(
auto surface =  SkSurface::MakeRaster(imageInfo);

It’s worth mentioning that I don’t have this problem in an older version of skia

Reply all
Reply to author
0 new messages