mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
gsk: Remove gsk_renderer_create_cairo_surface()
It's not used anymore.
This commit is contained in:
parent
69101a11b5
commit
4fc072925c
@ -145,24 +145,6 @@ gsk_renderer_real_render (GskRenderer *self,
|
|||||||
GSK_RENDERER_WARN_NOT_IMPLEMENTED_METHOD (self, render);
|
GSK_RENDERER_WARN_NOT_IMPLEMENTED_METHOD (self, render);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cairo_surface_t *
|
|
||||||
gsk_renderer_real_create_cairo_surface (GskRenderer *self,
|
|
||||||
cairo_format_t format,
|
|
||||||
int width,
|
|
||||||
int height)
|
|
||||||
{
|
|
||||||
GskRendererPrivate *priv = gsk_renderer_get_instance_private (self);
|
|
||||||
int scale_factor = priv->surface ? gdk_surface_get_scale_factor (priv->surface) : 1;
|
|
||||||
int real_width = width * scale_factor;
|
|
||||||
int real_height = height * scale_factor;
|
|
||||||
|
|
||||||
cairo_surface_t *res = cairo_image_surface_create (format, real_width, real_height);
|
|
||||||
|
|
||||||
cairo_surface_set_device_scale (res, scale_factor, scale_factor);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gsk_renderer_dispose (GObject *gobject)
|
gsk_renderer_dispose (GObject *gobject)
|
||||||
{
|
{
|
||||||
@ -258,7 +240,6 @@ gsk_renderer_class_init (GskRendererClass *klass)
|
|||||||
klass->end_draw_frame = gsk_renderer_real_end_draw_frame;
|
klass->end_draw_frame = gsk_renderer_real_end_draw_frame;
|
||||||
klass->render = gsk_renderer_real_render;
|
klass->render = gsk_renderer_real_render;
|
||||||
klass->render_texture = gsk_renderer_real_render_texture;
|
klass->render_texture = gsk_renderer_real_render_texture;
|
||||||
klass->create_cairo_surface = gsk_renderer_real_create_cairo_surface;
|
|
||||||
|
|
||||||
gobject_class->constructed = gsk_renderer_constructed;
|
gobject_class->constructed = gsk_renderer_constructed;
|
||||||
gobject_class->set_property = gsk_renderer_set_property;
|
gobject_class->set_property = gsk_renderer_set_property;
|
||||||
@ -741,18 +722,6 @@ gsk_renderer_new_for_surface (GdkSurface *surface)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_surface_t *
|
|
||||||
gsk_renderer_create_cairo_surface (GskRenderer *renderer,
|
|
||||||
cairo_format_t format,
|
|
||||||
int width,
|
|
||||||
int height)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GSK_IS_RENDERER (renderer), NULL);
|
|
||||||
g_return_val_if_fail (width > 0 && height > 0, NULL);
|
|
||||||
|
|
||||||
return GSK_RENDERER_GET_CLASS (renderer)->create_cairo_surface (renderer, format, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gsk_renderer_begin_draw_frame:
|
* gsk_renderer_begin_draw_frame:
|
||||||
* @renderer: a #GskRenderer
|
* @renderer: a #GskRenderer
|
||||||
|
@ -52,21 +52,12 @@ struct _GskRendererClass
|
|||||||
GdkDrawingContext *context);
|
GdkDrawingContext *context);
|
||||||
void (* render) (GskRenderer *renderer,
|
void (* render) (GskRenderer *renderer,
|
||||||
GskRenderNode *root);
|
GskRenderNode *root);
|
||||||
|
|
||||||
cairo_surface_t * (* create_cairo_surface) (GskRenderer *renderer,
|
|
||||||
cairo_format_t,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean gsk_renderer_is_realized (GskRenderer *renderer);
|
gboolean gsk_renderer_is_realized (GskRenderer *renderer);
|
||||||
|
|
||||||
GskRenderNode * gsk_renderer_get_root_node (GskRenderer *renderer);
|
GskRenderNode * gsk_renderer_get_root_node (GskRenderer *renderer);
|
||||||
GdkDrawingContext * gsk_renderer_get_drawing_context (GskRenderer *renderer);
|
GdkDrawingContext * gsk_renderer_get_drawing_context (GskRenderer *renderer);
|
||||||
cairo_surface_t * gsk_renderer_create_cairo_surface (GskRenderer *renderer,
|
|
||||||
cairo_format_t format,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
|
|
||||||
GskProfiler * gsk_renderer_get_profiler (GskRenderer *renderer);
|
GskProfiler * gsk_renderer_get_profiler (GskRenderer *renderer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user