mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
glcontext: Store the updated area in the right place
We need to store the region *before* adding our own damage area, because we want to only store the changes of this frame, not the whole history. So do it in the same place Vulkan does it. Fixes #1900
This commit is contained in:
parent
2bad613cb0
commit
b76eb96c58
@ -310,6 +310,12 @@ gdk_gl_context_real_begin_frame (GdkDrawContext *draw_context,
|
||||
}
|
||||
|
||||
damage = GDK_GL_CONTEXT_GET_CLASS (context)->get_damage (context);
|
||||
|
||||
if (context->old_updated_area[1])
|
||||
cairo_region_destroy (context->old_updated_area[1]);
|
||||
context->old_updated_area[1] = context->old_updated_area[0];
|
||||
context->old_updated_area[0] = cairo_region_copy (region);
|
||||
|
||||
cairo_region_union (region, damage);
|
||||
cairo_region_destroy (damage);
|
||||
|
||||
@ -341,11 +347,6 @@ gdk_gl_context_real_end_frame (GdkDrawContext *draw_context,
|
||||
GDK_DRAW_CONTEXT_GET_CLASS (GDK_DRAW_CONTEXT (shared))->end_frame (GDK_DRAW_CONTEXT (shared), painted);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context->old_updated_area[1])
|
||||
cairo_region_destroy (context->old_updated_area[1]);
|
||||
context->old_updated_area[1] = context->old_updated_area[0];
|
||||
context->old_updated_area[0] = cairo_region_reference (painted);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user