Bug 151829 - Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
Summary: Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-03 15:10 PST by Said Abou-Hallawa
Modified: 2015-12-03 16:50 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.28 KB, patch)
2015-12-03 15:15 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.