DescriptionAvoid 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
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175894
Patch Set 1 #Patch Set 2 : placement new in GraphicsContextState::copy() #Patch Set 3 : pass pointer instead of ref #
Total comments: 5
Patch Set 4 : pass reference to copy functions #
Total comments: 2
Patch Set 5 : operator= #Patch Set 6 : rebase #
Messages
Total messages: 14 (0 generated)
|