◐ Shell
clean mode source ↗

Make color, fill, stroke et al. thread-safe: #3077 by GKFX · Pull Request #4784 · processing/processing

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Open

GKFX

wants to merge 1 commit into

Conversation

@GKFX

#4774 improved. color should be entirely thread-safe; it should now also be impossible for fill and stroke (or background or whatever) to pass values between each other; i.e. fill(#009700) and stroke(#000056) running at once shouldn't lead to a fill color of 0xff000056, which was previously possible. In theory I think that running two fill() commands with different values at once might lead to the fillR etc. values being made from a mixture of the two colors, but I haven't been able to demonstrate this and I don't want to add any performance hit by making all fill methods synchronize on fillArray since using fill() in two threads is a highly unlikely situation.
Fixes #3077.

calcEtc color variables deleted; colorCalc now fills a float[4] array
and returns int.

1 participant

@GKFX