Improvement: Change clear_shadow implementation

- Implement clear_shadow with painting region limitation instead of
  calculation in shadow image, to make it work correctly on windows with
  rounded corners, requested by funeral1988. This might cause more load
  on CPU, but could mean less load for GPU. The original implementation
  is kept but commented out.

- Code cleanup.
This commit is contained in:
Richard Grenville
2012-10-28 17:02:07 +08:00
parent f83ed19e14
commit 40178702ef
3 changed files with 52 additions and 26 deletions

View File

@ -740,10 +740,11 @@ presum_gaussian(conv *map);
static XImage *
make_shadow(Display *dpy, double opacity,
int width, int height);
int width, int height, Bool clear_shadow);
static Picture
shadow_picture(Display *dpy, double opacity, int width, int height);
shadow_picture(Display *dpy, double opacity, int width, int height,
Bool clear_shadow);
static Picture
solid_picture(Display *dpy, Bool argb, double a,
@ -922,6 +923,9 @@ set_focused(Display *dpy, win *w, Bool focused) {
static void
determine_fade(Display *dpy, win *w);
static void
win_update_shape(Display *dpy, win *w);
static void
determine_shadow(Display *dpy, win *w);