Bug 739096 - Remove cairo_quartz_{get,finish}_cg_context_with_clip. r=jrmuizel

No longer needed in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D112557
This commit is contained in:
Jonathan Kew 2021-04-29 14:33:29 +00:00
Родитель 3f563bce7e
Коммит 0b6a214452
2 изменённых файлов: 0 добавлений и 62 удалений

Просмотреть файл

@ -3502,62 +3502,6 @@ _cairo_surface_is_quartz (const cairo_surface_t *surface)
return surface->backend == &cairo_quartz_surface_backend; return surface->backend == &cairo_quartz_surface_backend;
} }
CGContextRef
cairo_quartz_get_cg_context_with_clip (cairo_t *cr)
{
cairo_surface_t *surface = cr->gstate->target;
cairo_clip_t *clip = &cr->gstate->clip;
cairo_status_t status;
cairo_quartz_surface_t *quartz = (cairo_quartz_surface_t*)surface;
if (cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_QUARTZ)
return NULL;
if (!clip->path) {
if (clip->all_clipped) {
/* Save the state before we set an empty clip rect so that
* our previous clip will be restored */
/* _cairo_surface_clipper_set_clip doesn't deal with
* clip->all_clipped because drawing is normally discarded earlier */
CGRect empty = {{0,0}, {0,0}};
CGContextClipToRect (quartz->cgContext, empty);
CGContextSaveGState (quartz->cgContext);
return quartz->cgContext;
}
/* an empty clip is represented by NULL */
clip = NULL;
}
status = _cairo_surface_clipper_set_clip (&quartz->clipper, clip);
/* Save the state after we set the clip so that it persists
* after we restore */
CGContextSaveGState (quartz->cgContext);
if (unlikely (status))
return NULL;
return quartz->cgContext;
}
void
cairo_quartz_finish_cg_context_with_clip (cairo_t *cr)
{
cairo_surface_t *surface = cr->gstate->target;
cairo_quartz_surface_t *quartz = (cairo_quartz_surface_t*)surface;
if (cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_QUARTZ)
return;
CGContextRestoreGState (quartz->cgContext);
}
cairo_surface_t * cairo_surface_t *
cairo_quartz_surface_get_image (cairo_surface_t *surface) cairo_quartz_surface_get_image (cairo_surface_t *surface)
{ {

Просмотреть файл

@ -70,12 +70,6 @@ cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
cairo_public CGContextRef cairo_public CGContextRef
cairo_quartz_surface_get_cg_context (cairo_surface_t *surface); cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
cairo_public CGContextRef
cairo_quartz_get_cg_context_with_clip (cairo_t *cr);
cairo_public void
cairo_quartz_finish_cg_context_with_clip (cairo_t *cr);
cairo_public cairo_surface_t * cairo_public cairo_surface_t *
cairo_quartz_surface_get_image (cairo_surface_t *surface); cairo_quartz_surface_get_image (cairo_surface_t *surface);