summaryrefslogtreecommitdiff
path: root/src/cairo-quartz-private.h
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2022-04-26 12:20:04 -0700
committerJohn Ralls <jralls@ceridwen.us>2023-02-14 11:52:57 -0800
commit198d1792cf1bdcc8379bcdcea798bd4249eb2c3c (patch)
tree78d0c8d78a223561a7be2032149539f73d4b2033 /src/cairo-quartz-private.h
parent6b5519626c0f809a58f072e3b402963ec45f29ab (diff)
downloadcairo-198d1792cf1bdcc8379bcdcea798bd4249eb2c3c.tar.gz
[quartz] Cleanup and make better use of cairo_quartz_image_surface_t.
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.
Diffstat (limited to 'src/cairo-quartz-private.h')
-rw-r--r--src/cairo-quartz-private.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
index f142f8471..5b19601c1 100644
--- a/src/cairo-quartz-private.h
+++ b/src/cairo-quartz-private.h
@@ -81,8 +81,7 @@ typedef struct cairo_quartz_image_surface {
cairo_surface_t base;
int width, height;
-
- CGImageRef image;
+ CGContextRef cgContext;
cairo_image_surface_t *imageSurface;
} cairo_quartz_image_surface_t;
@@ -92,16 +91,11 @@ _cairo_quartz_verify_surface_size(int width, int height);
cairo_private cairo_bool_t
_cairo_surface_is_quartz (const cairo_surface_t *surface);
-cairo_private CGImageRef
-CairoQuartzCreateCGImage (cairo_format_t format,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- void *data,
- cairo_bool_t interpolate,
- CGColorSpaceRef colorSpaceOverride,
- CGDataProviderReleaseDataCallback releaseCallback,
- void *releaseInfo);
+cairo_private cairo_bool_t
+_cairo_surface_is_quartz_image (const cairo_surface_t *surface);
+
+cairo_private CGContextRef
+_cairo_quartz_image_surface_get_cg_context (cairo_surface_t *surface);
cairo_private CGFontRef
_cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont);