DescriptionWhen the gpu rendering path uses GrInOrderDrawBuffer to buffer path drawing GrInOrderDrawBuffer adds refs to the textures stored in GrDrawState. When the paths are played back an AA clip mask may be generated and inserted into the current draw state. Then, when GrInOrderDrawBuffer clears the state and unrefs the textures, this leads to a premature freeing of the AA clip mask. This patch addresses this issue by adding a flag to the GrDrawState that lets it know when it should ref/unref textures in setTexture.
I also explored having GrDrawState always ref its textures but this was far more intrusive and changed the lifetime of several objects. A longer term fix might be to refactor GrInOrderDrawBuffer so it provides a better wrapping of the drawing process.
Patch Set 1 #
MessagesTotal messages: 3
|