summarylogtreecommitdiffstats
path: root/shell_blur_effect.patch
diff options
context:
space:
mode:
authorLuoYi2022-03-31 11:05:23 +0800
committerLuoYi2022-03-31 11:05:23 +0800
commit1b8fbd14ed030ce0ca890b192bcc37b4368e9add (patch)
treeefae206d6c76a0b711f4ae711bf42b615d1c0167 /shell_blur_effect.patch
parent79e1430f88b444c1533e2324a58472953e690cb9 (diff)
downloadaur-1b8fbd14ed030ce0ca890b192bcc37b4368e9add.tar.gz
Try update to 42.0
Diffstat (limited to 'shell_blur_effect.patch')
-rw-r--r--shell_blur_effect.patch92
1 files changed, 37 insertions, 55 deletions
diff --git a/shell_blur_effect.patch b/shell_blur_effect.patch
index 685c26a00bd7..e2ed3edfae0b 100644
--- a/shell_blur_effect.patch
+++ b/shell_blur_effect.patch
@@ -1,6 +1,6 @@
diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
---- a/src/shell-blur-effect.c 2021-11-06 14:09:18.864228559 +0800
-+++ b/src/shell-blur-effect.c 2021-11-06 14:09:18.864228559 +0800
+--- a/src/shell-blur-effect.c 2022-03-31 10:47:02.847618301 +0800
++++ b/src/shell-blur-effect.c 2022-03-31 10:47:02.847618301 +0800
@@ -22,6 +22,9 @@
#include "shell-enum-types.h"
@@ -33,20 +33,19 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
{
ClutterEffect parent_instance;
-@@ -78,6 +75,12 @@ struct _ShellBlurEffect
+@@ -78,6 +75,11 @@ struct _ShellBlurEffect
FramebufferData background_fb;
FramebufferData brightness_fb;
int brightness_uniform;
+ int bounds_uniform;
-+ int corner_centers_1_uniform;
-+ int corner_centers_2_uniform;
++ int clip_radius_uniform;
+ int pixel_step_uniform;
+ int skip_uniform;
+ gboolean skip;
ShellBlurMode mode;
float downscale_factor;
-@@ -85,7 +88,7 @@ struct _ShellBlurEffect
+@@ -85,7 +87,7 @@ struct _ShellBlurEffect
int sigma;
};
@@ -55,7 +54,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
enum {
PROP_0,
-@@ -133,8 +136,8 @@ create_brightness_pipeline (void)
+@@ -133,8 +135,8 @@ create_brightness_pipeline (void)
brightness_pipeline = create_base_pipeline ();
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_FRAGMENT,
@@ -66,7 +65,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
cogl_pipeline_add_snippet (brightness_pipeline, snippet);
cogl_object_unref (snippet);
}
-@@ -144,7 +147,7 @@ create_brightness_pipeline (void)
+@@ -144,7 +146,7 @@ create_brightness_pipeline (void)
static void
@@ -75,7 +74,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
uint8_t paint_opacity)
{
cogl_pipeline_set_color4ub (self->brightness_fb.pipeline,
-@@ -155,9 +158,44 @@ update_brightness (ShellBlurEffect *self
+@@ -155,9 +157,29 @@ update_brightness (ShellBlurEffect *self
if (self->brightness_uniform > -1)
{
@@ -91,36 +90,21 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
+ float height = self->tex_height;
+ float radius = meta_prefs_get_round_corner_radius();
+ float bounds[] = { 0.0, 0.0, width, height };
-+ float corner_centers_1[] = {
-+ radius,
-+ radius,
-+ width - radius,
-+ radius
-+ };
-+ float corner_centers_2[] = {
-+ width - radius,
-+ height - radius,
-+ radius,
-+ height - radius
-+ };
+ float pixel_step[] = { 1.0 / width, 1.0 / height };
+
+ cogl_pipeline_set_uniform_float (self->brightness_fb.pipeline,
+ self->bounds_uniform,
+ 4, 1, bounds);
-+ cogl_pipeline_set_uniform_float (self->brightness_fb.pipeline,
-+ self->corner_centers_1_uniform,
-+ 4, 1, corner_centers_1);
-+ cogl_pipeline_set_uniform_float (self->brightness_fb.pipeline,
-+ self->corner_centers_2_uniform,
-+ 4, 1, corner_centers_2);
++ cogl_pipeline_set_uniform_1f (self->brightness_fb.pipeline,
++ self->clip_radius_uniform,
++ radius);
+ cogl_pipeline_set_uniform_float (self->brightness_fb.pipeline,
+ self->pixel_step_uniform,
+ 2, 1, pixel_step);
}
}
-@@ -212,7 +250,7 @@ update_fbo (FramebufferData *data,
+@@ -212,7 +234,7 @@ update_fbo (FramebufferData *data,
}
static gboolean
@@ -129,7 +113,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
unsigned int width,
unsigned int height,
float downscale_factor)
-@@ -231,7 +269,7 @@ update_actor_fbo (ShellBlurEffect *self,
+@@ -231,7 +253,7 @@ update_actor_fbo (ShellBlurEffect *self,
}
static gboolean
@@ -138,7 +122,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
unsigned int width,
unsigned int height,
float downscale_factor)
-@@ -250,7 +288,7 @@ update_brightness_fbo (ShellBlurEffect *
+@@ -250,7 +272,7 @@ update_brightness_fbo (ShellBlurEffect *
}
static gboolean
@@ -147,7 +131,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
unsigned int width,
unsigned int height)
{
-@@ -303,10 +341,10 @@ static void
+@@ -303,10 +325,10 @@ static void
shell_blur_effect_set_actor (ClutterActorMeta *meta,
ClutterActor *actor)
{
@@ -160,7 +144,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
meta_class->set_actor (meta, actor);
/* clear out the previous state */
-@@ -319,7 +357,7 @@ shell_blur_effect_set_actor (ClutterActo
+@@ -319,7 +341,7 @@ shell_blur_effect_set_actor (ClutterActo
}
static void
@@ -169,7 +153,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintContext *paint_context,
ClutterActorBox *source_actor_box)
{
-@@ -368,7 +406,7 @@ update_actor_box (ShellBlurEffect *s
+@@ -368,7 +390,7 @@ update_actor_box (ShellBlurEffect *s
}
static void
@@ -178,7 +162,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintNode *node,
uint8_t paint_opacity)
{
-@@ -395,7 +433,7 @@ add_blurred_pipeline (ShellBlurEffect *
+@@ -395,7 +417,7 @@ add_blurred_pipeline (ShellBlurEffect *
}
static ClutterPaintNode *
@@ -187,7 +171,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintNode *node,
uint8_t paint_opacity)
{
-@@ -435,7 +473,7 @@ create_blur_nodes (ShellBlurEffect *sel
+@@ -435,7 +457,7 @@ create_blur_nodes (ShellBlurEffect *sel
}
static void
@@ -196,7 +180,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintNode *node,
ClutterPaintContext *paint_context,
ClutterActorBox *source_actor_box)
-@@ -482,7 +520,7 @@ paint_background (ShellBlurEffect *s
+@@ -482,7 +504,7 @@ paint_background (ShellBlurEffect *s
}
static gboolean
@@ -205,7 +189,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintContext *paint_context,
ClutterActorBox *source_actor_box)
{
-@@ -509,7 +547,7 @@ update_framebuffers (ShellBlurEffect
+@@ -509,7 +531,7 @@ update_framebuffers (ShellBlurEffect
}
static void
@@ -214,7 +198,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintNode *node,
int opacity)
{
-@@ -520,7 +558,7 @@ add_actor_node (ShellBlurEffect *self,
+@@ -520,7 +542,7 @@ add_actor_node (ShellBlurEffect *self,
}
static void
@@ -223,7 +207,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterPaintNode *node,
ClutterEffectPaintFlags flags)
{
-@@ -579,7 +617,7 @@ paint_actor_offscreen (ShellBlurEffect
+@@ -579,7 +601,7 @@ paint_actor_offscreen (ShellBlurEffect
}
static gboolean
@@ -232,7 +216,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
ClutterEffectPaintFlags flags)
{
gboolean actor_cached;
-@@ -608,7 +646,7 @@ shell_blur_effect_paint_node (ClutterEff
+@@ -608,7 +630,7 @@ shell_blur_effect_paint_node (ClutterEff
ClutterPaintContext *paint_context,
ClutterEffectPaintFlags flags)
{
@@ -241,7 +225,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
uint8_t paint_opacity;
g_assert (self->actor != NULL);
-@@ -689,7 +727,7 @@ fail:
+@@ -689,7 +711,7 @@ fail:
static void
shell_blur_effect_finalize (GObject *object)
{
@@ -250,7 +234,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
clear_framebuffer_data (&self->actor_fb);
clear_framebuffer_data (&self->background_fb);
-@@ -699,7 +737,7 @@ shell_blur_effect_finalize (GObject *obj
+@@ -699,7 +721,7 @@ shell_blur_effect_finalize (GObject *obj
g_clear_pointer (&self->background_fb.pipeline, cogl_object_unref);
g_clear_pointer (&self->brightness_fb.pipeline, cogl_object_unref);
@@ -259,7 +243,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
}
static void
-@@ -708,7 +746,7 @@ shell_blur_effect_get_property (GObject
+@@ -708,7 +730,7 @@ shell_blur_effect_get_property (GObject
GValue *value,
GParamSpec *pspec)
{
@@ -268,7 +252,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
switch (prop_id)
{
-@@ -735,20 +773,20 @@ shell_blur_effect_set_property (GObject
+@@ -735,20 +757,20 @@ shell_blur_effect_set_property (GObject
const GValue *value,
GParamSpec *pspec)
{
@@ -293,7 +277,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
break;
default:
-@@ -757,7 +795,7 @@ shell_blur_effect_set_property (GObject
+@@ -757,7 +779,7 @@ shell_blur_effect_set_property (GObject
}
static void
@@ -302,7 +286,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
ClutterActorMetaClass *meta_class = CLUTTER_ACTOR_META_CLASS (klass);
-@@ -797,38 +835,50 @@ shell_blur_effect_class_init (ShellBlurE
+@@ -797,38 +819,48 @@ shell_blur_effect_class_init (ShellBlurE
}
static void
@@ -321,10 +305,8 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
cogl_pipeline_get_uniform_location (self->brightness_fb.pipeline, "brightness");
+ self->bounds_uniform =
+ cogl_pipeline_get_uniform_location (self->brightness_fb.pipeline, "bounds");
-+ self->corner_centers_1_uniform =
-+ cogl_pipeline_get_uniform_location (self->brightness_fb.pipeline, "corner_centers_1");
-+ self->corner_centers_2_uniform =
-+ cogl_pipeline_get_uniform_location (self->brightness_fb.pipeline, "corner_centers_2");
++ self->clip_radius_uniform =
++ cogl_pipeline_get_uniform_location (self->brightness_fb.pipeline, "clip_radius");
+ self->pixel_step_uniform =
+ cogl_pipeline_get_uniform_location (self->brightness_fb.pipeline, "pixel_step");
+ self->skip_uniform =
@@ -361,7 +343,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
if (self->sigma == sigma)
return;
-@@ -843,18 +893,18 @@ shell_blur_effect_set_sigma (ShellBlurEf
+@@ -843,18 +875,18 @@ shell_blur_effect_set_sigma (ShellBlurEf
}
float
@@ -384,7 +366,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
if (self->brightness == brightness)
return;
-@@ -869,18 +919,18 @@ shell_blur_effect_set_brightness (ShellB
+@@ -869,18 +901,18 @@ shell_blur_effect_set_brightness (ShellB
}
ShellBlurMode
@@ -407,7 +389,7 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
if (self->mode == mode)
return;
-@@ -905,3 +955,17 @@ shell_blur_effect_set_mode (ShellBlurEff
+@@ -905,3 +937,17 @@ shell_blur_effect_set_mode (ShellBlurEff
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODE]);
}
@@ -426,8 +408,8 @@ diff -Narup a/src/shell-blur-effect.c b/src/shell-blur-effect.c
+ clutter_effect_queue_repaint (CLUTTER_EFFECT (self));
+}
diff -Narup a/src/shell-blur-effect.h b/src/shell-blur-effect.h
---- a/src/shell-blur-effect.h 2021-11-06 14:09:18.864228559 +0800
-+++ b/src/shell-blur-effect.h 2021-11-06 14:09:18.864228559 +0800
+--- a/src/shell-blur-effect.h 2022-03-31 10:47:02.847618301 +0800
++++ b/src/shell-blur-effect.h 2022-03-31 10:47:02.847618301 +0800
@@ -20,6 +20,10 @@
#pragma once