In BaseRenderingContext2D.h, the Draw() function creates the PaintFlags object by calling GetState().GetFlags(). If we change the order of first two tests appearing in third_party/WebKit/LayoutTests/fast/canvas/set-colors.html, the PaintFlags object used for FillStyle test in fillRect has the dithering flag set to true. Apparently, this has been leaked from the PaintFlags object used to draw the gradient.
I'm not sure if this is expected (for example, because we are drawing the solid color over the gradient, we keep the dithering true) or this is an unexpected leak. This needs more investigation.
Comment 1 by zakerinasab@chromium.org
, Dec 1 2017