This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
[wip] xrender backend #1196
Draft
dkochmanski
wants to merge
19
commits into
master
Choose a base branch
from
xrender-backend
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[wip] xrender backend #1196
Conversation
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
dkochmanski
force-pushed
the
xrender-backend
branch
from
June 14, 2021 12:23
1bd217a
to
59a2723
Compare
dkochmanski
force-pushed
the
xrender-backend
branch
from
June 24, 2021 19:02
59a2723
to
2ebab7e
Compare
dkochmanski
force-pushed
the
xrender-backend
branch
from
July 12, 2021 20:03
2ebab7e
to
39a7c03
Compare
sqrt sometimes resulted in a complex number very close to 0 in recording.
This protocol is redundant with medium-draw-ellipse*. Moreover it is forced to fallback to drawing ellipses for some medium transformations. On top of all that draw-circle* already calls medium-draw-ellipse* so this is not used in pracitce. This change is backward incompatible, because medium-draw-circle* was exported from the extension and the backend packages.
This class memoizes a result of the last call to bounding-rectangle*.
The used algorithm was winding number and its inclusion definition does not agree with "our" definition exhibited in drawing. Use ray casting algorithm instead. Fixes #1200.
- move expand-point-seq from graphics.lisp - move coord-seq->point-seq (reverse of the above) from utils.lisp - add a function polygonize to transform bezier curve to a polygon
The previous version of this function was not very readable. Add a comment that explains why we collect a 0-length edge. Move the high order function to flet instead of putting directly in the body (so the iteration is separated from the logic).
This commit does not introduce changes to functionality - only adds comments and reshapes the function for readibility.
This was previously computed in the function polygon-op. For this function to work on non-simple polygons this is necessary.
This internal function returns a list of points that constitue subsequent triangles. The function works on self-intersecting polygons, that's why its complexity is O[n²log(n)].
The previous version was recursive (for long chains of points the stack could overflow) and was consing. This version mutates the input list instead and uses iteration instead.
When macros WITH-ROUND-POSITIONS and WITH-ROUND-COORDINATES receive as a transformation either NIL or +IDENTITY-TRANSFORMATION+ then the transformation step is skipped in the expansion. CLIPPED-* functions are replaced with functions WITH-CLIPPED-*.
This step is necessary to allow using custom gcontext with legacy drawing routines. This will be used for: - setting the clipping region - computing masks in the new ink sourcing model (xrender) clx-draw-* routines are similar to medium-draw-* however they accept explicit arguments for the drawable, the gcontext and the transformation. They are responsible for clipping coordinates to valid x11 values. Moreover it is assumed that after the transformation the nature of a drawn object won't change (i.e clx-draw-rectangle will always call xlib:draw-rectangle even when the transformation is not rectilinear - it is medium-draw-rectangle* responsiblity to handle this situation.
The picture object is lazily created for each mirror in the drawable's plist. Getting source and target pictures is done by means of calling medium-{target,source}-picture. This is a preliminary step towards further improvements of the xrender rendering. To use legacy drawing routines (without breaking compatibility with the "legacy" medium) a new function clx-drawable-gcontext is created. It works similar to clx-drawable-picture. Also don't assume that the first picture and the first gcontext on the drawable plist is "ours" - instead find them with getf.
A macro with-render-context macro is responsible for binding the source and the target ink as well as for setting the target's clip mask. All allocated resources are released after use. Currently we clip by means of a gcontext. For now only filled rectangles and text use this macro. Non-uniform designs are implemented. Fixes #1132.
dkochmanski
force-pushed
the
xrender-backend
branch
from
July 13, 2021 17:59
39a7c03
to
6957114
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.