[gtk/wip/chergert/glproto: 829/920] use half_blur_extra
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 829/920] use half_blur_extra
- Date: Mon, 8 Feb 2021 19:15:44 +0000 (UTC)
commit 2a7bace626eb347fd0f580dfa11235eddef8b16e
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 29 15:56:21 2021 -0800
use half_blur_extra
gsk/next/gskglrenderjob.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 1361298e02..2e5ba9196a 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -2128,7 +2128,7 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
float blur_radius = gsk_outset_shadow_node_get_blur_radius (node);
float blur_extra = blur_radius * 2.0f; /* 2.0 = shader radius_multiplier */
float half_blur_extra = blur_extra / 2.0f;
- int extra_blur_pixels = ceilf (blur_extra / 2.0 * scale_x);
+ int extra_blur_pixels = ceilf (half_blur_extra * scale_x);
float spread = gsk_outset_shadow_node_get_spread (node);
float dx = gsk_outset_shadow_node_get_dx (node);
float dy = gsk_outset_shadow_node_get_dy (node);
@@ -2315,12 +2315,12 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob *job,
&transformed_outline);
{
- const float min_x = floorf (outline->bounds.origin.x - spread - (blur_extra / 2.0) + dx);
- const float min_y = floorf (outline->bounds.origin.y - spread - (blur_extra / 2.0) + dy);
+ const float min_x = floorf (outline->bounds.origin.x - spread - half_blur_extra + dx);
+ const float min_y = floorf (outline->bounds.origin.y - spread - half_blur_extra + dy);
const float max_x = ceilf (outline->bounds.origin.x + outline->bounds.size.width +
- (blur_extra / 2.0) + dx + spread);
+ half_blur_extra + dx + spread);
const float max_y = ceilf (outline->bounds.origin.y + outline->bounds.size.height +
- (blur_extra / 2.0) + dy + spread);
+ half_blur_extra + dy + spread);
const GskGLTextureNineSlice *slices;
GskGLTexture *texture;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]