[gtk/wip/chergert/glproto: 141/493] fix some warnings




commit 4a45cdc09fa54056f2d52a969f4921faf0e0c731
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 7 21:12:59 2021 -0800

    fix some warnings

 gsk/next/gskgldriver.c        | 11 +++++---
 gsk/next/gskgldriverprivate.h | 66 ++++++++++++++++++++++---------------------
 2 files changed, 41 insertions(+), 36 deletions(-)
---
diff --git a/gsk/next/gskgldriver.c b/gsk/next/gskgldriver.c
index b5a7a39596..a8021d53b3 100644
--- a/gsk/next/gskgldriver.c
+++ b/gsk/next/gskgldriver.c
@@ -361,7 +361,7 @@ gsk_next_driver_get_context (GskNextDriver *self)
  * @out_fbo_id: (out): location for framebuffer id
  * @out_texture_id: (out): location for texture id
  *
- * Creates a new render target where @out_texture_id is bount
+ * Creates a new render target where @out_texture_id is bound
  * to the framebuffer @out_fbo_id using glFramebufferTexture2D().
  *
  * Returns: %TRUE if successful; otherwise %FALSE and @out_fbo_id and
@@ -520,10 +520,13 @@ gsk_next_driver_load_texture (GskNextDriver *self,
           source_texture = downloaded_texture;
         }
     }
-  else if ((t = gdk_texture_get_render_data (texture, self)))
+  else
     {
-      if (t->min_filter == min_filter && t->mag_filter == mag_filter)
-        return t->texture_id;
+      if ((t = gdk_texture_get_render_data (texture, self)))
+        {
+          if (t->min_filter == min_filter && t->mag_filter == mag_filter)
+            return t->texture_id;
+        }
 
       source_texture = texture;
     }
diff --git a/gsk/next/gskgldriverprivate.h b/gsk/next/gskgldriverprivate.h
index 85c4e380ee..793a217ad0 100644
--- a/gsk/next/gskgldriverprivate.h
+++ b/gsk/next/gskgldriverprivate.h
@@ -92,38 +92,40 @@ struct _GskNextDriver
   guint in_frame : 1;
 };
 
-GskNextDriver *gsk_next_driver_new                  (GskGLCommandQueue    *command_queue,
-                                                     gboolean              debug,
-                                                     GError              **error);
-GdkGLContext  *gsk_next_driver_get_context          (GskNextDriver        *self);
-gboolean       gsk_next_driver_create_render_target (GskNextDriver        *self,
-                                                     int                   width,
-                                                     int                   height,
-                                                     guint                *out_fbo_id,
-                                                     guint                *out_texture_id);
-void           gsk_next_driver_begin_frame          (GskNextDriver        *self);
-void           gsk_next_driver_end_frame            (GskNextDriver        *self);
-guint          gsk_next_driver_lookup_texture       (GskNextDriver        *self,
-                                                     const GskTextureKey  *key);
-void           gsk_next_driver_cache_texture        (GskNextDriver        *self,
-                                                     const GskTextureKey  *key,
-                                                     guint                 texture_id);
-guint          gsk_next_driver_load_texture         (GskNextDriver        *self,
-                                                     GdkTexture           *texture,
-                                                     int                   min_filter,
-                                                     int                   mag_filter);
-GskGLTexture  *gsk_next_driver_create_texture       (GskNextDriver        *self,
-                                                     float                 width,
-                                                     float                 height,
-                                                     int                   min_filter,
-                                                     int                   mag_filter);
-GskGLTexture  *gsk_next_driver_acquire_texture      (GskNextDriver        *self,
-                                                     float                 width,
-                                                     float                 height,
-                                                     int                   min_filter,
-                                                     int                   mag_filter);
-void           gsk_next_driver_release_texture      (GskNextDriver        *self,
-                                                     GskGLTexture         *texture);
+GskNextDriver *gsk_next_driver_new                     (GskGLCommandQueue    *command_queue,
+                                                        gboolean              debug,
+                                                        GError              **error);
+GdkGLContext  *gsk_next_driver_get_context             (GskNextDriver        *self);
+void           gsk_next_driver_autorelease_framebuffer (GskNextDriver        *self,
+                                                        guint                 framebuffer_id);
+gboolean       gsk_next_driver_create_render_target    (GskNextDriver        *self,
+                                                        int                   width,
+                                                        int                   height,
+                                                        guint                *out_fbo_id,
+                                                        guint                *out_texture_id);
+void           gsk_next_driver_begin_frame             (GskNextDriver        *self);
+void           gsk_next_driver_end_frame               (GskNextDriver        *self);
+guint          gsk_next_driver_lookup_texture          (GskNextDriver        *self,
+                                                        const GskTextureKey  *key);
+void           gsk_next_driver_cache_texture           (GskNextDriver        *self,
+                                                        const GskTextureKey  *key,
+                                                        guint                 texture_id);
+guint          gsk_next_driver_load_texture            (GskNextDriver        *self,
+                                                        GdkTexture           *texture,
+                                                        int                   min_filter,
+                                                        int                   mag_filter);
+GskGLTexture  *gsk_next_driver_create_texture          (GskNextDriver        *self,
+                                                        float                 width,
+                                                        float                 height,
+                                                        int                   min_filter,
+                                                        int                   mag_filter);
+GskGLTexture  *gsk_next_driver_acquire_texture         (GskNextDriver        *self,
+                                                        float                 width,
+                                                        float                 height,
+                                                        int                   min_filter,
+                                                        int                   mag_filter);
+void           gsk_next_driver_release_texture         (GskNextDriver        *self,
+                                                        GskGLTexture         *texture);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]