mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
shadow-factory: Receive CoglFramebuffer
Following up last commit, this commit adds a CoglFramebuffer argument to meta_shadow_paint(), and stops using the draw framebuffer internally. The only consumer of this API, MetaWindowActor, still passes the draw framebuffer though.
This commit is contained in:
parent
aecf588d8d
commit
605f35dd25
@ -204,6 +204,7 @@ meta_shadow_unref (MetaShadow *shadow)
|
||||
*/
|
||||
void
|
||||
meta_shadow_paint (MetaShadow *shadow,
|
||||
CoglFramebuffer *framebuffer,
|
||||
int window_x,
|
||||
int window_y,
|
||||
int window_width,
|
||||
@ -212,7 +213,6 @@ meta_shadow_paint (MetaShadow *shadow,
|
||||
cairo_region_t *clip,
|
||||
gboolean clip_strictly)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
float texture_width = cogl_texture_get_width (shadow->texture);
|
||||
float texture_height = cogl_texture_get_height (shadow->texture);
|
||||
int i, j;
|
||||
|
@ -713,6 +713,7 @@ meta_window_actor_paint (ClutterActor *actor)
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
gboolean appears_focused = meta_window_appears_focused (priv->window);
|
||||
MetaShadow *shadow = appears_focused ? priv->focused_shadow : priv->unfocused_shadow;
|
||||
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
|
||||
|
||||
/* This window got damage when obscured; we set up a timer
|
||||
* to send frame completion events, but since we're drawing
|
||||
@ -751,6 +752,7 @@ meta_window_actor_paint (ClutterActor *actor)
|
||||
}
|
||||
|
||||
meta_shadow_paint (shadow,
|
||||
framebuffer,
|
||||
params.x_offset + shape_bounds.x,
|
||||
params.y_offset + shape_bounds.y,
|
||||
shape_bounds.width,
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <cairo.h>
|
||||
|
||||
#include "clutter/clutter.h"
|
||||
#include "cogl/cogl.h"
|
||||
#include "meta/meta-window-shape.h"
|
||||
|
||||
GType meta_shadow_get_type (void) G_GNUC_CONST;
|
||||
@ -97,6 +98,7 @@ typedef struct _MetaShadow MetaShadow;
|
||||
MetaShadow *meta_shadow_ref (MetaShadow *shadow);
|
||||
void meta_shadow_unref (MetaShadow *shadow);
|
||||
void meta_shadow_paint (MetaShadow *shadow,
|
||||
CoglFramebuffer *framebuffer,
|
||||
int window_x,
|
||||
int window_y,
|
||||
int window_width,
|
||||
|
Loading…
Reference in New Issue
Block a user