-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share graphics context globally (#4376)
Instead of creating a graphics context for every surface_t, this commit adds a cache that allows to "remember" up to two GCs. Thus, the code uses less GCs. When a GC from the cache can be used, this also gets rid of a round-trip to the X11 server. Both of these are tiny, insignificant savings, but so what? Since GCs are per-depth, this code needs access to get_visual_depth(). To avoid a code duplication, this function is moved to libi3. Fixes: #3478 Signed-off-by: Uli Schlachter <psychon@znc.in>
- Loading branch information
Showing
4 changed files
with
83 additions
and
41 deletions.
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
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