Bug 151829

Summary: Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: Layout and RenderingAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Said Abou-Hallawa 2015-12-03 15:10:00 PST
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
Comment 1 Said Abou-Hallawa 2015-12-03 15:15:31 PST
Created attachment 266566 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2015-12-03 15:16:33 PST
<rdar://problem/23751015>
Comment 3 WebKit Commit Bot 2015-12-03 16:50:04 PST
Comment on attachment 266566 [details]
Patch

Clearing flags on attachment: 266566

Committed r193390: <http://trac.webkit.org/changeset/193390>
Comment 4 WebKit Commit Bot 2015-12-03 16:50:07 PST
All reviewed patches have been landed.  Closing bug.