Port to cogl_texture_2d_new_from_data
This commit is contained in:
@@ -242,6 +242,8 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
|
||||
void *datap,
|
||||
GError **error)
|
||||
{
|
||||
ClutterBackend *backend = clutter_get_default_backend ();
|
||||
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
||||
CreateFadedIconData *data = datap;
|
||||
ShellApp *app;
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -333,13 +335,11 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
|
||||
}
|
||||
}
|
||||
|
||||
texture = cogl_texture_new_from_data (width,
|
||||
height,
|
||||
COGL_TEXTURE_NONE,
|
||||
have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
rowstride,
|
||||
pixels);
|
||||
texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
|
||||
have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
||||
rowstride,
|
||||
pixels,
|
||||
NULL));
|
||||
g_free (pixels);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
|
Reference in New Issue
Block a user