Build the X11 backend without wraster by default - #177
Open
DTW-Thalion wants to merge 4 commits into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependencies: Needs PR #175 to be merged.
This adds an
--enable-wrasterconfigure option and makes the X11 server and the xlib graphics backend build without wraster by default.A new
Source/x11/xlibimage.creimplements the small part of the wraster image API the backend actually uses (RContext,RGetClosestXColor, and theRXImagecreate/get/put/destroy calls) on plain Xlib. It does not use MIT-SHM, and non-TrueColor visuals are resolved withXAllocColor. The struct and function names matchwraster.h, so the call sites are unchanged and the graphics backend picks the implementation through a single guard inXGPrivate.h.The default build (
USE_WRASTER=0) compilesxlibimage.cin place of the bundled wraster sources. Configuring with--enable-wraster(USE_WRASTER=1) keeps the previous behaviour: the wraster sources are left untouched and compile exactly as before, so the two builds can be compared directly. This keeps wraster available rather than dropping it.I checked that cairo, xlib and art build under both settings. For the xlib backend I compared the pixels read back through
GSReadRectunder each build and they are identical.Relates to #98.