Avoid redundant initialization of GraphicsContextState.
When creating a new GraphicsContextState the constructor initializes the state with various default values. In GraphicsContext::realizePaintState we immediately overwrite these values after creation. This patch adds a copy constructor to GraphicsContextState to avoid that. Even though this seems like a clear win, the benefits are not visible when profiling. Looks like the overhead of the redundant initialization is not very large. Still seems worth fixing though. BUG=377687 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174985 Review URL: https://codereview.chromium.org/303613002 git-svn-id: svn://svn.chromium.org/blink/trunk@175894 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment