[gtk/wip/chergert/glproto: 494/526] remove unnecessary memcpy
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 494/526] remove unnecessary memcpy
- Date: Tue, 16 Feb 2021 01:14:39 +0000 (UTC)
commit f7d443c0acc9f25fd42ef115b6de54a19bd1675d
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 9 17:12:58 2021 -0800
remove unnecessary memcpy
also, it was wrong
gsk/next/gskglrenderjob.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 33c219f62a..dfa8c181de 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -1394,7 +1394,6 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
{
const GskRenderNode *child = gsk_rounded_clip_node_get_child (node);
const GskRoundedRect *clip = gsk_rounded_clip_node_get_clip (node);
- GskRoundedRect current_clip;
GskRoundedRect transformed_clip;
float scale_x = job->scale_x;
float scale_y = job->scale_y;
@@ -1403,8 +1402,6 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
if (node_is_invisible (child))
return;
- memcpy (¤t_clip, job->current_clip, sizeof current_clip);
-
gsk_gl_render_job_transform_bounds (job, &clip->bounds, &transformed_clip.bounds);
for (guint i = 0; i < G_N_ELEMENTS (clip->corner); i++)
@@ -1413,11 +1410,11 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
transformed_clip.corner[i].height = clip->corner[i].height * scale_y;
}
- if (gsk_rounded_rect_is_rectilinear (¤t_clip))
+ if (gsk_rounded_rect_is_rectilinear (&job->current_clip->rect))
{
GskRoundedRect intersected_clip;
- if (intersect_rounded_rectilinear (¤t_clip.bounds,
+ if (intersect_rounded_rectilinear (&job->current_clip->rect.bounds,
&transformed_clip,
&intersected_clip))
{
@@ -1434,7 +1431,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
if (job->clip->len <= 1)
need_offscreen = FALSE;
- else if (rounded_inner_rect_contains_rect (¤t_clip, &transformed_clip.bounds))
+ else if (rounded_inner_rect_contains_rect (&job->current_clip->rect, &transformed_clip.bounds))
need_offscreen = FALSE;
else
need_offscreen = TRUE;
@@ -1444,7 +1441,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
/* If the new clip entirely contains the current clip, the intersection is simply
* the current clip, so we can ignore the new one.
*/
- if (rounded_inner_rect_contains_rect (&transformed_clip, ¤t_clip.bounds))
+ if (rounded_inner_rect_contains_rect (&transformed_clip, &job->current_clip->rect.bounds))
{
gsk_gl_render_job_visit_node (job, child);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]