Vincent Liu: > Recently I was working on 2d Canvas operating from Worker thread. I got an > assertion when I operated the below method for Canvas in worker thread. It > is caused by thread competing in nsCSSParser object for operating > ParseColorString(). > > ctxworker.fillStyle = '#8ED6FF'; > > Unfortunately, I can't find any information from w3c spec to mention about > how to operate CSS font parsing or any CSS operations from worker thread. > Does anyone know about this? Any hint would be appreciate. Thanks.
Yeah, nsCSSParser can’t be used from other threads, although it might not be too much work to make it threadsafe for the things that 2D canvas contexts need it for. In fact that might be less work than duplicating <color> and <‘font’> parsing. -- Cameron McCormack ≝ http://mcc.id.au/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform