leigh123linux pushed to cinnamon (f21). "update to 2.4.8"
notifications at fedoraproject.org
notifications at fedoraproject.org
Sun Apr 26 13:32:18 UTC 2015
>From 54083015a4d6491237a00620a508d7af1a5eb381 Mon Sep 17 00:00:00 2001
From: leigh123linux <leigh123linux at googlemail.com>
Date: Sun, 26 Apr 2015 14:27:39 +0100
Subject: update to 2.4.8
diff --git a/.gitignore b/.gitignore
index de98147..3083762 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,3 +48,4 @@
/Cinnamon-2.4.5.tar.gz
/Cinnamon-2.4.6.tar.gz
/Cinnamon-2.4.7.tar.gz
+/Cinnamon-2.4.8.tar.gz
diff --git a/0001-Add-wrapper-for-cogl-texture-functions-to-implement.patch b/0001-Add-wrapper-for-cogl-texture-functions-to-implement.patch
new file mode 100644
index 0000000..cbd8925
--- /dev/null
+++ b/0001-Add-wrapper-for-cogl-texture-functions-to-implement.patch
@@ -0,0 +1,1326 @@
+From 110f57ea080e2b738d9bb264b72f6c76d12f1942 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster at gmail.com>
+Date: Sun, 12 Apr 2015 13:04:01 -0400
+Subject: [PATCH] Add wrapper for cogl texture functions to implement this
+ (reverted) commit:
+
+https://github.com/linuxmint/Cinnamon/commit/118527f9f0f7a48c5df38ffc136fea90014d2b2e
+
+in a more compatible manner. If the new functions are supported, use them, otherwise
+just use the old ones.
+---
+ src/Makefile-st.am | 12 ++-
+ src/Makefile.am | 8 +-
+ src/cinnamon-app.c | 13 ++-
+ src/cinnamon-recorder.c | 13 +--
+ src/cinnamon-xfixes-cursor.c | 15 ++--
+ src/st/st-background-effect.c | 152 ++++-------------------------------
+ src/st/st-background-effect.h | 2 +-
+ src/st/st-cogl-wrapper.c | 141 +++++++++++++++++++++++++++++++++
+ src/st/st-cogl-wrapper.h | 33 ++++++++
+ src/st/st-drawing-area.c | 7 +-
+ src/st/st-private.c | 32 ++++----
+ src/st/st-scroll-view-fade.c | 8 +-
+ src/st/st-texture-cache.c | 162 +++++++++++++++++++-------------------
+ src/st/st-texture-cache.h | 18 ++---
+ src/st/st-theme-node-drawing.c | 36 +++++----
+ src/st/st-theme-node-transition.c | 15 ++--
+ 16 files changed, 368 insertions(+), 299 deletions(-)
+ create mode 100644 src/st/st-cogl-wrapper.c
+ create mode 100644 src/st/st-cogl-wrapper.h
+
+diff --git a/src/Makefile-st.am b/src/Makefile-st.am
+index 55ac352..e2387fb 100644
+--- a/src/Makefile-st.am
++++ b/src/Makefile-st.am
+@@ -5,6 +5,8 @@ st_cflags = \
+ -DG_DISABLE_DEPRECATED \
+ -DG_LOG_DOMAIN=\"St\" \
+ -DST_COMPILATION \
++ -DCLUTTER_ENABLE_EXPERIMENTAL_API \
++ -DCOGL_ENABLE_EXPERIMENTAL_API \
+ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
+ $(ST_CFLAGS) \
+ $(NULL)
+@@ -50,7 +52,7 @@ st-enum-types.h: stamp-st-enum-types.h Makefile
+ stamp-st-enum-types.h: $(source_h) $(srcdir)/st/st-enum-types.h.in $(st_source_h)
+ $(AM_V_GEN) ( \
+ $(GLIB_MKENUMS) \
+- --template $(srcdir)/st/st-enum-types.h.in \
++ --template $(srcdir)/st/st-enum-types.h.in \
+ $(addprefix $(srcdir)/, $(st_source_h)) ) >> $@.tmp && \
+ (cmp -s $@.tmp st-enum-types.h || cp $@.tmp st-enum-types.h) && \
+ rm -f $@.tmp && \
+@@ -59,7 +61,7 @@ stamp-st-enum-types.h: $(source_h) $(srcdir)/st/st-enum-types.h.in $(st_source_h
+ st-enum-types.c: stamp-st-enum-types.h $(srcdir)/st/st-enum-types.c.in
+ $(AM_V_GEN) ( \
+ $(GLIB_MKENUMS) \
+- --template $(srcdir)/st/st-enum-types.c.in \
++ --template $(srcdir)/st/st-enum-types.c.in \
+ $(addprefix $(srcdir)/,$(st_source_h)) ) >> $@.tmp && \
+ cp $@.tmp $@ && \
+ rm -f $@.tmp
+@@ -74,6 +76,7 @@ st_source_h = \
+ st/st-box-layout-child.h \
+ st/st-button.h \
+ st/st-clipboard.h \
++ st/st-cogl-wrapper.h \
+ st/st-container.h \
+ st/st-drawing-area.h \
+ st/st-entry.h \
+@@ -84,7 +87,7 @@ st_source_h = \
+ st/st-im-text.h \
+ st/st-label.h \
+ st/st-overflow-box.h \
+- st/st-polygon.h \
++ st/st-polygon.h \
+ st/st-private.h \
+ st/st-scrollable.h \
+ st/st-scroll-bar.h \
+@@ -133,6 +136,7 @@ st_source_c = \
+ st/st-box-layout-child.c \
+ st/st-button.c \
+ st/st-clipboard.c \
++ st/st-cogl-wrapper.c \
+ st/st-container.c \
+ st/st-drawing-area.c \
+ st/st-entry.c \
+@@ -143,7 +147,7 @@ st_source_c = \
+ st/st-im-text.c \
+ st/st-label.c \
+ st/st-overflow-box.c \
+- st/st-polygon.c \
++ st/st-polygon.c \
+ st/st-private.c \
+ st/st-scrollable.c \
+ st/st-scroll-bar.c \
+diff --git a/src/Makefile.am b/src/Makefile.am
+index c0c6e7e..55352e1 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -80,6 +80,8 @@ include Makefile-hotplug-sniffer.am
+ cinnamon_cflags = \
+ $(CINNAMON_CFLAGS) \
+ -I$(srcdir)/tray \
++ -DCLUTTER_ENABLE_EXPERIMENTAL_API \
++ -DCOGL_ENABLE_EXPERIMENTAL_API \
+ -DVERSION=\"$(VERSION)\" \
+ -DLOCALEDIR=\"$(datadir)/locale\" \
+ -DDATADIR=\"$(datadir)\" \
+@@ -195,13 +197,17 @@ cinnamon_recorder_non_gir_sources = \
+ cinnamon-recorder-src.c \
+ cinnamon-recorder-src.h
+
++cinnamon_recorder_LDADD = libst-1.0.la
++
+ if BUILD_RECORDER
+ libcinnamon_la_SOURCES += $(cinnamon_recorder_sources) $(cinnamon_recorder_non_gir_sources)
+
+ noinst_PROGRAMS += test-recorder
+
+ test_recorder_CPPFLAGS = $(TEST_CINNAMON_RECORDER_CFLAGS)
+-test_recorder_LDADD = $(TEST_CINNAMON_RECORDER_LIBS)
++test_recorder_LDADD = $(TEST_CINNAMON_RECORDER_LIBS) \
++ libst-1.0.la
++
+
+ test_recorder_SOURCES = \
+ $(cinnamon_recorder_sources) $(cinnamon_recorder_non_gir_sources) \
+diff --git a/src/cinnamon-app.c b/src/cinnamon-app.c
+index ec884cc..8884f04 100644
+--- a/src/cinnamon-app.c
++++ b/src/cinnamon-app.c
+@@ -288,13 +288,12 @@ cinnamon_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 = st_cogl_texture_new_from_data_wrapper (width, height,
++ COGL_TEXTURE_NONE,
++ have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
++ COGL_PIXEL_FORMAT_ANY,
++ rowstride, pixels);
++
+ g_free (pixels);
+ g_object_unref (pixbuf);
+
+diff --git a/src/cinnamon-recorder.c b/src/cinnamon-recorder.c
+index 0899bb8..7d1b321 100644
+--- a/src/cinnamon-recorder.c
++++ b/src/cinnamon-recorder.c
+@@ -16,6 +16,7 @@
+
+ #include <clutter/x11/clutter-x11.h>
+ #include <X11/extensions/Xfixes.h>
++#include "st.h"
+
+ typedef enum {
+ RECORDER_STATE_CLOSED,
+@@ -202,12 +203,12 @@ create_recording_icon (void)
+
+ cairo_destroy (cr);
+
+- texture = cogl_texture_new_from_data (32, 32,
+- COGL_TEXTURE_NONE,
+- CLUTTER_CAIRO_FORMAT_ARGB32,
+- COGL_PIXEL_FORMAT_ANY,
+- cairo_image_surface_get_stride (surface),
+- cairo_image_surface_get_data (surface));
++ texture = st_cogl_texture_new_from_data_wrapper (32, 32,
++ COGL_TEXTURE_NONE,
++ CLUTTER_CAIRO_FORMAT_ARGB32,
++ COGL_PIXEL_FORMAT_ANY,
++ cairo_image_surface_get_stride (surface),
++ cairo_image_surface_get_data (surface));
+ cairo_surface_destroy (surface);
+
+ return texture;
+diff --git a/src/cinnamon-xfixes-cursor.c b/src/cinnamon-xfixes-cursor.c
+index c0360e2..cf39c5c 100644
+--- a/src/cinnamon-xfixes-cursor.c
++++ b/src/cinnamon-xfixes-cursor.c
+@@ -4,6 +4,8 @@
+
+ #include "cinnamon-xfixes-cursor.h"
+
++#include "st.h"
++
+ #include <clutter/x11/clutter-x11.h>
+ #include <X11/extensions/Xfixes.h>
+
+@@ -231,13 +233,12 @@ xfixes_cursor_reset_image (CinnamonXFixesCursor *xfixes_cursor)
+ free_cursor_data = TRUE;
+ }
+
+- sprite = cogl_texture_new_from_data (cursor_image->width,
+- cursor_image->height,
+- COGL_TEXTURE_NONE,
+- CLUTTER_CAIRO_FORMAT_ARGB32,
+- COGL_PIXEL_FORMAT_ANY,
+- cursor_image->width * 4, /* stride */
+- cursor_data);
++ sprite = st_cogl_texture_new_from_data_wrapper (cursor_image->width, cursor_image->height,
++ COGL_TEXTURE_NONE,
++ CLUTTER_CAIRO_FORMAT_ARGB32,
++ COGL_PIXEL_FORMAT_ANY,
++ cursor_image->width * 4,
++ cursor_data);
+
+ if (free_cursor_data)
+ g_free (cursor_data);
+diff --git a/src/st/st-background-effect.c b/src/st/st-background-effect.c
+index 2141f74..fab1abf 100644
+--- a/src/st/st-background-effect.c
++++ b/src/st/st-background-effect.c
+@@ -1,54 +1,14 @@
+ #include "st-background-effect.h"
++#include "st-cogl-wrapper.h"
+ #define ST_BACKGROUND_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_BACKGROUND_EFFECT, StBackgroundEffectClass))
+ #define ST_IS_BACKGROUND_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_BACKGROUND_EFFECT))
+ #define ST_BACKGROUND_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_BACKGROUND_EFFECT, StBackgroundEffectClass))
+
+ G_DEFINE_TYPE (StBackgroundEffect, st_background_effect, CLUTTER_TYPE_OFFSCREEN_EFFECT);
+
+-#define CLUTTER_ENABLE_EXPERIMENTAL_API
+-
+-#include "cogl/cogl.h"
+ #include <gio/gio.h>
+ #include <math.h>
+
+-typedef enum
+-{
+- COGL_PIPELINE_CULL_FACE_MODE_NONE,
+- COGL_PIPELINE_CULL_FACE_MODE_FRONT,
+- COGL_PIPELINE_CULL_FACE_MODE_BACK,
+- COGL_PIPELINE_CULL_FACE_MODE_BOTH
+-} CoglPipelineCullFaceMode;
+-
+-typedef enum
+-{
+- COGL_PIPELINE_FILTER_NEAREST = 0x2600,
+- COGL_PIPELINE_FILTER_LINEAR = 0x2601,
+- COGL_PIPELINE_FILTER_NEAREST_MIPMAP_NEAREST = 0x2700,
+- COGL_PIPELINE_FILTER_LINEAR_MIPMAP_NEAREST = 0x2701,
+- COGL_PIPELINE_FILTER_NEAREST_MIPMAP_LINEAR = 0x2702,
+- COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR = 0x2703
+-} CoglPipelineFilter;
+-
+-typedef enum
+-{
+- COGL_PIPELINE_WRAP_MODE_REPEAT = 0x2901,
+- COGL_PIPELINE_WRAP_MODE_MIRRORED_REPEAT = 0x8370,
+- COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE = 0x812F,
+- COGL_PIPELINE_WRAP_MODE_AUTOMATIC = 0x0207
+-} CoglPipelineWrapMode;
+-
+-typedef enum
+-{
+- COGL_PIPELINE_ALPHA_FUNC_NEVER = 0x0200,
+- COGL_PIPELINE_ALPHA_FUNC_LESS = 0x0201,
+- COGL_PIPELINE_ALPHA_FUNC_EQUAL = 0x0202,
+- COGL_PIPELINE_ALPHA_FUNC_LEQUAL = 0x0203,
+- COGL_PIPELINE_ALPHA_FUNC_GREATER = 0x0204,
+- COGL_PIPELINE_ALPHA_FUNC_NOTEQUAL = 0x0205,
+- COGL_PIPELINE_ALPHA_FUNC_GEQUAL = 0x0206,
+- COGL_PIPELINE_ALPHA_FUNC_ALWAYS = 0x0207
+-} CoglPipelineAlphaFunc;
+-
+ enum
+ {
+ PROP_0,
+@@ -60,82 +20,6 @@ enum
+
+ static GParamSpec *obj_props[PROP_LAST];
+
+-extern void
+-cogl_pipeline_set_uniform_float (CoglPipeline *pipeline,
+- int uniform_location,
+- int n_components,
+- int count,
+- const float *value);
+-extern void
+-cogl_pipeline_set_layer_texture (CoglPipeline *pipeline,
+- int layer_index,
+- CoglTexture *texture);
+-extern void
+-cogl_pipeline_set_color4ub (CoglPipeline *pipeline,
+- guint8 red,
+- guint8 green,
+- guint8 blue,
+- guint8 alpha);
+-
+-extern CoglContext *clutter_backend_get_cogl_context (ClutterBackend *backend);
+-
+-extern CoglPipeline *cogl_pipeline_new (CoglContext *context);
+-
+-extern CoglPipeline *cogl_pipeline_copy (CoglPipeline *source);
+-
+-extern void
+-cogl_pipeline_add_layer_snippet (CoglPipeline *pipeline,
+- int layer,
+- CoglSnippet *snippet);
+-
+-extern void
+-cogl_pipeline_set_layer_wrap_mode (CoglPipeline *pipeline,
+- int layer_index,
+- CoglPipelineWrapMode mode);
+-
+-extern void
+-cogl_pipeline_set_cull_face_mode (CoglPipeline *pipeline,
+- CoglPipelineCullFaceMode cull_face_mode);
+-
+-extern void
+-cogl_pipeline_set_layer_filters (CoglPipeline *pipeline,
+- int layer_index,
+- CoglPipelineFilter min_filter,
+- CoglPipelineFilter mag_filter);
+-
+-extern void
+-cogl_pipeline_set_layer_null_texture (CoglPipeline *pipeline,
+- int layer_index,
+- CoglTextureType texure_type);
+-
+-extern int
+-cogl_pipeline_get_uniform_location (CoglPipeline *pipeline,
+- const char *uniform_name);
+-
+-extern void
+-cogl_pipeline_set_alpha_test_function (CoglPipeline *pipeline,
+- CoglPipelineAlphaFunc alpha_func,
+- float alpha_reference);
+-extern void
+-cogl_pipeline_set_color_mask (CoglPipeline *pipeline,
+- CoglColorMask color_mask);
+-
+-extern gboolean
+-cogl_pipeline_set_blend (CoglPipeline *pipeline,
+- const char *blend_string,
+- GError **error);
+-
+-extern void
+-cogl_pipeline_set_uniform_1i (CoglPipeline *pipeline,
+- int uniform_location,
+- int value);
+-
+-extern gboolean
+-cogl_pipeline_set_layer_combine (CoglPipeline *pipeline,
+- int layer_index,
+- const char *blend_string,
+- GError **error);
+-
+ static const gchar *box_blur_glsl_declarations =
+ "uniform vec3 pixel_step;\n"
+ "uniform vec2 bump_step;\n"
+@@ -276,13 +160,13 @@ st_background_effect_pre_paint (ClutterEffect *effect)
+ self->bg_texture = NULL;
+ }
+
+- self->bg_texture = cogl_texture_new_from_data (self->bg_width_i,
+- self->bg_height_i,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE,
+- rowstride,
+- data);
++ self->bg_texture = st_cogl_texture_new_from_data_wrapper (self->bg_width_i,
++ self->bg_height_i,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE,
++ rowstride,
++ data);
+
+ g_free (data);
+
+@@ -351,9 +235,9 @@ st_background_effect_pre_paint (ClutterEffect *effect)
+ self->bg_sub_texture = NULL;
+ }
+
+- self->bg_sub_texture = cogl_texture_new_with_size (self->bg_width_i, self->bg_height_i,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE);
++ self->bg_sub_texture = st_cogl_texture_new_with_size_wrapper (self->bg_width_i, self->bg_height_i,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE);
+
+ cogl_pipeline_set_layer_texture (self->pipeline0, 0, self->bg_texture);
+
+@@ -540,10 +424,9 @@ st_background_effect_set_property (GObject *gobject,
+ GFile *file = g_file_new_for_path (g_strdup (self->bumpmap_location));
+ if (g_file_query_exists (file, NULL))
+ {
+- self->bg_bumpmap = cogl_texture_new_from_file (self->bumpmap_location,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE,
+- NULL);
++ self->bg_bumpmap = st_cogl_texture_new_from_file_wrapper (self->bumpmap_location,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE);
+ }
+
+ g_object_unref (file);
+@@ -791,10 +674,9 @@ st_background_effect_init (StBackgroundEffect *self)
+
+ self->bumpmap_location = "/usr/share/cinnamon/bumpmaps/frost.png";
+
+- self->bg_bumpmap = cogl_texture_new_from_file (self->bumpmap_location,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE,
+- NULL);
++ self->bg_bumpmap = st_cogl_texture_new_from_file_wrapper (self->bumpmap_location,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE);
+ if (self->bg_bumpmap != NULL)
+ {
+ self->bumptex_width_i = cogl_texture_get_width (self->bg_bumpmap);
+diff --git a/src/st/st-background-effect.h b/src/st/st-background-effect.h
+index f6d063b..3dfe1cd 100644
+--- a/src/st/st-background-effect.h
++++ b/src/st/st-background-effect.h
+@@ -65,7 +65,7 @@ struct _StBackgroundEffectClass
+
+ GType st_background_effect_get_type (void) G_GNUC_CONST;
+
+-ClutterEffect *st_background_effect_new ();
++ClutterEffect *st_background_effect_new (void);
+
+ G_END_DECLS
+ #endif /* __ST_BACKGROUND_EFFECT_H__ */
+diff --git a/src/st/st-cogl-wrapper.c b/src/st/st-cogl-wrapper.c
+new file mode 100644
+index 0000000..b7567e8
+--- /dev/null
++++ b/src/st/st-cogl-wrapper.c
+@@ -0,0 +1,141 @@
++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
++/*
++ * st-cogl-wrapper.c: compatibility wrappers for various cogl api calls
++ *
++ */
++
++#include "st-cogl-wrapper.h"
++
++static CoglContext *cogl_context = NULL;
++static gboolean supports_npot = FALSE;
++
++inline static gboolean
++hardware_supports_npot_sizes (void)
++{
++ if (cogl_context != NULL)
++ return supports_npot;
++
++ ClutterBackend *backend = clutter_get_default_backend ();
++ cogl_context = clutter_backend_get_cogl_context (backend);
++ supports_npot = cogl_has_feature (cogl_context, COGL_FEATURE_ID_TEXTURE_NPOT);
++
++ g_message ("cogl npot texture sizes %s", supports_npot ? "SUPPORTED" : "NOT supported");
++
++ return supports_npot;
++}
++
++/**
++ * st_cogl_texture_new_from_data_wrapper: (skip)
++ *
++ * Decides whether to use the newer (apparently safer)
++ * cogl_texture_2d_new_from_data or the older cogl_texture_new_from_data
++ * depending on if the GPU supports it.
++ */
++
++CoglTexture *
++st_cogl_texture_new_from_data_wrapper (int width,
++ int height,
++ CoglTextureFlags flags,
++ CoglPixelFormat format,
++ CoglPixelFormat internal_format,
++ int rowstride,
++ const uint8_t *data)
++{
++ CoglTexture *texture = NULL;
++
++ if (hardware_supports_npot_sizes ())
++ {
++ texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (cogl_context, width, height,
++ format,
++#if COGL_VERSION < COGL_VERSION_ENCODE (1, 18, 0)
++ COGL_PIXEL_FORMAT_ANY,
++#endif
++ rowstride,
++ data,
++ NULL));
++ }
++ else
++ {
++ texture = cogl_texture_new_from_data (width,
++ height,
++ flags,
++ format,
++ internal_format,
++ rowstride,
++ data);
++ }
++
++ return texture;
++}
++
++/**
++ * st_cogl_texture_new_from_file_wrapper: (skip)
++ *
++ * Decides whether to use the newer (apparently safer)
++ * cogl_texture_2d_new_from_file or the older cogl_texture_new_from_file
++ * depending on if the GPU supports it.
++ */
++
++CoglTexture *
++st_cogl_texture_new_from_file_wrapper (const char *filename,
++ CoglTextureFlags flags,
++ CoglPixelFormat internal_format)
++{
++ CoglTexture *texture = NULL;
++
++ if (hardware_supports_npot_sizes ())
++ {
++ texture = COGL_TEXTURE (cogl_texture_2d_new_from_file (cogl_context,
++ filename,
++#if COGL_VERSION < COGL_VERSION_ENCODE (1, 18, 0)
++ COGL_PIXEL_FORMAT_ANY,
++#endif
++ NULL));
++ }
++ else
++ {
++ texture = cogl_texture_new_from_file (filename,
++ flags,
++ internal_format,
++ NULL);
++ }
++
++ return texture;
++}
++
++/**
++ * st_cogl_texture_new_with_size_wrapper: (skip)
++ *
++ * Decides whether to use the newer (apparently safer)
++ * cogl_texture_2d_new_with_size or the older cogl_texture_new_with_size
++ * depending on if the GPU supports it.
++ */
++
++CoglTexture *
++st_cogl_texture_new_with_size_wrapper (int width,
++ int height,
++ CoglTextureFlags flags,
++ CoglPixelFormat internal_format)
++{
++ CoglTexture *texture = NULL;
++
++ if (hardware_supports_npot_sizes ())
++ {
++ texture = COGL_TEXTURE (cogl_texture_2d_new_with_size (cogl_context,
++ width,
++ height
++#if COGL_VERSION < COGL_VERSION_ENCODE (1, 18, 0)
++ ,CLUTTER_CAIRO_FORMAT_ARGB32
++#endif
++ ));
++ }
++ else
++ {
++ texture = cogl_texture_new_with_size (width, height,
++ flags,
++ internal_format);
++ }
++
++ return texture;
++}
++
+diff --git a/src/st/st-cogl-wrapper.h b/src/st/st-cogl-wrapper.h
+new file mode 100644
+index 0000000..b889ad6
+--- /dev/null
++++ b/src/st/st-cogl-wrapper.h
+@@ -0,0 +1,33 @@
++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
++/*
++ * st-cogl-wrapper.h: compatibility wrappers for various cogl api calls
++ *
++ */
++
++#ifndef __ST_COGL_WRAPPER_H__
++#define __ST_COGL_WRAPPER_H__
++
++#include <clutter/clutter.h>
++
++G_BEGIN_DECLS
++
++CoglTexture * st_cogl_texture_new_from_data_wrapper (int width,
++ int height,
++ CoglTextureFlags flags,
++ CoglPixelFormat format,
++ CoglPixelFormat internal_format,
++ int rowstride,
++ const uint8_t *data);
++
++CoglTexture * st_cogl_texture_new_from_file_wrapper (const char *filename,
++ CoglTextureFlags flags,
++ CoglPixelFormat internal_format);
++
++CoglTexture * st_cogl_texture_new_with_size_wrapper (int width,
++ int height,
++ CoglTextureFlags flags,
++ CoglPixelFormat internal_format);
++
++G_END_DECLS
++
++#endif /* __ST_COGL_WRAPPER_H__ */
+diff --git a/src/st/st-drawing-area.c b/src/st/st-drawing-area.c
+index 2b904e2..4e1bfe2 100644
+--- a/src/st/st-drawing-area.c
++++ b/src/st/st-drawing-area.c
+@@ -33,6 +33,7 @@
+ */
+
+ #include "st-drawing-area.h"
++#include "st-cogl-wrapper.h"
+
+ #include <cairo.h>
+
+@@ -111,9 +112,9 @@ st_drawing_area_paint (ClutterActor *self)
+ {
+ if (priv->texture == COGL_INVALID_HANDLE)
+ {
+- priv->texture = cogl_texture_new_with_size (width, height,
+- COGL_TEXTURE_NONE,
+- CLUTTER_CAIRO_FORMAT_ARGB32);
++ priv->texture = st_cogl_texture_new_with_size_wrapper (width, height,
++ COGL_TEXTURE_NONE,
++ CLUTTER_CAIRO_FORMAT_ARGB32);
+ priv->needs_repaint = TRUE;
+ }
+
+diff --git a/src/st/st-private.c b/src/st/st-private.c
+index 21ca09a..00656e5 100644
+--- a/src/st/st-private.c
++++ b/src/st/st-private.c
+@@ -23,6 +23,7 @@
+ #include <string.h>
+
+ #include "st-private.h"
++#include "st-cogl-wrapper.h"
+
+ /**
+ * _st_actor_get_preferred_width:
+@@ -368,12 +369,11 @@ _st_create_texture_material (CoglHandle src_texture)
+ static const guint8 white_pixel[] = { 0xff, 0xff, 0xff, 0xff };
+ CoglHandle dummy_texture;
+
+- dummy_texture =
+- cogl_texture_new_from_data (1, 1,
+- COGL_TEXTURE_NONE,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE,
+- COGL_PIXEL_FORMAT_ANY,
+- 4, white_pixel);
++ dummy_texture = st_cogl_texture_new_from_data_wrapper (1, 1,
++ COGL_TEXTURE_NONE,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE,
++ COGL_PIXEL_FORMAT_ANY,
++ 4, white_pixel);
+
+ texture_material_template = cogl_material_new ();
+ cogl_material_set_layer (texture_material_template, 0, dummy_texture);
+@@ -557,13 +557,12 @@ _st_create_shadow_material (StShadow *shadow_spec,
+ &width_out, &height_out, &rowstride_out);
+ g_free (pixels_in);
+
+- texture = cogl_texture_new_from_data (width_out,
+- height_out,
+- COGL_TEXTURE_NONE,
+- COGL_PIXEL_FORMAT_A_8,
+- COGL_PIXEL_FORMAT_A_8,
+- rowstride_out,
+- pixels_out);
++ texture = st_cogl_texture_new_from_data_wrapper (width_out, height_out,
++ COGL_TEXTURE_NONE,
++ COGL_PIXEL_FORMAT_A_8,
++ COGL_PIXEL_FORMAT_A_8,
++ rowstride_out,
++ pixels_out);
+
+ g_free (pixels_out);
+
+@@ -614,10 +613,9 @@ _st_create_shadow_material_from_actor (StShadow *shadow_spec,
+ if (width == 0 || height == 0)
+ return COGL_INVALID_HANDLE;
+
+- buffer = cogl_texture_new_with_size (width,
+- height,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_ANY);
++ buffer = st_cogl_texture_new_with_size_wrapper (width, height,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_ANY);
+
+ if (buffer == COGL_INVALID_HANDLE)
+ return COGL_INVALID_HANDLE;
+diff --git a/src/st/st-scroll-view-fade.c b/src/st/st-scroll-view-fade.c
+index 404d3e5..ded3d60 100644
+--- a/src/st/st-scroll-view-fade.c
++++ b/src/st/st-scroll-view-fade.c
+@@ -29,6 +29,7 @@
+ #include "st-theme-node.h"
+ #include "st-scroll-bar.h"
+ #include "st-scrollable.h"
++#include "st-cogl-wrapper.h"
+
+ #include <clutter/clutter.h>
+ #include <cogl/cogl.h>
+@@ -170,10 +171,9 @@ st_scroll_view_fade_create_texture (ClutterOffscreenEffect *effect,
+ gfloat min_width,
+ gfloat min_height)
+ {
+- return cogl_texture_new_with_size (min_width,
+- min_height,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_RGBA_8888_PRE);
++ return st_cogl_texture_new_with_size_wrapper (min_width, min_height,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_RGBA_8888_PRE);
+ }
+
+ static void
+diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
+index 41255eb..fd8903f 100644
+--- a/src/st/st-texture-cache.c
++++ b/src/st/st-texture-cache.c
+@@ -23,6 +23,7 @@
+
+ #include "st-texture-cache.h"
+ #include "st-private.h"
++#include "st-cogl-wrapper.h"
+ #include <gtk/gtk.h>
+ #include <string.h>
+ #include <glib.h>
+@@ -68,7 +69,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
+ G_DEFINE_TYPE(StTextureCache, st_texture_cache, G_TYPE_OBJECT);
+
+ /* We want to preserve the aspect ratio by default, also the default
+- * material for an empty texture is full opacity white, which we
++ * pipeline for an empty texture is full opacity white, which we
+ * definitely don't want. Skip that by setting 0 opacity.
+ */
+ static ClutterTexture *
+@@ -81,7 +82,7 @@ create_default_texture (void)
+
+ /* Reverse the opacity we added while loading */
+ static void
+-set_texture_cogl_texture (ClutterTexture *clutter_texture, CoglHandle cogl_texture)
++set_texture_cogl_texture (ClutterTexture *clutter_texture, CoglTexture *cogl_texture)
+ {
+ clutter_texture_set_cogl_texture (clutter_texture, cogl_texture);
+ g_object_set (clutter_texture, "opacity", 255, NULL);
+@@ -166,7 +167,7 @@ st_texture_cache_init (StTextureCache *self)
+ G_CALLBACK (on_icon_theme_changed), self);
+
+ self->priv->keyed_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
+- g_free, cogl_handle_unref);
++ g_free, cogl_object_unref);
+ self->priv->outstanding_requests = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, NULL);
+ self->priv->file_monitors = g_hash_table_new_full (g_str_hash, g_str_equal,
+@@ -561,13 +562,13 @@ load_pixbuf_async_finish (StTextureCache *cache, GAsyncResult *result, GError **
+ return g_simple_async_result_get_op_res_gpointer (simple);
+ }
+
+-static CoglHandle
+-data_to_cogl_handle (const guchar *data,
+- gboolean has_alpha,
+- int width,
+- int height,
+- int rowstride,
+- gboolean add_padding)
++static CoglTexture *
++data_to_cogl_texture (const guchar *data,
++ gboolean has_alpha,
++ int width,
++ int height,
++ int rowstride,
++ gboolean add_padding)
+ {
+ CoglHandle texture, offscreen;
+ CoglColor clear_color;
+@@ -577,17 +578,15 @@ data_to_cogl_handle (const guchar *data,
+ size = MAX (width, height);
+
+ if (!add_padding || width == height)
+- return cogl_texture_new_from_data (width,
+- height,
+- COGL_TEXTURE_NONE,
+- has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
+- COGL_PIXEL_FORMAT_ANY,
+- rowstride,
+- data);
+-
+- texture = cogl_texture_new_with_size (size, size,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_ANY);
++ return st_cogl_texture_new_from_data_wrapper (width, height,
++ COGL_TEXTURE_NONE,
++ has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
++ COGL_PIXEL_FORMAT_ANY,
++ rowstride, data);
++
++ texture = st_cogl_texture_new_with_size_wrapper (size, size,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_ANY);
+
+ offscreen = cogl_offscreen_new_to_texture (texture);
+
+@@ -600,13 +599,12 @@ data_to_cogl_handle (const guchar *data,
+ cogl_object_unref (offscreen);
+ g_clear_error (&error);
+
+- return cogl_texture_new_from_data (width,
+- height,
+- COGL_TEXTURE_NONE,
+- has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
+- COGL_PIXEL_FORMAT_ANY,
+- rowstride,
+- data);
++ return st_cogl_texture_new_from_data_wrapper (width, height,
++ COGL_TEXTURE_NONE,
++ has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
++ COGL_PIXEL_FORMAT_ANY,
++ rowstride,
++ data);
+ }
+
+ cogl_color_set_from_4ub (&clear_color, 0, 0, 0, 0);
+@@ -626,16 +624,16 @@ data_to_cogl_handle (const guchar *data,
+ return texture;
+ }
+
+-static CoglHandle
+-pixbuf_to_cogl_handle (GdkPixbuf *pixbuf,
+- gboolean add_padding)
++static CoglTexture *
++pixbuf_to_cogl_texture (GdkPixbuf *pixbuf,
++ gboolean add_padding)
+ {
+- return data_to_cogl_handle (gdk_pixbuf_get_pixels (pixbuf),
+- gdk_pixbuf_get_has_alpha (pixbuf),
+- gdk_pixbuf_get_width (pixbuf),
+- gdk_pixbuf_get_height (pixbuf),
+- gdk_pixbuf_get_rowstride (pixbuf),
+- add_padding);
++ return data_to_cogl_texture (gdk_pixbuf_get_pixels (pixbuf),
++ gdk_pixbuf_get_has_alpha (pixbuf),
++ gdk_pixbuf_get_width (pixbuf),
++ gdk_pixbuf_get_height (pixbuf),
++ gdk_pixbuf_get_rowstride (pixbuf),
++ add_padding);
+ }
+
+ static cairo_surface_t *
+@@ -665,7 +663,7 @@ finish_texture_load (AsyncTextureLoadData *data,
+ {
+ GSList *iter;
+ StTextureCache *cache;
+- CoglHandle texdata = NULL;
++ CoglTexture *texdata = NULL;
+
+ cache = data->cache;
+
+@@ -674,7 +672,7 @@ finish_texture_load (AsyncTextureLoadData *data,
+ if (pixbuf == NULL)
+ goto out;
+
+- texdata = pixbuf_to_cogl_handle (pixbuf, data->enforced_square);
++ texdata = pixbuf_to_cogl_texture (pixbuf, data->enforced_square);
+
+ if (data->policy != ST_TEXTURE_CACHE_POLICY_NONE)
+ {
+@@ -683,7 +681,7 @@ finish_texture_load (AsyncTextureLoadData *data,
+ if (!g_hash_table_lookup_extended (cache->priv->keyed_cache, data->key,
+ &orig_key, &value))
+ {
+- cogl_handle_ref (texdata);
++ cogl_object_ref (texdata);
+ g_hash_table_insert (cache->priv->keyed_cache, g_strdup (data->key),
+ texdata);
+ }
+@@ -697,7 +695,7 @@ finish_texture_load (AsyncTextureLoadData *data,
+
+ out:
+ if (texdata)
+- cogl_handle_unref (texdata);
++ cogl_object_unref (texdata);
+
+ texture_load_data_free (data);
+ }
+@@ -788,7 +786,7 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
+ const char *propname)
+ {
+ GdkPixbuf *pixbuf;
+- CoglHandle texdata;
++ CoglTexture *texdata;
+
+ g_object_get (bind->source, propname, &pixbuf, NULL);
+
+@@ -796,11 +794,11 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
+
+ if (pixbuf != NULL)
+ {
+- texdata = pixbuf_to_cogl_handle (pixbuf, FALSE);
++ texdata = pixbuf_to_cogl_texture (pixbuf, FALSE);
+ g_object_unref (pixbuf);
+
+ clutter_texture_set_cogl_texture (bind->texture, texdata);
+- cogl_handle_unref (texdata);
++ cogl_object_unref (texdata);
+
+ clutter_actor_set_opacity (CLUTTER_ACTOR (bind->texture), 255);
+ }
+@@ -843,7 +841,7 @@ st_texture_cache_free_bind (gpointer data)
+ *
+ * Create a #ClutterTexture which tracks the #GdkPixbuf value of a GObject property
+ * named by @property_name. Unlike other methods in StTextureCache, the underlying
+- * CoglHandle is not shared by default with other invocations to this method.
++ * #CoglTexture is not shared by default with other invocations to this method.
+ *
+ * If the source object is destroyed, the texture will continue to show the last
+ * value of the property.
+@@ -894,7 +892,7 @@ st_texture_cache_bind_pixbuf_property (StTextureCache *cache,
+ *
+ * Returns: (transfer full): A newly-referenced handle to the texture
+ */
+-CoglHandle
++CoglTexture *
+ st_texture_cache_load (StTextureCache *cache,
+ const char *key,
+ StTextureCachePolicy policy,
+@@ -902,7 +900,7 @@ st_texture_cache_load (StTextureCache *cache,
+ void *data,
+ GError **error)
+ {
+- CoglHandle texture;
++ CoglTexture *texture;
+
+ texture = g_hash_table_lookup (cache->priv->keyed_cache, key);
+ if (!texture)
+@@ -911,9 +909,9 @@ st_texture_cache_load (StTextureCache *cache,
+ if (texture)
+ g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
+ else
+- return COGL_INVALID_HANDLE;
++ return NULL;
+ }
+- cogl_handle_ref (texture);
++ cogl_object_ref (texture);
+ return texture;
+ }
+
+@@ -938,7 +936,7 @@ ensure_request (StTextureCache *cache,
+ AsyncTextureLoadData **request,
+ ClutterActor *texture)
+ {
+- CoglHandle texdata;
++ CoglTexture *texdata;
+ AsyncTextureLoadData *pending;
+ gboolean had_pending;
+
+@@ -1077,7 +1075,7 @@ static ClutterActor *
+ load_from_pixbuf (GdkPixbuf *pixbuf)
+ {
+ ClutterTexture *texture;
+- CoglHandle texdata;
++ CoglTexture *texdata;
+ int width = gdk_pixbuf_get_width (pixbuf);
+ int height = gdk_pixbuf_get_height (pixbuf);
+
+@@ -1085,11 +1083,11 @@ load_from_pixbuf (GdkPixbuf *pixbuf)
+
+ clutter_actor_set_size (CLUTTER_ACTOR (texture), width, height);
+
+- texdata = pixbuf_to_cogl_handle (pixbuf, FALSE);
++ texdata = pixbuf_to_cogl_texture (pixbuf, FALSE);
+
+ set_texture_cogl_texture (texture, texdata);
+
+- cogl_handle_unref (texdata);
++ cogl_object_unref (texdata);
+ return CLUTTER_ACTOR (texture);
+ }
+
+@@ -1341,7 +1339,7 @@ typedef struct {
+ int scale;
+ } CreateFadedIconData;
+
+-static CoglHandle
++static CoglTexture *
+ create_faded_icon_cpu (StTextureCache *cache,
+ const char *key,
+ void *datap,
+@@ -1351,7 +1349,7 @@ create_faded_icon_cpu (StTextureCache *cache,
+ char *name;
+ GdkPixbuf *pixbuf;
+ int size;
+- CoglHandle texture;
++ CoglTexture *texture;
+ gint width, height, rowstride;
+ guint8 n_channels;
+ gboolean have_alpha;
+@@ -1389,13 +1387,14 @@ create_faded_icon_cpu (StTextureCache *cache,
+ }
+
+ if (info == NULL)
+- return COGL_INVALID_HANDLE;
++ return NULL;
+
+ pixbuf = gtk_icon_info_load_icon (info, NULL);
+ gtk_icon_info_free (info);
+
++
+ if (pixbuf == NULL)
+- return COGL_INVALID_HANDLE;
++ return NULL;
+
+ width = gdk_pixbuf_get_width (pixbuf);
+ height = gdk_pixbuf_get_height (pixbuf);
+@@ -1426,13 +1425,12 @@ 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 = st_cogl_texture_new_from_data_wrapper (width, height,
++ COGL_TEXTURE_NONE,
++ have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
++ COGL_PIXEL_FORMAT_ANY,
++ rowstride,
++ pixels);
+ g_free (pixels);
+ g_object_unref (pixbuf);
+
+@@ -1461,7 +1459,7 @@ st_texture_cache_load_icon_name (StTextureCache *cache,
+ gint size)
+ {
+ ClutterActor *texture;
+- CoglHandle cogltexture;
++ CoglTexture *cogltexture;
+ GIcon *themed;
+ char **names;
+ char *cache_key;
+@@ -1534,7 +1532,7 @@ st_texture_cache_load_icon_name (StTextureCache *cache,
+ g_free (data.name);
+ g_free (cache_key);
+
+- if (cogltexture != COGL_INVALID_HANDLE)
++ if (cogltexture != NULL)
+ {
+ texture = clutter_texture_new ();
+ clutter_texture_set_cogl_texture (CLUTTER_TEXTURE (texture), cogltexture);
+@@ -1615,7 +1613,7 @@ st_texture_cache_load_uri_async (StTextureCache *cache,
+ return CLUTTER_ACTOR (texture);
+ }
+
+-static CoglHandle
++static CoglTexture *
+ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
+ StTextureCachePolicy policy,
+ const gchar *uri,
+@@ -1623,7 +1621,7 @@ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
+ int available_height,
+ GError **error)
+ {
+- CoglHandle texdata;
++ CoglTexture *texdata;
+ GdkPixbuf *pixbuf;
+ char *key;
+
+@@ -1643,17 +1641,17 @@ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
+ if (!pixbuf)
+ goto out;
+
+- texdata = pixbuf_to_cogl_handle (pixbuf, FALSE);
++ texdata = pixbuf_to_cogl_texture (pixbuf, FALSE);
+ g_object_unref (pixbuf);
+
+ if (policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
+ {
+- cogl_handle_ref (texdata);
++ cogl_object_ref (texdata);
+ g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texdata);
+ }
+ }
+ else
+- cogl_handle_ref (texdata);
++ cogl_object_ref (texdata);
+
+ ensure_monitor_for_uri (cache, uri);
+
+@@ -1731,38 +1729,38 @@ st_texture_cache_load_uri_sync (StTextureCache *cache,
+ int available_height,
+ GError **error)
+ {
+- CoglHandle texdata;
++ CoglTexture *texdata;
+ ClutterTexture *texture;
+
+ texdata = st_texture_cache_load_uri_sync_to_cogl_texture (cache, policy, uri, available_width, available_height, error);
+
+- if (texdata == COGL_INVALID_HANDLE)
++ if (texdata == NULL)
+ return NULL;
+
+ texture = create_default_texture ();
+ set_texture_cogl_texture (texture, texdata);
+- cogl_handle_unref (texdata);
++ cogl_object_unref (texdata);
+
+ return CLUTTER_ACTOR (texture);
+ }
+
+
+ /**
+- * st_texture_cache_load_file_to_cogl_texture:
++ * st_texture_cache_load_file_to_cogl_texture: (skip)
+ * @cache: A #StTextureCache
+ * @file_path: Path to a file in supported image format
+ *
+ * This function synchronously loads the given file path
+ * into a COGL texture. On error, a warning is emitted
+- * and %COGL_INVALID_HANDLE is returned.
++ * and %NULL is returned.
+ *
+- * Returns: (transfer full): a new #CoglHandle
++ * Returns: (transfer full): a new #CoglTexture
+ */
+-CoglHandle
++CoglTexture *
+ st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
+ const gchar *file_path)
+ {
+- CoglHandle texture;
++ CoglTexture *texture;
+ GFile *file;
+ char *uri;
+ GError *error = NULL;
+@@ -1779,7 +1777,7 @@ st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
+ {
+ g_warning ("Failed to load %s: %s", file_path, error->message);
+ g_clear_error (&error);
+- return COGL_INVALID_HANDLE;
++ return NULL;
+ }
+ return texture;
+ }
+@@ -1849,7 +1847,7 @@ st_texture_cache_load_from_raw (StTextureCache *cache,
+ GError **error)
+ {
+ ClutterTexture *texture;
+- CoglHandle texdata;
++ CoglTexture *texdata;
+ char *key;
+ char *checksum;
+
+@@ -1868,7 +1866,7 @@ st_texture_cache_load_from_raw (StTextureCache *cache,
+ texdata = g_hash_table_lookup (cache->priv->keyed_cache, key);
+ if (texdata == NULL)
+ {
+- texdata = data_to_cogl_handle (data, has_alpha, width, height, rowstride, TRUE);
++ texdata = data_to_cogl_texture (data, has_alpha, width, height, rowstride, TRUE);
+ g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texdata);
+ }
+
+diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
+index 9a92bc2..9b2cd14 100644
+--- a/src/st/st-texture-cache.h
++++ b/src/st/st-texture-cache.h
+@@ -103,7 +103,7 @@ ClutterActor *st_texture_cache_load_uri_sync (StTextureCache *cache,
+ int available_height,
+ GError **error);
+
+-CoglHandle st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
++CoglTexture *st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
+ const gchar *file_path);
+
+ cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
+@@ -133,13 +133,13 @@ ClutterActor *st_texture_cache_load_file_simple (StTextureCache *cache,
+ * texture handle for the given key, or set @error.
+ *
+ */
+-typedef CoglHandle (*StTextureCacheLoader) (StTextureCache *cache, const char *key, void *data, GError **error);
+-
+-CoglHandle st_texture_cache_load (StTextureCache *cache,
+- const char *key,
+- StTextureCachePolicy policy,
+- StTextureCacheLoader load,
+- void *data,
+- GError **error);
++typedef CoglTexture * (*StTextureCacheLoader) (StTextureCache *cache, const char *key, void *data, GError **error);
++
++CoglTexture * st_texture_cache_load (StTextureCache *cache,
++ const char *key,
++ StTextureCachePolicy policy,
++ StTextureCacheLoader load,
++ void *data,
++ GError **error);
+
+ #endif /* __ST_TEXTURE_CACHE_H__ */
+diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c
+index 51455d6..5e534ff 100644
+--- a/src/st/st-theme-node-drawing.c
++++ b/src/st/st-theme-node-drawing.c
+@@ -35,6 +35,7 @@
+ #include "st-theme-context.h"
+ #include "st-texture-cache.h"
+ #include "st-theme-node-private.h"
++#include "st-cogl-wrapper.h"
+
+ /****
+ * Rounded corners
+@@ -165,12 +166,13 @@ create_corner_material (StCornerSpec *corner)
+
+ cairo_surface_destroy (surface);
+
+- texture = cogl_texture_new_from_data (size, size,
+- COGL_TEXTURE_NONE,
+- CLUTTER_CAIRO_FORMAT_ARGB32,
+- COGL_PIXEL_FORMAT_ANY,
+- rowstride,
+- data);
++ texture = st_cogl_texture_new_from_data_wrapper (size, size,
++ COGL_TEXTURE_NONE,
++ CLUTTER_CAIRO_FORMAT_ARGB32,
++ COGL_PIXEL_FORMAT_ANY,
++ rowstride,
++ data);
++
+ g_free (data);
+ g_assert (texture != COGL_INVALID_HANDLE);
+
+@@ -1249,13 +1251,13 @@ st_theme_node_prerender_background (StThemeNode *node)
+ if (interior_path != NULL)
+ cairo_path_destroy (interior_path);
+
+- texture = cogl_texture_new_from_data (paint_box.x2 - paint_box.x1,
+- paint_box.y2 - paint_box.y1,
+- COGL_TEXTURE_NONE,
+- CLUTTER_CAIRO_FORMAT_ARGB32,
+- COGL_PIXEL_FORMAT_ANY,
+- rowstride,
+- data);
++ texture = st_cogl_texture_new_from_data_wrapper (paint_box.x2 - paint_box.x1,
++ paint_box.y2 - paint_box.y1,
++ COGL_TEXTURE_NONE,
++ CLUTTER_CAIRO_FORMAT_ARGB32,
++ COGL_PIXEL_FORMAT_ANY,
++ rowstride,
++ data);
+
+ cairo_destroy (cr);
+ cairo_surface_destroy (surface);
+@@ -1438,10 +1440,10 @@ st_theme_node_render_resources (StThemeNode *node,
+ int texture_width = ceil (width);
+ int texture_height = ceil (height);
+
+- buffer = cogl_texture_new_with_size (texture_width,
+- texture_height,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_ANY);
++ buffer = st_cogl_texture_new_with_size_wrapper (texture_width,
++ texture_height,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_ANY);
+ offscreen = cogl_offscreen_new_to_texture (buffer);
+
+ if (offscreen != COGL_INVALID_HANDLE)
+diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c
+index 7bb83cd..2d40664 100644
+--- a/src/st/st-theme-node-transition.c
++++ b/src/st/st-theme-node-transition.c
+@@ -20,6 +20,7 @@
+ */
+
+ #include "st-theme-node-transition.h"
++#include "st-cogl-wrapper.h"
+
+ enum {
+ COMPLETED,
+@@ -235,15 +236,17 @@ setup_framebuffers (StThemeNodeTransition *transition,
+
+ if (priv->old_texture)
+ cogl_handle_unref (priv->old_texture);
+- priv->old_texture = cogl_texture_new_with_size (width, height,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_ANY);
++
++ priv->old_texture = st_cogl_texture_new_with_size_wrapper (width, height,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_ANY);
+
+ if (priv->new_texture)
+ cogl_handle_unref (priv->new_texture);
+- priv->new_texture = cogl_texture_new_with_size (width, height,
+- COGL_TEXTURE_NO_SLICING,
+- COGL_PIXEL_FORMAT_ANY);
++
++ priv->new_texture = st_cogl_texture_new_with_size_wrapper (width, height,
++ COGL_TEXTURE_NO_SLICING,
++ COGL_PIXEL_FORMAT_ANY);
+
+ g_return_val_if_fail (priv->old_texture != COGL_INVALID_HANDLE, FALSE);
+ g_return_val_if_fail (priv->new_texture != COGL_INVALID_HANDLE, FALSE);
+--
+1.9.3
+
diff --git a/cinnamon.spec b/cinnamon.spec
index 6c9daa5..6198f65 100644
--- a/cinnamon.spec
+++ b/cinnamon.spec
@@ -1,8 +1,8 @@
#global _internal_version ea748a2
Name: cinnamon
-Version: 2.4.7
-Release: 4%{?dist}
+Version: 2.4.8
+Release: 1%{?dist}
Summary: Window management and application launching for GNOME
License: GPLv2+ and LGPLv2+
URL: http://cinnamon.linuxmint.com
@@ -34,6 +34,7 @@ Patch7: default_panal_launcher.patch
%endif
Patch8: remove_session_bits.patch
Patch9: show_brightness_fix.patch
+Patch10: 0001-Add-wrapper-for-cogl-texture-functions-to-implement.patch
%global clutter_version 1.12.2
%global cjs_version 2.3.1
@@ -267,6 +268,9 @@ fi
%{_mandir}/man1/*
%changelog
+* Sun Apr 26 2015 Leigh Scott <leigh123linux at googlemail.com> - 2.4.8-1
+- update to 2.4.8
+
* Sat Apr 25 2015 Leigh Scott <leigh123linux at googlemail.com> - 2.4.7-4
- use new gnome-terminal desktop file name
diff --git a/sources b/sources
index 4382697..fadcb9f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-196d88bae80d0482c139456432d66c80 Cinnamon-2.4.7.tar.gz
+4004c7d5e1a5d550a885c3fe87878425 Cinnamon-2.4.8.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/cinnamon.git/commit/?h=f21&id=54083015a4d6491237a00620a508d7af1a5eb381
More information about the scm-commits
mailing list