Revert of Avoid redundant initialization of GraphicsContextState....
Revert of Avoid redundant initialization of GraphicsContextState. (https://codereview.chromium.org/303613002/) Reason for revert: This change is the cause of a leak in PhishingDOMFeatureExtractorTest.ScriptAndImageFeatures under LSAN. See http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/2642/steps/browser_tests/logs/ScriptAndImageFeatures Original issue's description: > 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 TBR=schenney@chromium.org,fmalita@chromium.org,dominikg@chromium.org NOTREECHECKS=true NOTRY=true BUG=377687 Review URL: https://codereview.chromium.org/303403006 git-svn-id: svn://svn.chromium.org/blink/trunk@175159 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment