Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 578216
Collapse All | Expand All

(-)a/src/st/st-theme-node-drawing.c (-12 / +23 lines)
Lines 2247-2268 st_theme_node_prerender_shadow (StThemeNodePaintState *state) Link Here
2247
                                       COGL_TEXTURE_NO_SLICING,
2247
                                       COGL_TEXTURE_NO_SLICING,
2248
                                       COGL_PIXEL_FORMAT_ANY);
2248
                                       COGL_PIXEL_FORMAT_ANY);
2249
  if (buffer != COGL_INVALID_HANDLE)
2249
  if (buffer != COGL_INVALID_HANDLE)
2250
    offscreen = cogl_offscreen_new_with_texture (buffer);
2251
2252
  if (offscreen != COGL_INVALID_HANDLE)
2253
    {
2250
    {
2254
      ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height};
2251
      CoglError *error = NULL;
2252
2253
      offscreen = cogl_offscreen_new_with_texture (buffer);
2254
2255
      if (cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error))
2256
        {
2257
          ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height};
2258
2259
          cogl_framebuffer_orthographic (offscreen, 0, 0,
2260
                                         state->box_shadow_width,
2261
                                         state->box_shadow_height, 0, 1.0);
2262
          cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0);
2255
2263
2256
      cogl_framebuffer_orthographic (offscreen, 0, 0,
2264
          st_theme_node_paint_borders (state, offscreen, &box, 0xFF);
2257
                                     state->box_shadow_width,
2258
                                     state->box_shadow_height, 0, 1.0);
2259
      cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0);
2260
2265
2261
      st_theme_node_paint_borders (state, offscreen, &box, 0xFF);
2266
          cogl_handle_unref (offscreen);
2262
      cogl_handle_unref (offscreen);
2263
2267
2264
      state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node),
2268
          state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node),
2265
                                                               buffer);
2269
                                                                   buffer);
2270
        }
2271
      else
2272
        {
2273
          cogl_handle_unref (offscreen);
2274
2275
          cogl_error_free (error);
2276
        }
2266
    }
2277
    }
2267
2278
2268
  if (buffer != COGL_INVALID_HANDLE)
2279
  if (buffer != COGL_INVALID_HANDLE)
(-)a/src/st/st-theme-node-transition.c (-2 / +16 lines)
Lines 242-247 setup_framebuffers (StThemeNodeTransition *transition, Link Here
242
  StThemeNodeTransitionPrivate *priv = transition->priv;
242
  StThemeNodeTransitionPrivate *priv = transition->priv;
243
  guint width, height;
243
  guint width, height;
244
244
245
  CoglError *catch_error = NULL;
246
245
  /* template material to avoid unnecessary shader compilation */
247
  /* template material to avoid unnecessary shader compilation */
246
  static CoglHandle material_template = COGL_INVALID_HANDLE;
248
  static CoglHandle material_template = COGL_INVALID_HANDLE;
247
249
Lines 269-281 setup_framebuffers (StThemeNodeTransition *transition, Link Here
269
  if (priv->old_offscreen)
271
  if (priv->old_offscreen)
270
    cogl_handle_unref (priv->old_offscreen);
272
    cogl_handle_unref (priv->old_offscreen);
271
  priv->old_offscreen = cogl_offscreen_new_with_texture (priv->old_texture);
273
  priv->old_offscreen = cogl_offscreen_new_with_texture (priv->old_texture);
274
  if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->old_offscreen), &catch_error))
275
    {
276
      cogl_object_unref (priv->old_offscreen);
277
      cogl_error_free (catch_error);
278
      priv->old_offscreen = COGL_INVALID_HANDLE;
279
      g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE);
280
    }
272
281
273
  if (priv->new_offscreen)
282
  if (priv->new_offscreen)
274
    cogl_handle_unref (priv->new_offscreen);
283
    cogl_handle_unref (priv->new_offscreen);
275
  priv->new_offscreen = cogl_offscreen_new_with_texture (priv->new_texture);
284
  priv->new_offscreen = cogl_offscreen_new_with_texture (priv->new_texture);
276
285
277
  g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE);
286
  if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->new_offscreen), &catch_error))
278
  g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE);
287
    {
288
      cogl_object_unref (priv->new_offscreen);
289
      cogl_error_free (catch_error);
290
      priv->old_offscreen = COGL_INVALID_HANDLE;
291
      g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE);
292
    }
279
293
280
  if (priv->material == NULL)
294
  if (priv->material == NULL)
281
    {
295
    {

Return to bug 578216