[9ae8f17cfc8ba7fd8fb34b2a194ef965a3b36a40839a46eeab1350e916692ac9/wip/baedert/for-master: 91/96] gl renderer: Ignore rounded clip that only increase the clip
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [9ae8f17cfc8ba7fd8fb34b2a194ef965a3b36a40839a46eeab1350e916692ac9/wip/baedert/for-master: 91/96] gl renderer: Ignore rounded clip that only increase the clip
- Date: Wed, 8 Jul 2020 03:46:05 +0000 (UTC)
commit 7c2a9cef5946ee7851579efe2b2e8fd1df4aa5ab
Author: Timm Bäder <mail baedert org>
Date: Fri Jul 3 06:41:29 2020 +0200
gl renderer: Ignore rounded clip that only increase the clip
This fixes the widget factory rendering too much.
In the widget-factory, we generally have a pretty small update area (two
spinners and a progressbar). We take the extents of that as a update
area and inital clip.
However, the first clip node we see is from the toplevel window, which
essentially increases the clip again to almost the entire window.
Fix that by ignoring such cases.
gsk/gl/gskglrenderer.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 130971e7b9..699da4f35d 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1313,6 +1313,15 @@ render_rounded_clip_node (GskGLRenderer *self,
transformed_clip.corner[i].height = clip->corner[i].height * scale;
}
+ /* 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, &builder->current_clip->bounds))
+ {
+ gsk_gl_renderer_add_render_ops (self, child, builder);
+ return;
+ }
+
+ /* TODO: Intersect current and new clip */
ops_push_clip (builder, &transformed_clip);
gsk_gl_renderer_add_render_ops (self, child, builder);
ops_pop_clip (builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]