Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r185396 - GraphicsContext state stack wasting lots of memory wh…
…en empty. <https://webkit.org/b/145817> Reviewed by Geoffrey Garen. Give the GraphicsContextState stack an inline capacity of 1, and make sure to free any heap-allocated backing store when the stack goes empty. The 1 is because HTMLCanvasElement keeps one "save" on the underlying GraphicsContext at all times, and this prevents those canvases from always sitting on an empty stack with 16 capacity. This saves ~520 kB on cnet.com video pages. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::restore): * platform/graphics/GraphicsContext.h:
- Loading branch information
1 parent
de07bfe
commit f083aed
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters