[metacity] compositor: simplify solid_picture
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor: simplify solid_picture
- Date: Sat, 4 Mar 2017 16:50:31 +0000 (UTC)
commit 951845049e7dc082adaba554b623f09717622c2b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Mar 4 18:26:42 2017 +0200
compositor: simplify solid_picture
src/compositor/meta-compositor-xrender.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index afe74a6..c823650 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -750,14 +750,13 @@ find_window_for_child_window (MetaCompositorXRender *xrender,
}
static Picture
-solid_picture (MetaDisplay *display,
- gboolean argb,
- double a,
- double r,
- double g,
- double b)
+solid_picture (Display *xdisplay,
+ gboolean argb,
+ double a,
+ double r,
+ double g,
+ double b)
{
- Display *xdisplay = meta_display_get_xdisplay (display);
Pixmap pixmap;
Picture picture;
XRenderPictureAttributes pa;
@@ -1629,7 +1628,7 @@ paint_windows (MetaCompositorXRender *xrender,
if ((cw->opacity != (guint) OPAQUE) && !(cw->alpha_pict))
{
- cw->alpha_pict = solid_picture (display, FALSE,
+ cw->alpha_pict = solid_picture (xdisplay, FALSE,
(double) cw->opacity / OPAQUE,
0, 0, 0);
}
@@ -1717,7 +1716,7 @@ paint_all (MetaCompositorXRender *xrender,
dump_xserver_region (xrender, "paint_all", region);
/* Make a random colour overlay */
- overlay = solid_picture (display, TRUE, 1, /* 0.3, alpha */
+ overlay = solid_picture (xdisplay, TRUE, 1, /* 0.3, alpha */
((double) (rand () % 100)) / 100.0,
((double) (rand () % 100)) / 100.0,
((double) (rand () % 100)) / 100.0);
@@ -2982,7 +2981,7 @@ meta_compositor_xrender_manage (MetaCompositor *compositor,
}
xrender->root_buffer = None;
- xrender->black_picture = solid_picture (display, TRUE, 1, 0, 0, 0);
+ xrender->black_picture = solid_picture (xdisplay, TRUE, 1, 0, 0, 0);
xrender->root_tile = None;
xrender->all_damage = None;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]