1
0
Fork 0

cogl: Remove unused private functions

The commit also moves certain functions from the private header
as they are not used anywhere else and removes COGL_EXPORT
when the function is supposed to be private and is not used outside of
cogl

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
This commit is contained in:
Bilal Elmoussaoui 2023-12-02 11:57:42 +01:00 committed by Marge Bot
parent 5d9e9707dd
commit 6b29371db3
19 changed files with 21 additions and 110 deletions

View file

@ -110,9 +110,6 @@ struct _CoglBufferClass
GObjectClass parent_class; GObjectClass parent_class;
}; };
CoglBufferUsageHint
_cogl_buffer_get_usage_hint (CoglBuffer *buffer);
CoglBuffer * CoglBuffer *
_cogl_buffer_immutable_ref (CoglBuffer *buffer); _cogl_buffer_immutable_ref (CoglBuffer *buffer);
@ -142,10 +139,8 @@ void *
_cogl_buffer_map_range_for_fill_or_fallback (CoglBuffer *buffer, _cogl_buffer_map_range_for_fill_or_fallback (CoglBuffer *buffer,
size_t offset, size_t offset,
size_t size); size_t size);
COGL_EXPORT void *
_cogl_buffer_map_for_fill_or_fallback (CoglBuffer *buffer);
COGL_EXPORT void void
_cogl_buffer_unmap_for_fill_or_fallback (CoglBuffer *buffer); _cogl_buffer_unmap_for_fill_or_fallback (CoglBuffer *buffer);
G_END_DECLS G_END_DECLS

View file

