[gtk/wip/chergert/glproto: 208/526] fill area on loading
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 208/526] fill area on loading
- Date: Tue, 16 Feb 2021 01:14:29 +0000 (UTC)
commit b6b160f10a7457007371fd6ba413a58a49a99019
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 8 12:43:19 2021 -0800
fill area on loading
gsk/next/gskgldriver.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gsk/next/gskgldriver.c b/gsk/next/gskgldriver.c
index 8dae020a72..00bfa09e6f 100644
--- a/gsk/next/gskgldriver.c
+++ b/gsk/next/gskgldriver.c
@@ -537,6 +537,8 @@ gsk_next_driver_load_texture (GskNextDriver *self,
{
/* A GL texture from the same GL context is a simple task... */
+ area->origin.x = area->origin.y = 0;
+ area->size.width = area->size.height = 1;
return gdk_gl_texture_get_id ((GdkGLTexture *)texture);
}
else
@@ -563,7 +565,11 @@ gsk_next_driver_load_texture (GskNextDriver *self,
if ((t = gdk_texture_get_render_data (texture, self)))
{
if (t->min_filter == min_filter && t->mag_filter == mag_filter)
- return t->texture_id;
+ {
+ area->origin.x = area->origin.y = 0;
+ area->size.width = area->size.height = 1;
+ return t->texture_id;
+ }
}
source_texture = texture;
@@ -609,6 +615,9 @@ gsk_next_driver_load_texture (GskNextDriver *self,
if (gdk_texture_set_render_data (texture, self, t, gsk_gl_texture_destroyed))
t->user = texture;
+ area->origin.x = area->origin.y = 0;
+ area->size.width = area->size.height = 1;
+
gdk_gl_context_label_object_printf (context, GL_TEXTURE, t->texture_id,
"GdkTexture<%p> %d", texture, t->texture_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]