mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
Fallout from cogl-material merge
When enabling the maintainer CFLAGS the compiler got very angry at the code that has been merged.
This commit is contained in:
parent
d428c2a2cc
commit
31e4ca5733
@ -57,12 +57,6 @@
|
|||||||
|
|
||||||
#define COGL_HANDLE_DEFINE(TypeName, type_name, handle_array) \
|
#define COGL_HANDLE_DEFINE(TypeName, type_name, handle_array) \
|
||||||
\
|
\
|
||||||
static CoglHandle * \
|
|
||||||
_cogl_##type_name##_handle_from_pointer (Cogl##TypeName *obj) \
|
|
||||||
{ \
|
|
||||||
return (CoglHandle)obj; \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
static gint \
|
static gint \
|
||||||
_cogl_##type_name##_handle_find (CoglHandle handle) \
|
_cogl_##type_name##_handle_find (CoglHandle handle) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -373,8 +373,8 @@ cogl_material_set_blend_factors (CoglHandle handle,
|
|||||||
*/
|
*/
|
||||||
static CoglMaterialLayer *
|
static CoglMaterialLayer *
|
||||||
_cogl_material_get_layer (CoglMaterial *material,
|
_cogl_material_get_layer (CoglMaterial *material,
|
||||||
gint index,
|
gint index_,
|
||||||
gboolean create_if_not_found)
|
gboolean create_if_not_found)
|
||||||
{
|
{
|
||||||
CoglMaterialLayer *layer;
|
CoglMaterialLayer *layer;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
@ -384,12 +384,12 @@ _cogl_material_get_layer (CoglMaterial *material,
|
|||||||
{
|
{
|
||||||
layer =
|
layer =
|
||||||
_cogl_material_layer_pointer_from_handle ((CoglHandle)tmp->data);
|
_cogl_material_layer_pointer_from_handle ((CoglHandle)tmp->data);
|
||||||
if (layer->index == index)
|
if (layer->index == index_)
|
||||||
return layer;
|
return layer;
|
||||||
|
|
||||||
/* The layers are always sorted, so at this point we know this layer
|
/* The layers are always sorted, so at this point we know this layer
|
||||||
* doesn't exist */
|
* doesn't exist */
|
||||||
if (layer->index > index)
|
if (layer->index > index_)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* NB: if we now insert a new layer before tmp, that will maintain order.
|
/* NB: if we now insert a new layer before tmp, that will maintain order.
|
||||||
@ -401,7 +401,7 @@ _cogl_material_get_layer (CoglMaterial *material,
|
|||||||
layer = g_new0 (CoglMaterialLayer, 1);
|
layer = g_new0 (CoglMaterialLayer, 1);
|
||||||
|
|
||||||
layer->ref_count = 1;
|
layer->ref_count = 1;
|
||||||
layer->index = index;
|
layer->index = index_;
|
||||||
layer->flags = COGL_MATERIAL_LAYER_FLAG_DEFAULT_COMBINE;
|
layer->flags = COGL_MATERIAL_LAYER_FLAG_DEFAULT_COMBINE;
|
||||||
layer->texture = COGL_INVALID_HANDLE;
|
layer->texture = COGL_INVALID_HANDLE;
|
||||||
|
|
||||||
@ -630,8 +630,7 @@ cogl_material_remove_layer (CoglHandle material_handle,
|
|||||||
layer = tmp->data;
|
layer = tmp->data;
|
||||||
if (layer->index == layer_index)
|
if (layer->index == layer_index)
|
||||||
{
|
{
|
||||||
CoglHandle handle =
|
CoglHandle handle = (CoglHandle) layer;
|
||||||
_cogl_material_layer_handle_from_pointer (layer);
|
|
||||||
cogl_material_layer_unref (handle);
|
cogl_material_layer_unref (handle);
|
||||||
material->layers = g_list_remove (material->layers, layer);
|
material->layers = g_list_remove (material->layers, layer);
|
||||||
continue;
|
continue;
|
||||||
|
@ -144,22 +144,22 @@ cogl_create_context ()
|
|||||||
cogl_texture_new_from_data (1, /* width */
|
cogl_texture_new_from_data (1, /* width */
|
||||||
1, /* height */
|
1, /* height */
|
||||||
-1, /* max waste */
|
-1, /* max waste */
|
||||||
FALSE, /* auto mipmap */
|
COGL_TEXTURE_NONE, /* flags */
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888, /* data format */
|
COGL_PIXEL_FORMAT_RGBA_8888, /* data format */
|
||||||
/* internal format */
|
/* internal format */
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888,
|
COGL_PIXEL_FORMAT_RGBA_8888,
|
||||||
0, /* auto calc row stride */
|
0, /* auto calc row stride */
|
||||||
&default_texture_data);
|
default_texture_data);
|
||||||
_context->default_gl_texture_rect_tex =
|
_context->default_gl_texture_rect_tex =
|
||||||
cogl_texture_new_from_data (1, /* width */
|
cogl_texture_new_from_data (1, /* width */
|
||||||
1, /* height */
|
1, /* height */
|
||||||
-1, /* max waste */
|
-1, /* max waste */
|
||||||
FALSE, /* auto mipmap */
|
COGL_TEXTURE_NONE, /* flags */
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888, /* data format */
|
COGL_PIXEL_FORMAT_RGBA_8888, /* data format */
|
||||||
/* internal format */
|
/* internal format */
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888,
|
COGL_PIXEL_FORMAT_RGBA_8888,
|
||||||
0, /* auto calc row stride */
|
0, /* auto calc row stride */
|
||||||
&default_texture_data);
|
default_texture_data);
|
||||||
|
|
||||||
cogl_set_source (_context->default_material);
|
cogl_set_source (_context->default_material);
|
||||||
cogl_material_flush_gl_state (_context->source_material, NULL);
|
cogl_material_flush_gl_state (_context->source_material, NULL);
|
||||||
|
@ -2665,13 +2665,11 @@ _cogl_rectangles_with_multitexture_coords (
|
|||||||
rects[i].tex_coords,
|
rects[i].tex_coords,
|
||||||
rects[i].tex_coords_len))
|
rects[i].tex_coords_len))
|
||||||
{
|
{
|
||||||
const GList *layers;
|
CoglHandle first_layer, tex_handle;
|
||||||
CoglHandle tex_handle;
|
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
|
||||||
layers = cogl_material_get_layers (material);
|
first_layer = cogl_material_get_layers (material)->data;
|
||||||
tex_handle =
|
tex_handle = cogl_material_layer_get_texture (first_layer);
|
||||||
cogl_material_layer_get_texture ((CoglHandle)layers->data);
|
|
||||||
texture = _cogl_texture_pointer_from_handle (tex_handle);
|
texture = _cogl_texture_pointer_from_handle (tex_handle);
|
||||||
_cogl_texture_sliced_quad (texture,
|
_cogl_texture_sliced_quad (texture,
|
||||||
material,
|
material,
|
||||||
|
Loading…
Reference in New Issue
Block a user