[gtk/wip/chergert/glproto] next: apply padding to both sides of packed texture
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] next: apply padding to both sides of packed texture
- Date: Mon, 22 Feb 2021 18:03:11 +0000 (UTC)
commit 80ba659cd439bb090d464a41b69d0086b04aabed
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 22 10:03:05 2021 -0800
next: apply padding to both sides of packed texture
gsk/next/gskgltexturelibrary.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gsk/next/gskgltexturelibrary.c b/gsk/next/gskgltexturelibrary.c
index b6185a0302..17415608be 100644
--- a/gsk/next/gskgltexturelibrary.c
+++ b/gsk/next/gskgltexturelibrary.c
@@ -275,8 +275,8 @@ gsk_gl_texture_library_pack (GskGLTextureLibrary *self,
int packed_y;
gsk_gl_texture_atlases_pack (self->driver,
- width + padding,
- height + padding,
+ padding + width + padding,
+ padding + height + padding,
&atlas,
&packed_x,
&packed_y);
@@ -293,7 +293,9 @@ gsk_gl_texture_library_pack (GskGLTextureLibrary *self,
}
else
{
- GskGLTexture *texture = gsk_gl_texture_library_pack_one (self, width + 2, height + 2);
+ GskGLTexture *texture = gsk_gl_texture_library_pack_one (self,
+ padding + width + padding,
+ padding + height + padding);
entry->texture = texture;
entry->is_atlased = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]