Port to cogl_texture_2d_new_from_data

This commit is contained in:
Jasper St. Pierre
2014-08-07 14:46:07 -04:00
parent 6f00d81abf
commit 0810ab62db
3 changed files with 29 additions and 26 deletions

View File

@@ -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);