@ -324,12 +324,6 @@ cogl_buffer_unmap (CoglBuffer *buffer)
buffer->unmap (buffer); buffer->unmap (buffer);
} }
void *
_cogl_buffer_map_for_fill_or_fallback (CoglBuffer *buffer)
{
return _cogl_buffer_map_range_for_fill_or_fallback (buffer, 0, buffer->size);
}
void * void *
_cogl_buffer_map_range_for_fill_or_fallback (CoglBuffer *buffer, _cogl_buffer_map_range_for_fill_or_fallback (CoglBuffer *buffer,
size_t offset, size_t offset,

View file

@ -64,7 +64,7 @@ typedef struct _CoglClosure
* Removes the given closure from the callback list it is connected to * Removes the given closure from the callback list it is connected to
* and destroys it. If the closure was created with a destroy function * and destroys it. If the closure was created with a destroy function
* then it will be invoked. */ * then it will be invoked. */
COGL_EXPORT void void
_cogl_closure_disconnect (CoglClosure *closure); _cogl_closure_disconnect (CoglClosure *closure);
void void

View file

@ -152,8 +152,6 @@ _cogl_framebuffer_set_internal_format (CoglFramebuffer *framebuffer,
CoglPixelFormat CoglPixelFormat
cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer); cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer);
void _cogl_framebuffer_free (CoglFramebuffer *framebuffer);
void void
_cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer, _cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
unsigned long buffers, unsigned long buffers,
@ -181,10 +179,10 @@ cogl_framebuffer_set_depth_buffer_clear_needed (CoglFramebuffer *framebuffer);
CoglClipStack * CoglClipStack *
_cogl_framebuffer_get_clip_stack (CoglFramebuffer *framebuffer); _cogl_framebuffer_get_clip_stack (CoglFramebuffer *framebuffer);
COGL_EXPORT CoglMatrixStack * CoglMatrixStack *
_cogl_framebuffer_get_modelview_stack (CoglFramebuffer *framebuffer); _cogl_framebuffer_get_modelview_stack (CoglFramebuffer *framebuffer);
COGL_EXPORT CoglMatrixStack * CoglMatrixStack *
_cogl_framebuffer_get_projection_stack (CoglFramebuffer *framebuffer); _cogl_framebuffer_get_projection_stack (CoglFramebuffer *framebuffer);
void void
@ -203,20 +201,6 @@ cogl_context_flush_framebuffer_state (CoglContext *context,
CoglFramebuffer *read_buffer, CoglFramebuffer *read_buffer,
CoglFramebufferState state); CoglFramebufferState state);
CoglFramebuffer *
_cogl_get_read_framebuffer (void);
GSList *
_cogl_create_framebuffer_stack (void);
void
_cogl_free_framebuffer_stack (GSList *stack);
void
_cogl_framebuffer_save_clip_stack (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_restore_clip_stack (CoglFramebuffer *framebuffer);
/* This can be called directly by the CoglJournal to draw attributes /* This can be called directly by the CoglJournal to draw attributes
* skipping the implicit journal flush, the framebuffer flush and * skipping the implicit journal flush, the framebuffer flush and
@ -282,17 +266,6 @@ _cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
CoglBitmap *bitmap, CoglBitmap *bitmap,
GError **error); GError **error);
/*
* _cogl_framebuffer_get_stencil_bits:
* @framebuffer: a pointer to a #CoglFramebuffer
*
* Retrieves the number of stencil bits of @framebuffer
*
* Return value: the number of bits
*/
COGL_EXPORT int
_cogl_framebuffer_get_stencil_bits (CoglFramebuffer *framebuffer);
CoglJournal * CoglJournal *
cogl_framebuffer_get_journal (CoglFramebuffer *framebuffer); cogl_framebuffer_get_journal (CoglFramebuffer *framebuffer);

View file

@ -1176,16 +1176,6 @@ cogl_framebuffer_get_depth_bits (CoglFramebuffer *framebuffer)
return bits.depth; return bits.depth;
} }
int
_cogl_framebuffer_get_stencil_bits (CoglFramebuffer *framebuffer)
{
CoglFramebufferBits bits;
cogl_framebuffer_query_bits (framebuffer, &bits);
return bits.stencil;
}
gboolean gboolean
cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer) cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer)
{ {

View file

@ -70,7 +70,6 @@ typedef struct _CoglJournal
#define COGL_TYPE_JOURNAL (cogl_journal_get_type ()) #define COGL_TYPE_JOURNAL (cogl_journal_get_type ())
COGL_EXPORT
G_DECLARE_FINAL_TYPE (CoglJournal, G_DECLARE_FINAL_TYPE (CoglJournal,
cogl_journal, cogl_journal,
COGL, COGL,

View file

@ -75,7 +75,6 @@ struct _CoglNodeClass
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoglNode, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoglNode, g_object_unref)
COGL_EXPORT
GType cogl_node_get_type (void) G_GNUC_CONST; GType cogl_node_get_type (void) G_GNUC_CONST;
void void

View file

@ -54,15 +54,10 @@ typedef struct _CoglOnscreenQueuedDirty
CoglOnscreenDirtyInfo info; CoglOnscreenDirtyInfo info;
} CoglOnscreenQueuedDirty; } CoglOnscreenQueuedDirty;
COGL_EXPORT void void
_cogl_framebuffer_winsys_update_size (CoglFramebuffer *framebuffer, _cogl_framebuffer_winsys_update_size (CoglFramebuffer *framebuffer,
int width, int height); int width, int height);
void
_cogl_onscreen_queue_event (CoglOnscreen *onscreen,
CoglFrameEvent type,
CoglFrameInfo *info);
COGL_EXPORT void COGL_EXPORT void
_cogl_onscreen_notify_frame_sync (CoglOnscreen *onscreen, CoglFrameInfo *info); _cogl_onscreen_notify_frame_sync (CoglOnscreen *onscreen, CoglFrameInfo *info);
@ -73,20 +68,9 @@ void
_cogl_onscreen_queue_dirty (CoglOnscreen *onscreen, _cogl_onscreen_queue_dirty (CoglOnscreen *onscreen,
const CoglOnscreenDirtyInfo *info); const CoglOnscreenDirtyInfo *info);
void
_cogl_onscreen_queue_full_dirty (CoglOnscreen *onscreen);
void void
cogl_onscreen_bind (CoglOnscreen *onscreen); cogl_onscreen_bind (CoglOnscreen *onscreen);
COGL_EXPORT void
cogl_onscreen_set_winsys (CoglOnscreen *onscreen,
gpointer winsys);
COGL_EXPORT gpointer
cogl_onscreen_get_winsys (CoglOnscreen *onscreen);
COGL_EXPORT CoglFrameInfo * COGL_EXPORT CoglFrameInfo *
cogl_onscreen_peek_head_frame_info (CoglOnscreen *onscreen); cogl_onscreen_peek_head_frame_info (CoglOnscreen *onscreen);

View file

@ -55,6 +55,9 @@ typedef struct _CoglOnscreenPrivate
GQueue pending_frame_infos; GQueue pending_frame_infos;
} CoglOnscreenPrivate; } CoglOnscreenPrivate;
static void
_cogl_onscreen_queue_full_dirty (CoglOnscreen *onscreen);
G_DEFINE_TYPE_WITH_PRIVATE (CoglOnscreen, cogl_onscreen, COGL_TYPE_FRAMEBUFFER) G_DEFINE_TYPE_WITH_PRIVATE (CoglOnscreen, cogl_onscreen, COGL_TYPE_FRAMEBUFFER)
static gpointer static gpointer
@ -275,7 +278,7 @@ _cogl_onscreen_queue_full_dirty (CoglOnscreen *onscreen)
_cogl_onscreen_queue_dirty (onscreen, &info); _cogl_onscreen_queue_dirty (onscreen, &info);
} }
void static void
_cogl_onscreen_queue_event (CoglOnscreen *onscreen, _cogl_onscreen_queue_event (CoglOnscreen *onscreen,
CoglFrameEvent type, CoglFrameEvent type,
CoglFrameInfo *info) CoglFrameInfo *info)

