cluter/layer-node: Remove CoglTexture from structure
It is not used anywhere beyond the initializer, and won't be used later on. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1167
This commit is contained in:
parent
5817779656
commit
7d79ae7b07
@ -1244,7 +1244,6 @@ struct _ClutterLayerNode
|
|||||||
|
|
||||||
CoglPipeline *pipeline;
|
CoglPipeline *pipeline;
|
||||||
CoglFramebuffer *offscreen;
|
CoglFramebuffer *offscreen;
|
||||||
CoglTexture *texture;
|
|
||||||
|
|
||||||
guint8 opacity;
|
guint8 opacity;
|
||||||
};
|
};
|
||||||
@ -1427,6 +1426,7 @@ clutter_layer_node_new (const CoglMatrix *projection,
|
|||||||
guint8 opacity)
|
guint8 opacity)
|
||||||
{
|
{
|
||||||
ClutterLayerNode *res;
|
ClutterLayerNode *res;
|
||||||
|
CoglTexture *texture;
|
||||||
CoglColor color;
|
CoglColor color;
|
||||||
|
|
||||||
res = _clutter_paint_node_create (CLUTTER_TYPE_LAYER_NODE);
|
res = _clutter_paint_node_create (CLUTTER_TYPE_LAYER_NODE);
|
||||||
@ -1438,18 +1438,17 @@ clutter_layer_node_new (const CoglMatrix *projection,
|
|||||||
res->opacity = opacity;
|
res->opacity = opacity;
|
||||||
|
|
||||||
/* the texture backing the FBO */
|
/* the texture backing the FBO */
|
||||||
res->texture = cogl_texture_new_with_size (MAX (res->fbo_width, 1),
|
texture = cogl_texture_new_with_size (MAX (res->fbo_width, 1),
|
||||||
MAX (res->fbo_height, 1),
|
MAX (res->fbo_height, 1),
|
||||||
COGL_TEXTURE_NO_SLICING,
|
COGL_TEXTURE_NO_SLICING,
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
||||||
|
|
||||||
res->offscreen = COGL_FRAMEBUFFER (cogl_offscreen_new_to_texture (res->texture));
|
res->offscreen = COGL_FRAMEBUFFER (cogl_offscreen_new_to_texture (texture));
|
||||||
if (res->offscreen == NULL)
|
if (res->offscreen == NULL)
|
||||||
{
|
{
|
||||||
g_critical ("%s: Unable to create an offscreen buffer", G_STRLOC);
|
g_critical ("%s: Unable to create an offscreen buffer", G_STRLOC);
|
||||||
|
|
||||||
cogl_object_unref (res->texture);
|
cogl_object_unref (texture);
|
||||||
res->texture = NULL;
|
|
||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -1464,9 +1463,9 @@ clutter_layer_node_new (const CoglMatrix *projection,
|
|||||||
cogl_pipeline_set_layer_filters (res->pipeline, 0,
|
cogl_pipeline_set_layer_filters (res->pipeline, 0,
|
||||||
COGL_PIPELINE_FILTER_NEAREST,
|
COGL_PIPELINE_FILTER_NEAREST,
|
||||||
COGL_PIPELINE_FILTER_NEAREST);
|
COGL_PIPELINE_FILTER_NEAREST);
|
||||||
cogl_pipeline_set_layer_texture (res->pipeline, 0, res->texture);
|
cogl_pipeline_set_layer_texture (res->pipeline, 0, texture);
|
||||||
cogl_pipeline_set_color (res->pipeline, &color);
|
cogl_pipeline_set_color (res->pipeline, &color);
|
||||||
cogl_object_unref (res->texture);
|
cogl_object_unref (texture);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return (ClutterPaintNode *) res;
|
return (ClutterPaintNode *) res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user