[gnome-shell] blur-effect: Handle failure of background blitting gracefully



commit 91748aedb75d2f9f5f8259ce96ababa089c229d3
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Feb 13 22:50:40 2020 +0100

    blur-effect: Handle failure of background blitting gracefully
    
    `paint_background` already provides a return value in case the blitting
    of the framebuffer fails, handle that and fall back to only drawing the
    actor in case something goes wrong.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1000

 src/shell-blur-effect.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/shell-blur-effect.c b/src/shell-blur-effect.c
index c3fb3bc60e..5e50ab886f 100644
--- a/src/shell-blur-effect.c
+++ b/src/shell-blur-effect.c
@@ -807,7 +807,9 @@ shell_blur_effect_paint (ClutterEffect           *effect,
               break;
 
             case SHELL_BLUR_MODE_BACKGROUND:
-              paint_background (self, paint_context, &source_actor_box);
+              if (!paint_background (self, paint_context, &source_actor_box))
+                goto fail;
+
               apply_blur (self, paint_context, &self->background_fb, 255);
               break;
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]