| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kCGColorSpaceDefaultRGB.
The default RGB colorspace must be converted to the GPU's colorspace
using CGColorTransformConvertUsingCMSConverter. Profiling has shown this
function to consume as much as 48% of a redraw cycle in gdk-quartz.
There seems to be no named colorspace that matches the one stored on the
display, so we use the one associated with the main display. This has
some risks for users with multiple monitors but in testing with my own
two-monitor setup, one of which is HDR and the other not, the colorspace
was the same for both.
This is applied to quartz surfaces created with
cairo_quartz_surface_create(); surfaces created with
cairo_quartz_surface_create_for_cg_context will inherit the colorspace
from the context.
In order to generate PNGs that look right I've converted the
existing debugging functions for writing a quartz surface to png
into private functions and wired cairo-boilerplate-quartz to use
them. Using the generic cairo routine produced washed-out PNGs.
Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/330
|
| |
|
|
|
|
|
|
|
|
|
| |
Use a CGBitmapContext mapping the underlying image surface's data instead
of maintaining a CGImage. Generalize the quartz surface snapshot mechanism
to work with both cairo_quartz_surface_t and cairo_quartz_image_surface_t
and to use the latter to get a CGContext around non-quartz surfaces.
Use this snapshot machanism to get a CGImageRef when needed from a
cairo_quartz_image_surface_t.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
CGContextDrawTiledImage turned up as a significant time-user while
profiling a benchmark created to evaluate
https://gitlab.gnome.org/GNOME/gtk/-/issues/3714. Without this commit
the benchmark is able to perform a mean frame rate of 2.19 frames per
second with a standard deviation of 0.09; with the commit the mean frame
rate is 2.37 fps, s.d. 0.30, both over 15 10-second samples. Student's
t-test reports a 9.8% likelyhood that the two represent the same
distribution.
|
| |
|
|
|
|
|
| |
Caching doesn't really do anything and removing it provides a 50%
speedup and gets pdf-operators-text to pass on argb32.
|
|
|
|
|
|
|
|
| |
The code for extracting font glyphs was replaced in
70cc8f250b5669e757b4f044571ba0f71e3dea9e with an implementation based
on CoreText, which is not available on MacOSX 10.4. This commit
restores automatic detection of which API should be used by means of
dynamic linking.
|
|
|
|
|
|
|
|
|
| |
The quartz-image backend uses _cairo_surface_is_quartz(), which
therefore needs to be made available to it. Fixed as suggested by
Bryce in the referenced bugreport.
References: https://bugs.freedesktop.org/show_bug.cgi?id=84569
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
|
|
|
|
|
| |
Private functions must be marked cairo_private to avoid exporting
them.
|
|
|
|
|
|
|
|
|
|
|
| |
The function was renamed in 81efbc1847c4b9c08440d76bbc1636b21cac16d8
but the prototype was not updated.
Silences the warning:
cairo-quartz-surface.c:165: warning: no previous prototype for 'CairoQuartzCreateCGImage'
Along with 0c620080afa892f7bb642cc90fb72aafbebad16d, fixes
https://bugs.freedesktop.org/show_bug.cgi?id=40082
|
|
|
|
| |
We never used the x,y portion of the extents so we might as well take it out.
|
|
|
|
|
|
|
|
|
|
| |
Some pattern types (gradients, surface patterns) require some
temporary information to be stored as "graphic state", because it
doesn't belong to CGContext. Previously all of this data was stored
inside the surface during the drawing operations, now it's in a
stack-allocated structure (of type cairo_quartz_drawing_state_t).
Based on a patch by Robert O'Callahan <robert@ocallahan.org>.
See https://bugzilla.mozilla.org/show_bug.cgi?id=522859
|
|
|
|
|
|
| |
Both DO_SOLID and DO_PATTERN setup the underlying CGContext to directly
use the chosen color/pattern when filling and stroking, thus require no
additional drawing operations and can share the same drawing code.
|
|
|
|
|
|
|
|
| |
Share some code between the drawing functions by saving the state
and setting the operator when setting up the source and by restoring
the state during teardown.
Based on a patch by Robert O'Callahan <robert@ocallahan.org>.
See https://bugzilla.mozilla.org/show_bug.cgi?id=522859
|
|
|
|
|
|
| |
DO_NOTHING and DO_UNSUPPORTED are not actual actions and are better
handled by returning an appropriate cairo_int_status_t (and falling
back, if needed).
|
|
|
|
|
|
|
|
|
|
|
|
| |
By keeping "virtual extents", quartz surfaces now keep track of
the extents where they want the gradients to be consistent.
This works across various API for surface creation and editing:
- cairo_surface_create_for_rectangle
- cairo_surface_create_similar + cairo_surface_set_device_offset
- cairo_push_group/cairo_pop_group
This method does not use clip extents, so it also makes gradient
rasterization independent of clip/path extents.
|
|
|
|
|
|
|
|
|
|
|
| |
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
|
|
|
|
|
|
|
| |
On Mac OS 10.6 and newer cairo_quartz_float_t is defined to be a
CGFloat, resolving issues with the 64-bit builds.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=25814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling clip as part of the surface state, as opposed to being part of
the operation state, is cumbersome and a hindrance to providing true proxy
surface support. For example, the clip must be copied from the surface
onto the fallback image, but this was forgotten causing undue hassle in
each backend. Another example is the contortion the meta surface
endures to ensure the clip is correctly recorded. By contrast passing the
clip along with the operation is quite simple and enables us to write
generic handlers for providing surface wrappers. (And in the future, we
should be able to write more esoteric wrappers, e.g. automatic 2x FSAA,
trivially.)
In brief, instead of the surface automatically applying the clip before
calling the backend, the backend can call into a generic helper to apply
clipping. For raster surfaces, clip regions are handled automatically as
part of the composite interface. For vector surfaces, a clip helper is
introduced to replay and callback into an intersect_clip_path() function
as necessary.
Whilst this is not primarily a performance related change (the change
should just move the computation of the clip from the moment it is applied
by the user to the moment it is required by the backend), it is important
to track any potential regression:
ppc:
Speedups
========
image-rgba evolution-20090607-0 1026085.22 0.18% -> 672972.07 0.77%: 1.52x speedup
▌
image-rgba evolution-20090618-0 680579.98 0.12% -> 573237.66 0.16%: 1.19x speedup
▎
image-rgba swfdec-fill-rate-4xaa-0 460296.92 0.36% -> 407464.63 0.42%: 1.13x speedup
▏
image-rgba swfdec-fill-rate-2xaa-0 128431.95 0.47% -> 115051.86 0.42%: 1.12x speedup
▏
Slowdowns
=========
image-rgba firefox-periodic-table-0 56837.61 0.78% -> 66055.17 3.20%: 1.09x slowdown
▏
|
|
|
|
|
| |
This is more robust to cases where people want to assign 0 to those variables.
(win32/alternate build systems, etc)
|
|
|
|
|
| |
The rule is simple: <x.h> for system / other project includes,
"x.h" for local includes.
|
| |
|
| |
|
|
|
|
| |
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=14248
|
| |
|
|
|
|
|
|
| |
Previously the CGFontRef was recreated each time in show_glyphs; this
caused the font to get re-embedded in any PDF files that were being
generated through Quartz.
|
|
|
|
| |
There are still some bits not quite working.
|
|
|
|
|
| |
Mostly s/cairo_rectangle_int16_t/cairo_rectangle_int_t/,
as well as definitions to pick cairo_rectangle_int_t.
|
|
|
|
|
|
| |
The implementation of DO_IMAGE leaks memory via a referenced surface,
and wasn't applied for strokes and glyphs. This patch corrects those
issues.
|
|
|
|
| |
Renaming any nquartz symbols and files left to quartz.
|
|
|
|
|
| |
Make it possible to use the --enable-quartz and --enable-atsui
independently. Quartz on its own will use the ft font backend.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Inital commit of Native Quartz surface. The main missing functionality
is mask() support (which is just a noop right now, except for the simple
solid-alpha case).
|
|
|
|
|
|
| |
This rectangle has regular integer values, not fixed-point values.
So the old name was horribly wrong and misleading, (and yes I think
it was even I that had suggested it).
|
|
|
|
|
|
| |
This is in preparation for a later function addition for extracting
clip rectangles from a cairo_t, (which will add a public
cairo_rectangle_t).
|
| |
|
|
|
|
| |
it on demand.#
|
|
If the destination surface is a quartz surface, get the clip mask from it.
Added.
Keep a copy of the clip mask around.
(_cairo_surface_is_quartz): New function which determines if a given surface is a quartz surface.
|