4c68ca6a7a32c114303dfbd9fd04e881f36cfa94 to bed7d29952187d534537045a9c4e4a6347d1de30 · Martin Owens / inkscape · GitLab
Martin Owens
·
2026-05-19
·
via Martin Owens activity
-
New image pixel access and pixel filters
·
5f77b78b
To support more color channels, and greater flexibility in our rendering
engine, this new code impliments a new API for accessing pixel data in a
cairo surface and expands it's capabilities so that they can work with
floating point pixel data as well as CMYKA (5 channel) interpolations.
The new interface makes heavy use of compile time templating for channel count
and cairo surface formats.
The primary use of this API is for filters. Each filter which depends on
non-cairo functionality is recoded to use this new API and split out from
their svg filter primitive and display object files so they can be unit tested.
Threading and dispatch pool are held as light copies until the refactoring is
completed and we can copy them to a central utility instead.
Assistance from PBS (squashed):
* Use requires instead of run-time checks.
* Use more modern _v/_t instead of ::value/::type.
* Fix const T* memory() calling itself in infinite loop.
* Make some functions static (_primary_pos, _bilinear_interpolate).
* Make _transform std::optional.
* Convert G_BYTE_ORDER == G_LITTLE_ENDIAN to if constexpr, revealing
missing glib.h header.
* Use safemod for wrapping.
-
Build surface management engine
·
adfce20d
To contain the multiple cairo surfaces and integrate with the pixel access code
a new Surface class is made that stores references to cairo surfaces.
PixelAccess objects of the right format can be run with filters to control the
surface at a pixel by pixel level.
A host of new tests are adding for each of the filters to make sure PixelAccess
integration is correct for each one of them.
Other Changes
* Add forward declaration to colors API to smooth importing
-
Build context drawing engine
·
983ef644
We wrap the cairo context with our own multi-context engine
which keeps track of the color space, can paint multi-surface
CMYK rasters onto each other as well as translate between
Inkscape geom, path objects to cairo instructions.
Added many tests for each of the functionalities in cairo context
drawing.
Add README to explain the local code structures.
-
Add Drawing Filter stack to render SVG Filter Primitives
·
55c306cf
The stack mostly backs onto PixelFilters, but also onto the Surface
and Context where upstream functionality can provide the output.
The ColorSpace for the filter primitives are tied into the rendering
process so filters are rendered in the correct space.
Drawing options are refactored to be more concise for future use.
-
Copy of display/drawing* code
·
3c2c259c
This copy from display allows the differences to be seen more easily.
display/drawing* -> renderer/drawing/drawing*
display/surface* -> renderer/drawing/drawing-area* (might not be needed)
display/tags* -> renderer/drawing/drawing-item-tags*
display/nr-style* -> renderer/drawing/drawing-style*
-
Refactor DrawingItem and the rest of the Drawing stack for new rendering engine
·
bed7d299
The process used for this refactoring was a light touch on the logic. But
the namespaces, and somme processes that were incompatible with the new
surface and pixel filters had to be changed.
The RenderContext was changed to DrawingOptions to better express what it is
and the various options from filters and other parts of the pipeline were
added so they aren't being passed around in addition.
Pull in all uses of SPStyle into the DrawingStyle parsing and remove DrawingItem
style variables to provide consistancy and remove duplication.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。