Saving/Restoring the GraphicsContext is an expensive operation. It should be used when the number to save/restore options in the context is large. But when only one option is set and later is restored, it is a lot cheaper to do that save/restore explicitly. Here are some results: When using GraphicsContextStateSaver in RenderLayer::paintLayerByApplyingTransform: Test Name Score Complexity FPS Avg. W.5% Std. % Avg. W.5% Std. % CSS bouncing circles 419.84 444.72 396.34 25.86 5.82 49.53 44.73 2.30 4.65 When removing GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform: Test Name Score Complexity FPS Avg. W.5% Std. % Avg. W.5% Std. % CSS bouncing circles 491.74 532.11 454.44 38.40 7.22 48.66 43.87 2.84 5.83
Created attachment 266566 [details] Patch
<rdar://problem/23751015>
Comment on attachment 266566 [details] Patch Clearing flags on attachment: 266566 Committed r193390: <http://trac.webkit.org/changeset/193390>
All reviewed patches have been landed. Closing bug.