summaryrefslogtreecommitdiffstats
path: root/compton.h
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2012-10-13 18:46:59 +0800
committerRichard Grenville <pyxlcy@gmail.com>2012-10-13 19:11:25 +0800
commit2b120a74844d94d9f06fb86692fb667e557bc613 (patch)
treec25e2dafe88da03aba98ce0202d512a2852583f4 /compton.h
parent5d3425b5dc3b651f8638fc545a6f8efcca8fd35a (diff)
downloadtdebase-2b120a74844d94d9f06fb86692fb667e557bc613.tar.gz
tdebase-2b120a74844d94d9f06fb86692fb667e557bc613.zip
Improvement: Pregenerate alpha pictures
Pregenerate alpha pictures to save time when painting. Add --alpha-step to control the step of alpha picture generation (the opacity difference between two consecutively generated alpha pictures).
Diffstat (limited to 'compton.h')
-rw-r--r--compton.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/compton.h b/compton.h
index d28018b73..56a397668 100644
--- a/compton.h
+++ b/compton.h
@@ -221,8 +221,6 @@ typedef struct _win {
opacity_t opacity;
/// Target window opacity.
opacity_t opacity_tgt;
- /// Opacity of current alpha_pict.
- opacity_t opacity_cur;
/// Cached value of opacity window attribute.
opacity_t opacity_prop;
/// Cached value of opacity window attribute on client window. For
@@ -244,8 +242,6 @@ typedef struct _win {
// Frame-opacity-related members
/// Current window frame opacity. Affected by window 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;
/// Frame widths. Determined by client window attributes.
@@ -256,8 +252,6 @@ typedef struct _win {
Bool shadow;
/// Opacity of the shadow. Affected by window opacity and frame opacity.
double shadow_opacity;
- /// Opacity of current shadow_pict.
- double shadow_opacity_cur;
/// X offset of shadow. Affected by commandline argument.
int shadow_dx;
/// Y offset of shadow. Affected by commandline argument.
@@ -359,6 +353,8 @@ typedef struct _options {
Bool detect_client_opacity;
/// How much to dim an inactive window. 0.0 - 1.0, 0 to disable.
double inactive_dim;
+ /// Step for pregenerating alpha pictures. 0.01 - 1.0.
+ double alpha_step;
// Calculated
/// Whether compton needs to track focus changes.
@@ -1125,3 +1121,6 @@ vsync_opengl_wait(void);
static Bool
vsync_wait(Display *dpy, struct pollfd *fd, int timeout);
+
+static void
+init_alpha_picts(Display *dpy);