Skip to content

Simplify GraphicsInternal optimization. #13604

Description

@JeremyKuhne

This code was introduced to improve rendering performance to avoid figuring out what modifications were applied to the GDI+ GpGraphics. Now that we control System.Drawing we can add an internal optimization that tracks whether or not relevant state has been changed on the object.

This will allow greatly simplifying the code (we can remove all of the existing GraphicsInternal stuff) and improving performance across the board. We can access whatever flag we track on Graphics through IGraphicsContextInfo or IGraphics.

internal Graphics GraphicsInternal => _event.GetOrCreateGraphicsInternal(SaveStateIfNeeded);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions