Use correct cogl object types
Use the correct pointer types for cogl objects. This avoids warnings when including the cogl headers doesn't result in all the cogl types being typedefs to void. https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
parent
f096cc327d
commit
dd1eaeb262
@ -255,7 +255,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
||||
{
|
||||
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();
|
||||
meta_cursor_sprite_set_texture (cursor_sprite,
|
||||
sprite,
|
||||
COGL_TEXTURE (sprite),
|
||||
cursor_image->xhot,
|
||||
cursor_image->yhot);
|
||||
cogl_object_unref (sprite);
|
||||
|
@ -135,7 +135,7 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
||||
CoglPixelFormat cogl_format;
|
||||
ClutterBackend *clutter_backend;
|
||||
CoglContext *cogl_context;
|
||||
CoglTexture *texture;
|
||||
CoglTexture2D *texture;
|
||||
CoglError *error = NULL;
|
||||
|
||||
g_assert (self->texture == NULL);
|
||||
@ -165,7 +165,7 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
||||
cogl_error_free (error);
|
||||
}
|
||||
|
||||
meta_cursor_sprite_set_texture (self, texture,
|
||||
meta_cursor_sprite_set_texture (self, COGL_TEXTURE (texture),
|
||||
xc_image->xhot, xc_image->yhot);
|
||||
|
||||
if (texture)
|
||||
|
@ -39,7 +39,7 @@ struct _MetaBackgroundMonitor
|
||||
{
|
||||
gboolean dirty;
|
||||
CoglTexture *texture;
|
||||
CoglOffscreen *fbo;
|
||||
CoglFramebuffer *fbo;
|
||||
};
|
||||
|
||||
struct _MetaBackgroundPrivate
|
||||
@ -662,6 +662,7 @@ ensure_wallpaper_texture (MetaBackground *self,
|
||||
{
|
||||
int width = cogl_texture_get_width (texture);
|
||||
int height = cogl_texture_get_height (texture);
|
||||
CoglOffscreen *offscreen;
|
||||
CoglFramebuffer *fbo;
|
||||
CoglError *catch_error = NULL;
|
||||
CoglPipeline *pipeline;
|
||||
@ -669,7 +670,8 @@ ensure_wallpaper_texture (MetaBackground *self,
|
||||
priv->wallpaper_texture = meta_create_texture (width, height,
|
||||
COGL_TEXTURE_COMPONENTS_RGBA,
|
||||
META_TEXTURE_FLAGS_NONE);
|
||||
fbo = cogl_offscreen_new_with_texture (priv->wallpaper_texture);
|
||||
offscreen = cogl_offscreen_new_with_texture (priv->wallpaper_texture);
|
||||
fbo = COGL_FRAMEBUFFER (offscreen);
|
||||
|
||||
if (!cogl_framebuffer_allocate (fbo, &catch_error))
|
||||
{
|
||||
@ -786,10 +788,13 @@ meta_background_get_texture (MetaBackground *self,
|
||||
|
||||
if (monitor->texture == NULL)
|
||||
{
|
||||
CoglOffscreen *offscreen;
|
||||
|
||||
monitor->texture = meta_create_texture (monitor_area.width, monitor_area.height,
|
||||
COGL_TEXTURE_COMPONENTS_RGBA,
|
||||
META_TEXTURE_FLAGS_NONE);
|
||||
monitor->fbo = cogl_offscreen_new_with_texture (monitor->texture);
|
||||
offscreen = cogl_offscreen_new_with_texture (monitor->texture);
|
||||
monitor->fbo = COGL_FRAMEBUFFER (offscreen);
|
||||
}
|
||||
|
||||
if (!cogl_framebuffer_allocate (monitor->fbo, &catch_error))
|
||||
|
@ -213,7 +213,8 @@ meta_surface_actor_x11_process_damage (MetaSurfaceActor *actor,
|
||||
if (!is_visible (self))
|
||||
return;
|
||||
|
||||
cogl_texture_pixmap_x11_update_area (priv->texture, x, y, width, height);
|
||||
cogl_texture_pixmap_x11_update_area (COGL_TEXTURE_PIXMAP_X11 (priv->texture),
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -361,8 +361,10 @@ texture_tower_create_texture (MetaTextureTower *tower,
|
||||
{
|
||||
ClutterBackend *backend = clutter_get_default_backend ();
|
||||
CoglContext *context = clutter_backend_get_cogl_context (backend);
|
||||
CoglTextureRectangle *texture_rectangle;
|
||||
|
||||
tower->textures[level] = cogl_texture_rectangle_new_with_size (context, width, height);
|
||||
texture_rectangle = cogl_texture_rectangle_new_with_size (context, width, height);
|
||||
tower->textures[level] = COGL_TEXTURE (texture_rectangle);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user