View file

@ -56,7 +56,6 @@ typedef struct _CoglPipelineLayer CoglPipelineLayer;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoglPipelineLayer, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoglPipelineLayer, g_object_unref)
COGL_EXPORT
GType cogl_pipeline_layer_get_type (void) G_GNUC_CONST; GType cogl_pipeline_layer_get_type (void) G_GNUC_CONST;
/* XXX: should I rename these as /* XXX: should I rename these as
@ -342,18 +341,12 @@ typedef enum
CoglPipelineLayerType CoglPipelineLayerType
_cogl_pipeline_layer_get_type (CoglPipelineLayer *layer); _cogl_pipeline_layer_get_type (CoglPipelineLayer *layer);
COGL_EXPORT CoglTexture * CoglTexture *
_cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer); _cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer);
CoglTexture * CoglTexture *
_cogl_pipeline_layer_get_texture_real (CoglPipelineLayer *layer); _cogl_pipeline_layer_get_texture_real (CoglPipelineLayer *layer);
CoglPipelineWrapMode
_cogl_pipeline_layer_get_wrap_mode_s (CoglPipelineLayer *layer);
CoglPipelineWrapMode
_cogl_pipeline_layer_get_wrap_mode_t (CoglPipelineLayer *layer);
void void
_cogl_pipeline_layer_copy_differences (CoglPipelineLayer *dest, _cogl_pipeline_layer_copy_differences (CoglPipelineLayer *dest,
CoglPipelineLayer *src, CoglPipelineLayer *src,

View file

@ -412,7 +412,7 @@ cogl_pipeline_set_layer_wrap_mode (CoglPipeline *pipeline,
} }
/* FIXME: deprecate this API */ /* FIXME: deprecate this API */
CoglPipelineWrapMode static CoglPipelineWrapMode
_cogl_pipeline_layer_get_wrap_mode_s (CoglPipelineLayer *layer) _cogl_pipeline_layer_get_wrap_mode_s (CoglPipelineLayer *layer)
{ {
CoglPipelineLayerState change = COGL_PIPELINE_LAYER_STATE_SAMPLER; CoglPipelineLayerState change = COGL_PIPELINE_LAYER_STATE_SAMPLER;
@ -449,7 +449,7 @@ cogl_pipeline_get_layer_wrap_mode_s (CoglPipeline *pipeline, int layer_index)
} }
/* FIXME: deprecate this API */ /* FIXME: deprecate this API */
CoglPipelineWrapMode static CoglPipelineWrapMode
_cogl_pipeline_layer_get_wrap_mode_t (CoglPipelineLayer *layer) _cogl_pipeline_layer_get_wrap_mode_t (CoglPipelineLayer *layer)
{ {
CoglPipelineLayerState change = COGL_PIPELINE_LAYER_STATE_SAMPLER; CoglPipelineLayerState change = COGL_PIPELINE_LAYER_STATE_SAMPLER;

View file

@ -766,7 +766,7 @@ _cogl_pipeline_get_layer_combine_constant (CoglPipeline *pipeline,
int layer_index, int layer_index,
float *constant); float *constant);
COGL_EXPORT void void
_cogl_pipeline_prune_to_n_layers (CoglPipeline *pipeline, int n); _cogl_pipeline_prune_to_n_layers (CoglPipeline *pipeline, int n);
@ -777,7 +777,7 @@ _cogl_pipeline_prune_to_n_layers (CoglPipeline *pipeline, int n);
typedef gboolean (*CoglPipelineInternalLayerCallback) (CoglPipelineLayer *layer, typedef gboolean (*CoglPipelineInternalLayerCallback) (CoglPipelineLayer *layer,
void *user_data); void *user_data);
COGL_EXPORT void void
_cogl_pipeline_foreach_layer_internal (CoglPipeline *pipeline, _cogl_pipeline_foreach_layer_internal (CoglPipeline *pipeline,
CoglPipelineInternalLayerCallback callback, CoglPipelineInternalLayerCallback callback,
void *user_data); void *user_data);

View file

@ -42,10 +42,6 @@ _cogl_pipeline_has_non_layer_vertex_snippets (CoglPipeline *pipeline);
gboolean gboolean
_cogl_pipeline_has_non_layer_fragment_snippets (CoglPipeline *pipeline); _cogl_pipeline_has_non_layer_fragment_snippets (CoglPipeline *pipeline);
gboolean
_cogl_pipeline_color_equal (CoglPipeline *authority0,
CoglPipeline *authority1);
gboolean gboolean
_cogl_pipeline_alpha_func_state_equal (CoglPipeline *authority0, _cogl_pipeline_alpha_func_state_equal (CoglPipeline *authority0,
CoglPipeline *authority1); CoglPipeline *authority1);
@ -73,10 +69,6 @@ gboolean
_cogl_pipeline_per_vertex_point_size_equal (CoglPipeline *authority0, _cogl_pipeline_per_vertex_point_size_equal (CoglPipeline *authority0,
CoglPipeline *authority1); CoglPipeline *authority1);
gboolean
_cogl_pipeline_logic_ops_state_equal (CoglPipeline *authority0,
CoglPipeline *authority1);
gboolean gboolean
_cogl_pipeline_user_shader_equal (CoglPipeline *authority0, _cogl_pipeline_user_shader_equal (CoglPipeline *authority0,
CoglPipeline *authority1); CoglPipeline *authority1);
@ -101,10 +93,6 @@ void
_cogl_pipeline_hash_color_state (CoglPipeline *authority, _cogl_pipeline_hash_color_state (CoglPipeline *authority,
CoglPipelineHashState *state); CoglPipelineHashState *state);
void
_cogl_pipeline_hash_layers_state (CoglPipeline *authority,
CoglPipelineHashState *state);
void void
_cogl_pipeline_hash_alpha_func_state (CoglPipeline *authority, _cogl_pipeline_hash_alpha_func_state (CoglPipeline *authority,
CoglPipelineHashState *state); CoglPipelineHashState *state);
@ -137,10 +125,6 @@ void
_cogl_pipeline_hash_per_vertex_point_size_state (CoglPipeline *authority, _cogl_pipeline_hash_per_vertex_point_size_state (CoglPipeline *authority,
CoglPipelineHashState *state); CoglPipelineHashState *state);
void
_cogl_pipeline_hash_logic_ops_state (CoglPipeline *authority,
CoglPipelineHashState *state);
void void
_cogl_pipeline_hash_cull_face_state (CoglPipeline *authority, _cogl_pipeline_hash_cull_face_state (CoglPipeline *authority,
CoglPipelineHashState *state); CoglPipelineHashState *state);

View file

@ -47,7 +47,7 @@
#define GL_FUNC_ADD 0x8006 #define GL_FUNC_ADD 0x8006
#endif #endif
gboolean static gboolean
_cogl_pipeline_color_equal (CoglPipeline *authority0, _cogl_pipeline_color_equal (CoglPipeline *authority0,
CoglPipeline *authority1) CoglPipeline *authority1)
{ {

View file

@ -2424,7 +2424,7 @@ _cogl_pipeline_hash_layer_cb (CoglPipelineLayer *layer,
return TRUE; return TRUE;
} }
void static void
_cogl_pipeline_hash_layers_state (CoglPipeline *authority, _cogl_pipeline_hash_layers_state (CoglPipeline *authority,
CoglPipelineHashState *state) CoglPipelineHashState *state)
{ {

View file

@ -34,13 +34,10 @@
#include "cogl/cogl-renderer.h" #include "cogl/cogl-renderer.h"
#include "cogl/cogl-closure-list-private.h" #include "cogl/cogl-closure-list-private.h"
void
_cogl_poll_renderer_remove_fd (CoglRenderer *renderer, int fd);
typedef int64_t (*CoglPollPrepareCallback) (void *user_data); typedef int64_t (*CoglPollPrepareCallback) (void *user_data);
typedef void (*CoglPollDispatchCallback) (void *user_data, int revents); typedef void (*CoglPollDispatchCallback) (void *user_data, int revents);
COGL_EXPORT void void
_cogl_poll_renderer_add_fd (CoglRenderer *renderer, _cogl_poll_renderer_add_fd (CoglRenderer *renderer,
int fd, int fd,
CoglPollFDEvent events, CoglPollFDEvent events,
@ -58,7 +55,7 @@ _cogl_poll_renderer_add_source (CoglRenderer *renderer,
typedef void (*CoglIdleCallback) (void *user_data); typedef void (*CoglIdleCallback) (void *user_data);
COGL_EXPORT CoglClosure * CoglClosure *
_cogl_poll_renderer_add_idle (CoglRenderer *renderer, _cogl_poll_renderer_add_idle (CoglRenderer *renderer,
CoglIdleCallback idle_cb, CoglIdleCallback idle_cb,
void *user_data, void *user_data,

View file

@ -143,7 +143,7 @@ find_pollfd (CoglRenderer *renderer, int fd)
return -1; return -1;
} }
void static void
_cogl_poll_renderer_remove_fd (CoglRenderer *renderer, int fd) _cogl_poll_renderer_remove_fd (CoglRenderer *renderer, int fd)
{ {
int i = find_pollfd (renderer, fd); int i = find_pollfd (renderer, fd);

View file

@ -58,7 +58,7 @@ _cogl_primitive_immutable_ref (CoglPrimitive *primitive);
void void
_cogl_primitive_immutable_unref (CoglPrimitive *primitive); _cogl_primitive_immutable_unref (CoglPrimitive *primitive);
COGL_EXPORT void void
_cogl_primitive_draw (CoglPrimitive *primitive, _cogl_primitive_draw (CoglPrimitive *primitive,
CoglFramebuffer *framebuffer, CoglFramebuffer *framebuffer,
CoglPipeline *pipeline, CoglPipeline *pipeline,

View file

@ -240,7 +240,7 @@ struct _CoglTexturePixel
uint8_t data[4]; uint8_t data[4];
}; };
COGL_EXPORT gboolean gboolean
_cogl_texture_can_hardware_repeat (CoglTexture *texture); _cogl_texture_can_hardware_repeat (CoglTexture *texture);
void void