summaryrefslogtreecommitdiffstats
path: root/compton.h
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2012-09-17 12:31:01 +0800
committerRichard Grenville <pyxlcy@gmail.com>2012-09-17 12:41:41 +0800
commit65e8e56c1ef0e1d02f3008e2af243e1b170414f3 (patch)
treee537fd376ce1339db67ed77256a0aa953b4ab6b4 /compton.h
parent32d9807104ab6a288a279beb98679dd2e02603c1 (diff)
downloadtdebase-65e8e56c1ef0e1d02f3008e2af243e1b170414f3.tar.gz
tdebase-65e8e56c1ef0e1d02f3008e2af243e1b170414f3.zip
Improvement: Change generating process of alpha_pict, etc.
- Change how w->alpha_pict is generated, in hope to boost performance, slightly, and as a step to eventually move handling code of most resources used when painting to paint_preprocess(). - Remove alpha_pict parameter of shadow_picture() as it's not necessary. - Let window opacity affect frame opacity. - Rename some members of struct _win.
Diffstat (limited to 'compton.h')
-rw-r--r--compton.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/compton.h b/compton.h
index ce8e4d298..ef49acb50 100644
--- a/compton.h
+++ b/compton.h
@@ -95,8 +95,6 @@ typedef struct _win {
int damaged;
Damage damage;
Picture picture;
- Picture alpha_pict;
- Picture alpha_border_pict;
XserverRegion border_size;
XserverRegion extents;
Bool shadow;
@@ -105,9 +103,23 @@ typedef struct _win {
int shadow_dy;
int shadow_width;
int shadow_height;
+
+ /// Current window opacity.
opacity_t opacity;
+ /// Opacity of current alpha_pict.
+ opacity_t opacity_cur;
/// Cached value of opacity window attribute.
opacity_t opacity_prop;
+ /// Alpha mask Picture to render window with opacity.
+ Picture alpha_pict;
+
+ /// Current window frame opacity.
+ double frame_opacity;
+ /// Opacity of current frame_alpha_pict.
+ opacity_t frame_opacity_cur;
+ /// Alpha mask Picture to render window frame with opacity.
+ Picture frame_alpha_pict;
+
/// Whether the window is to be dimmed.
Bool dim;
wintype window_type;
@@ -392,7 +404,7 @@ make_shadow(Display *dpy, double opacity,
int width, int height);
static Picture
-shadow_picture(Display *dpy, double opacity, Picture alpha_pict,
+shadow_picture(Display *dpy, double opacity,
int width, int height, int *wp, int *hp);
static Picture