diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c index 63e24104d5aa86cb309f759689b7b0ee6bbe3f66..12cb317f9f9cd78c877112c0ec98b1fb3e7954d5 100644 --- a/clutter/clutter/clutter-stage-view.c +++ b/clutter/clutter/clutter-stage-view.c @@ -192,7 +192,7 @@ create_offscreen (ClutterStageView *view, width, height, format); } - cogl_texture_set_auto_mipmap (texture, FALSE); + cogl_texture_2d_set_auto_mipmap (COGL_TEXTURE_2D (texture), FALSE); if (!cogl_texture_allocate (texture, error)) return FALSE; diff --git a/cogl/cogl/cogl-atlas-texture.c b/cogl/cogl/cogl-atlas-texture.c index 7f25aadd196b1f07300f97a0d45c959d3a46e088..feb14214e3b98f56e1850e11e53fc246b3087e1b 100644 --- a/cogl/cogl/cogl-atlas-texture.c +++ b/cogl/cogl/cogl-atlas-texture.c @@ -255,16 +255,6 @@ _cogl_atlas_texture_gl_flush_legacy_texobj_wrap_modes (CoglTexture *tex, wrap_mode_t); } -static int -_cogl_atlas_texture_get_max_waste (CoglTexture *tex) -{ - CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex); - CoglTextureClass *klass = COGL_TEXTURE_GET_CLASS (atlas_tex->sub_texture); - - /* Forward on to the sub texture */ - return klass->get_max_waste (COGL_TEXTURE (atlas_tex->sub_texture)); -} - static gboolean _cogl_atlas_texture_is_sliced (CoglTexture *tex) { @@ -814,7 +804,6 @@ cogl_atlas_texture_class_init (CoglAtlasTextureClass *klass) texture_class->allocate = _cogl_atlas_texture_allocate; texture_class->set_region = _cogl_atlas_texture_set_region; texture_class->foreach_sub_texture_in_region = _cogl_atlas_texture_foreach_sub_texture_in_region; - texture_class->get_max_waste = _cogl_atlas_texture_get_max_waste; texture_class->is_sliced = _cogl_atlas_texture_is_sliced; texture_class->can_hardware_repeat = _cogl_atlas_texture_can_hardware_repeat; @@ -874,8 +863,7 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx, * data structure */ g_return_val_if_fail (width > 0 && height > 0, NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_SIZE; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_SIZE); loader->src.sized.width = width; loader->src.sized.height = height; loader->src.sized.format = COGL_PIXEL_FORMAT_ANY; @@ -892,8 +880,7 @@ cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp) g_return_val_if_fail (COGL_IS_BITMAP (bmp), NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_BITMAP; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_BITMAP); loader->src.bitmap.bitmap = g_object_ref (bmp); return _cogl_atlas_texture_create_base (_cogl_bitmap_get_context (bmp), diff --git a/cogl/cogl/cogl-sub-texture.c b/cogl/cogl/cogl-sub-texture.c index d81c7d726b674fd4a491033ed68f35a33dae024a..26d52385db733845ee6109ae978f3e35bb689fdf 100644 --- a/cogl/cogl/cogl-sub-texture.c +++ b/cogl/cogl/cogl-sub-texture.c @@ -188,15 +188,6 @@ _cogl_sub_texture_allocate (CoglTexture *tex, return status; } -static int -_cogl_sub_texture_get_max_waste (CoglTexture *tex) -{ - CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex); - CoglTextureClass *klass = COGL_TEXTURE_GET_CLASS (sub_tex->full_texture); - - return klass->get_max_waste (sub_tex->full_texture); -} - static gboolean _cogl_sub_texture_is_sliced (CoglTexture *tex) { @@ -366,7 +357,6 @@ cogl_sub_texture_class_init (CoglSubTextureClass *klass) texture_class->set_region = _cogl_sub_texture_set_region; texture_class->is_get_data_supported = _cogl_sub_texture_is_get_data_supported; texture_class->foreach_sub_texture_in_region = _cogl_sub_texture_foreach_sub_texture_in_region; - texture_class->get_max_waste = _cogl_sub_texture_get_max_waste; texture_class->is_sliced = _cogl_sub_texture_is_sliced; texture_class->can_hardware_repeat = _cogl_sub_texture_can_hardware_repeat; texture_class->transform_coords_to_gl = _cogl_sub_texture_transform_coords_to_gl; diff --git a/cogl/cogl/cogl-texture-2d-private.h b/cogl/cogl/cogl-texture-2d-private.h index 3cc3b5d67ea60da6870a1ea35c84f4ae78931ee8..d1ab5b87ff6cf5876a671c2c34d4d2f5a7022cda 100644 --- a/cogl/cogl/cogl-texture-2d-private.h +++ b/cogl/cogl/cogl-texture-2d-private.h @@ -77,10 +77,6 @@ _cogl_texture_2d_create_base (CoglContext *ctx, CoglPixelFormat internal_format, CoglTextureLoader *loader); -void -_cogl_texture_2d_set_auto_mipmap (CoglTexture *tex, - gboolean value); - /* * _cogl_texture_2d_externally_modified: * @texture: A #CoglTexture2D object diff --git a/cogl/cogl/cogl-texture-2d-sliced.c b/cogl/cogl/cogl-texture-2d-sliced.c index 4322b33c718fa142dd20486528c0296c42f24a8e..ee1aaf09c62f0eaf355dd02e6d088e0522b8bda9 100644 --- a/cogl/cogl/cogl-texture-2d-sliced.c +++ b/cogl/cogl/cogl-texture-2d-sliced.c @@ -735,14 +735,6 @@ _cogl_texture_2d_sliced_allocate (CoglTexture *tex, g_return_val_if_reached (FALSE); } -static int -_cogl_texture_2d_sliced_get_max_waste (CoglTexture *tex) -{ - CoglTexture2DSliced *tex_2ds = COGL_TEXTURE_2D_SLICED (tex); - - return tex_2ds->max_waste; -} - static gboolean _cogl_texture_2d_sliced_is_sliced (CoglTexture *tex) { @@ -1192,7 +1184,6 @@ cogl_texture_2d_sliced_class_init (CoglTexture2DSlicedClass *klass) texture_class->allocate = _cogl_texture_2d_sliced_allocate; texture_class->set_region = _cogl_texture_2d_sliced_set_region; texture_class->foreach_sub_texture_in_region = _cogl_texture_2d_sliced_foreach_sub_texture_in_region; - texture_class->get_max_waste = _cogl_texture_2d_sliced_get_max_waste; texture_class->is_sliced = _cogl_texture_2d_sliced_is_sliced; texture_class->can_hardware_repeat = _cogl_texture_2d_sliced_can_hardware_repeat; texture_class->transform_coords_to_gl = _cogl_texture_2d_sliced_transform_coords_to_gl; @@ -1238,8 +1229,8 @@ cogl_texture_2d_sliced_new_with_size (CoglContext *ctx, int height, int max_waste) { - CoglTextureLoader *loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_SIZE; + CoglTextureLoader *loader = + cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_SIZE); loader->src.sized.width = width; loader->src.sized.height = height; loader->src.sized.format = COGL_PIXEL_FORMAT_ANY; @@ -1260,8 +1251,7 @@ cogl_texture_2d_sliced_new_from_bitmap (CoglBitmap *bmp, g_return_val_if_fail (COGL_IS_BITMAP (bmp), NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_BITMAP; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_BITMAP); loader->src.bitmap.bitmap = g_object_ref (bmp); return _cogl_texture_2d_sliced_create_base (_cogl_bitmap_get_context (bmp), diff --git a/cogl/cogl/cogl-texture-2d.c b/cogl/cogl/cogl-texture-2d.c index 2821998e31c63d25182b8c95c4c89be556049679..9b2b6052adf48661d6b36c1070250f4b7e590d64 100644 --- a/cogl/cogl/cogl-texture-2d.c +++ b/cogl/cogl/cogl-texture-2d.c @@ -66,12 +66,10 @@ cogl_texture_2d_dispose (GObject *object) } void -_cogl_texture_2d_set_auto_mipmap (CoglTexture *tex, - gboolean value) +cogl_texture_2d_set_auto_mipmap (CoglTexture2D *tex, + gboolean value) { - CoglTexture2D *tex_2d = COGL_TEXTURE_2D (tex); - - tex_2d->auto_mipmap = value; + tex->auto_mipmap = value; } CoglTexture * @@ -87,7 +85,6 @@ _cogl_texture_2d_create_base (CoglContext *ctx, "height", height, "loader", loader, "format", internal_format, - "is-primitive", TRUE, NULL); CoglTextureDriverClass *tex_driver = COGL_TEXTURE_DRIVER_GET_CLASS (ctx->texture_driver); @@ -147,12 +144,6 @@ _cogl_texture_2d_copy_from_framebuffer (CoglTexture2D *tex_2d, tex_2d->mipmaps_dirty = TRUE; } -static int -_cogl_texture_2d_get_max_waste (CoglTexture *tex) -{ - return -1; -} - static gboolean _cogl_texture_2d_is_sliced (CoglTexture *tex) { @@ -350,7 +341,6 @@ cogl_texture_2d_class_init (CoglTexture2DClass *klass) texture_class->set_region = _cogl_texture_2d_set_region; texture_class->is_get_data_supported = _cogl_texture_2d_is_get_data_supported; texture_class->get_data = _cogl_texture_2d_get_data; - texture_class->get_max_waste = _cogl_texture_2d_get_max_waste; texture_class->is_sliced = _cogl_texture_2d_is_sliced; texture_class->can_hardware_repeat = _cogl_texture_2d_can_hardware_repeat; texture_class->transform_coords_to_gl = _cogl_texture_2d_transform_coords_to_gl; @@ -362,7 +352,6 @@ cogl_texture_2d_class_init (CoglTexture2DClass *klass) texture_class->gl_flush_legacy_texobj_wrap_modes = _cogl_texture_2d_gl_flush_legacy_texobj_wrap_modes; texture_class->get_format = _cogl_texture_2d_get_format; texture_class->get_gl_format = _cogl_texture_2d_get_gl_format; - texture_class->set_auto_mipmap = _cogl_texture_2d_set_auto_mipmap; } static void @@ -381,8 +370,7 @@ cogl_texture_2d_new_with_format (CoglContext *ctx, g_return_val_if_fail (width >= 1, NULL); g_return_val_if_fail (height >= 1, NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_SIZE; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_SIZE); loader->src.sized.width = width; loader->src.sized.height = height; loader->src.sized.format = format; @@ -400,8 +388,7 @@ cogl_texture_2d_new_with_size (CoglContext *ctx, g_return_val_if_fail (width >= 1, NULL); g_return_val_if_fail (height >= 1, NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_SIZE; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_SIZE); loader->src.sized.width = width; loader->src.sized.height = height; loader->src.sized.format = COGL_PIXEL_FORMAT_ANY; @@ -417,8 +404,7 @@ cogl_texture_2d_new_from_bitmap (CoglBitmap *bmp) g_return_val_if_fail (bmp != NULL, NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_BITMAP; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_BITMAP); loader->src.bitmap.bitmap = g_object_ref (bmp); return _cogl_texture_2d_create_base (_cogl_bitmap_get_context (bmp), @@ -494,8 +480,7 @@ cogl_texture_2d_new_from_egl_image (CoglContext *ctx, COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE), NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE); loader->src.egl_image.image = image; loader->src.egl_image.width = width; loader->src.egl_image.height = height; diff --git a/cogl/cogl/cogl-texture-2d.h b/cogl/cogl/cogl-texture-2d.h index 4a0361b336b4cc1fc3777a5d3c6c6a6a8f3f060b..bf4a80dceab9f398f5f749553ab7a0042eed0cd9 100644 --- a/cogl/cogl/cogl-texture-2d.h +++ b/cogl/cogl/cogl-texture-2d.h @@ -229,4 +229,20 @@ cogl_texture_2d_new_from_egl_image_external (CoglContext *ctx, #endif +/** + * cogl_texture_2d_set_auto_mipmap: + * @texture: A #CoglTexture2D + * @value: The new value for whether to auto mipmap + * + * Sets whether the texture will automatically update the smaller + * mipmap levels after any part of level 0 is updated. The update will + * only occur whenever the texture is used for drawing with a texture + * filter that requires the lower mipmap levels. An application should + * disable this if it wants to upload its own data for the other + * levels. By default auto mipmapping is enabled. + */ +COGL_EXPORT void +cogl_texture_2d_set_auto_mipmap (CoglTexture2D *texture, + gboolean value); + G_END_DECLS diff --git a/cogl/cogl/cogl-texture-private.h b/cogl/cogl/cogl-texture-private.h index e8e1f901e5ffe64d53b60bc3d47867700539e810..d0392e25e13d2e4c5efab5918c612386f905041d 100644 --- a/cogl/cogl/cogl-texture-private.h +++ b/cogl/cogl/cogl-texture-private.h @@ -152,8 +152,6 @@ struct _CoglTextureClass CoglTextureForeachCallback callback, void *user_data); - int (* get_max_waste) (CoglTexture *tex); - gboolean (* is_sliced) (CoglTexture *tex); gboolean (* can_hardware_repeat) (CoglTexture *tex); @@ -184,10 +182,6 @@ struct _CoglTextureClass CoglPixelFormat (* get_format) (CoglTexture *tex); GLenum (* get_gl_format) (CoglTexture *tex); - - /* Only needs to be implemented if is_primitive == TRUE */ - void (* set_auto_mipmap) (CoglTexture *texture, - gboolean value); }; gboolean @@ -302,7 +296,7 @@ _cogl_texture_set_allocated (CoglTexture *texture, int height); CoglTextureLoader * -_cogl_texture_create_loader (void); +cogl_texture_loader_new (CoglTextureSourceType type); void _cogl_texture_copy_internal_format (CoglTexture *src, diff --git a/cogl/cogl/cogl-texture.c b/cogl/cogl/cogl-texture.c index 6d6123aba7a51501a85a1a7bfde687d4544291f6..ce6362979c2f43c8124eb73a6b55fb04e4da4180 100644 --- a/cogl/cogl/cogl-texture.c +++ b/cogl/cogl/cogl-texture.c @@ -63,7 +63,6 @@ typedef struct _CoglTexturePrivate { CoglContext *context; - gboolean is_primitive; CoglTextureLoader *loader; GList *framebuffers; int max_level_set; @@ -90,7 +89,6 @@ enum PROP_HEIGHT, PROP_LOADER, PROP_FORMAT, - PROP_IS_PRIMITIVE, PROP_LAST }; @@ -98,35 +96,29 @@ enum static GParamSpec *obj_props[PROP_LAST]; static void -_cogl_texture_free_loader (CoglTexture *texture) +cogl_texture_loader_free (CoglTextureLoader *loader) { - CoglTexturePrivate *priv = - cogl_texture_get_instance_private (texture); - - if (priv->loader) + switch (loader->src_type) { - CoglTextureLoader *loader = priv->loader; - switch (loader->src_type) - { - case COGL_TEXTURE_SOURCE_TYPE_SIZE: - case COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE: - case COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE_EXTERNAL: - break; - case COGL_TEXTURE_SOURCE_TYPE_BITMAP: - g_object_unref (loader->src.bitmap.bitmap); - break; - } - g_free (loader); - priv->loader = NULL; + case COGL_TEXTURE_SOURCE_TYPE_SIZE: + case COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE: + case COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE_EXTERNAL: + break; + case COGL_TEXTURE_SOURCE_TYPE_BITMAP: + g_clear_object (&loader->src.bitmap.bitmap); + break; } + g_free (loader); } static void cogl_texture_dispose (GObject *object) { CoglTexture *texture = COGL_TEXTURE (object); + CoglTexturePrivate *priv = + cogl_texture_get_instance_private (texture); - _cogl_texture_free_loader (texture); + g_clear_pointer (&priv->loader, cogl_texture_loader_free); G_OBJECT_CLASS (cogl_texture_parent_class)->dispose (object); } @@ -177,10 +169,6 @@ cogl_texture_set_property (GObject *gobject, priv->premultiplied = TRUE; break; - case PROP_IS_PRIMITIVE: - priv->is_primitive = g_value_get_boolean (value); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); break; @@ -222,10 +210,6 @@ cogl_texture_class_init (CoglTextureClass *klass) COGL_PIXEL_FORMAT_ANY, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); - obj_props[PROP_IS_PRIMITIVE] = - g_param_spec_boolean ("is-primitive", NULL, NULL, - FALSE, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, PROP_LAST, @@ -251,9 +235,14 @@ cogl_texture_error_quark (void) } CoglTextureLoader * -_cogl_texture_create_loader (void) +cogl_texture_loader_new (CoglTextureSourceType src_type) { - return g_new0 (CoglTextureLoader, 1); + CoglTextureLoader *loader; + + loader = g_new0 (CoglTextureLoader, 1); + loader->src_type = src_type; + + return loader; } gboolean @@ -1157,7 +1146,7 @@ _cogl_texture_set_allocated (CoglTexture *texture, priv->height = height; priv->allocated = TRUE; - _cogl_texture_free_loader (texture); + g_clear_pointer (&priv->loader, cogl_texture_loader_free); } gboolean @@ -1385,17 +1374,3 @@ cogl_texture_set_max_level_set (CoglTexture *texture, cogl_texture_get_instance_private (texture); priv->max_level_set = max_level_set; } - -void -cogl_texture_set_auto_mipmap (CoglTexture *texture, - gboolean value) -{ - CoglTexturePrivate *priv; - g_return_if_fail (COGL_IS_TEXTURE (texture)); - priv = cogl_texture_get_instance_private (texture); - g_return_if_fail (priv->is_primitive); - - g_assert (COGL_TEXTURE_GET_CLASS (texture)->set_auto_mipmap != NULL); - - COGL_TEXTURE_GET_CLASS (texture)->set_auto_mipmap (texture, value); -} diff --git a/cogl/cogl/cogl-texture.h b/cogl/cogl/cogl-texture.h index 2ca2118d1163268e8a6a3dd3610c8c395512ed85..992dad8e86cc74e410127caecb9eaf49bc217feb 100644 --- a/cogl/cogl/cogl-texture.h +++ b/cogl/cogl/cogl-texture.h @@ -449,22 +449,6 @@ cogl_texture_allocate (CoglTexture *texture, COGL_EXPORT gboolean cogl_texture_is_get_data_supported (CoglTexture *texture); -/** - * cogl_texture_set_auto_mipmap: - * @texture: A #CoglTexture - * @value: The new value for whether to auto mipmap - * - * Sets whether the texture will automatically update the smaller - * mipmap levels after any part of level 0 is updated. The update will - * only occur whenever the texture is used for drawing with a texture - * filter that requires the lower mipmap levels. An application should - * disable this if it wants to upload its own data for the other - * levels. By default auto mipmapping is enabled. - */ -COGL_EXPORT void -cogl_texture_set_auto_mipmap (CoglTexture *texture, - gboolean value); - COGL_EXPORT CoglPixelFormat cogl_texture_get_format (CoglTexture *texture); diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c index e781a4063765a6112273ffbf1fc42f1ca4c665e3..da86b1c4b5b9de5981aa092ef1244b549c081a21 100644 --- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c +++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c @@ -91,8 +91,7 @@ cogl_texture_2d_new_from_egl_image_external (CoglContext *ctx, COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL), NULL); - loader = _cogl_texture_create_loader (); - loader->src_type = COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE_EXTERNAL; + loader = cogl_texture_loader_new (COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE_EXTERNAL); loader->src.egl_image_external.width = width; loader->src.egl_image_external.height = height; loader->src.egl_image_external.alloc = alloc; diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c index 8b8cfc436a153528061b7d0aef2722a9e47b7606..a46da545eac342b9233aab0c49ec0c5186910c6e 100644 --- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c +++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c @@ -793,15 +793,6 @@ _cogl_texture_pixmap_x11_get_data (CoglTexture *tex, return cogl_texture_get_data (child_tex, format, rowstride, data); } -static int -_cogl_texture_pixmap_x11_get_max_waste (CoglTexture *tex) -{ - CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); - CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap); - - return COGL_TEXTURE_GET_CLASS (child_tex)->get_max_waste (child_tex); -} - static void _cogl_texture_pixmap_x11_foreach_sub_texture_in_region (CoglTexture *tex, @@ -965,7 +956,6 @@ cogl_texture_pixmap_x11_class_init (CoglTexturePixmapX11Class *klass) texture_class->allocate = _cogl_texture_pixmap_x11_allocate; texture_class->set_region = _cogl_texture_pixmap_x11_set_region; texture_class->get_data = _cogl_texture_pixmap_x11_get_data; - texture_class->get_max_waste = _cogl_texture_pixmap_x11_get_max_waste; texture_class->foreach_sub_texture_in_region = _cogl_texture_pixmap_x11_foreach_sub_texture_in_region; texture_class->is_sliced = _cogl_texture_pixmap_x11_is_sliced; texture_class->can_hardware_repeat = _cogl_texture_pixmap_x11_can_hardware_repeat; diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c index ccc571f2708ef247f3c2890049029f6f58601cb9..581b4db5e2ba84f09216b47303de5eb746747ddf 100644 --- a/src/backends/meta-screen-cast-stream-src.c +++ b/src/backends/meta-screen-cast-stream-src.c @@ -388,7 +388,7 @@ draw_cursor_sprite_via_offscreen (MetaScreenCastStreamSrc *src, bitmap_texture = cogl_texture_2d_new_with_size (cogl_context, bitmap_width, bitmap_height); - cogl_texture_set_auto_mipmap (bitmap_texture, FALSE); + cogl_texture_2d_set_auto_mipmap (COGL_TEXTURE_2D (bitmap_texture), FALSE); if (!cogl_texture_allocate (bitmap_texture, error)) { g_object_unref (bitmap_texture); diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index b6d55a13d00bfc72cd385637a13c8f9152d907f0..6a421b01f553eca36d7e252ebd54ab51196eeb47 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -1300,7 +1300,7 @@ meta_renderer_native_create_offscreen (MetaRendererNative *renderer_native, view_width, view_height, format); } - cogl_texture_set_auto_mipmap (tex, FALSE); + cogl_texture_2d_set_auto_mipmap (COGL_TEXTURE_2D (tex), FALSE); if (!cogl_texture_allocate (tex, error)) { diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index e2c23c9576805432fa393afa79171c9be33188c3..923f9bdd9cc91d9b70ed1ae89ce2c9300ed1237e 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1585,7 +1585,7 @@ create_framebuffer_from_window_actor (MetaWindowActor *self, if (!texture) return NULL; - cogl_texture_set_auto_mipmap (texture, FALSE); + cogl_texture_2d_set_auto_mipmap (COGL_TEXTURE_2D (texture), FALSE); offscreen = cogl_offscreen_new_with_texture (texture); framebuffer = COGL_FRAMEBUFFER (offscreen); diff --git a/src/tests/cogl-test-utils.c b/src/tests/cogl-test-utils.c index 8910290c5075cd1e9cdb96b9b13aa908f47b6232..6749688ec0c45e8fca92f47fad85b6c372721899 100644 --- a/src/tests/cogl-test-utils.c +++ b/src/tests/cogl-test-utils.c @@ -193,7 +193,7 @@ set_auto_mipmap_cb (CoglTexture *sub_texture, const float *meta_coords, void *user_data) { - cogl_texture_set_auto_mipmap (sub_texture, FALSE); + cogl_texture_2d_set_auto_mipmap (COGL_TEXTURE_2D (sub_texture), FALSE); } CoglTexture *