From e5b0f474ab49e08a6048418a46ee1a9915c4c3c8 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 17 Oct 2019 14:48:43 -0400 Subject: [PATCH] cogl: Remove some unused framebuffer API https://gitlab.gnome.org/GNOME/mutter/merge_requests/913 --- cogl/cogl/cogl.symbols | 4 - .../deprecated/cogl-framebuffer-deprecated.c | 35 --------- .../deprecated/cogl-framebuffer-deprecated.h | 73 ------------------- 3 files changed, 112 deletions(-) diff --git a/cogl/cogl/cogl.symbols b/cogl/cogl/cogl.symbols index 86d1dfbf9..21ad323a7 100644 --- a/cogl/cogl/cogl.symbols +++ b/cogl/cogl/cogl.symbols @@ -227,7 +227,6 @@ cogl_framebuffer_finish cogl_framebuffer_frustum cogl_framebuffer_get_alpha_bits cogl_framebuffer_get_blue_bits -cogl_framebuffer_get_color_format cogl_framebuffer_get_context cogl_framebuffer_get_depth_bits cogl_framebuffer_get_depth_write_enabled @@ -719,9 +718,6 @@ cogl_scale cogl_set_backface_culling_enabled cogl_set_depth_test_enabled -#ifndef COGL_DISABLE_DEPRECATED -cogl_set_draw_buffer -#endif #ifdef COGL_HAS_SDL_SUPPORT cogl_sdl_context_new cogl_sdl_handle_event diff --git a/cogl/cogl/deprecated/cogl-framebuffer-deprecated.c b/cogl/cogl/deprecated/cogl-framebuffer-deprecated.c index 012ed4e1d..15aefe3c0 100644 --- a/cogl/cogl/deprecated/cogl-framebuffer-deprecated.c +++ b/cogl/cogl/deprecated/cogl-framebuffer-deprecated.c @@ -163,21 +163,6 @@ cogl_set_framebuffer (CoglFramebuffer *framebuffer) _cogl_set_framebuffers (framebuffer, framebuffer); } -/* XXX: deprecated API */ -void -cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle handle) -{ - _COGL_GET_CONTEXT (ctx, NO_RETVAL); - - if (target == COGL_WINDOW_BUFFER) - handle = ctx->window_buffer; - - /* This is deprecated public API. The public API doesn't currently - really expose the concept of separate draw and read buffers so - for the time being this actually just sets both buffers */ - cogl_set_framebuffer (handle); -} - CoglFramebuffer * cogl_get_draw_framebuffer (void) { @@ -244,13 +229,6 @@ cogl_push_framebuffer (CoglFramebuffer *buffer) _cogl_push_framebuffers (buffer, buffer); } -/* XXX: deprecated API */ -void -cogl_push_draw_buffer (void) -{ - cogl_push_framebuffer (cogl_get_draw_framebuffer ()); -} - void cogl_pop_framebuffer (void) { @@ -280,16 +258,3 @@ cogl_pop_framebuffer (void) g_slist_delete_link (ctx->framebuffer_stack, ctx->framebuffer_stack); } - -/* XXX: deprecated API */ -void -cogl_pop_draw_buffer (void) -{ - cogl_pop_framebuffer (); -} - -CoglPixelFormat -cogl_framebuffer_get_color_format (CoglFramebuffer *framebuffer) -{ - return framebuffer->internal_format; -} diff --git a/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h b/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h index 6b947d7b5..e0f6a4236 100644 --- a/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h +++ b/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h @@ -153,53 +153,6 @@ COGL_DEPRECATED void cogl_pop_framebuffer (void); -/** - * cogl_set_draw_buffer: - * @target: A #CoglBufferTarget that specifies what kind of framebuffer you - * are setting as the render target. - * @offscreen: If you are setting a framebuffer of type COGL_OFFSCREEN_BUFFER - * then this is a CoglHandle for the offscreen buffer. - * - * Redirects all subsequent drawing to the specified framebuffer. This - * can either be an offscreen buffer created with - * cogl_offscreen_new_to_texture () or you can revert to your original - * on screen window buffer. - * - * Deprecated: 1.16: The latest drawing apis take explicit - * #CoglFramebuffer arguments so this stack of - * framebuffers shouldn't be used anymore. - */ -COGL_DEPRECATED -void -cogl_set_draw_buffer (CoglBufferTarget target, - CoglHandle offscreen); - -/** - * cogl_push_draw_buffer: - * - * Save cogl_set_draw_buffer() state. - * - * Deprecated: 1.16: The latest drawing apis take explicit - * #CoglFramebuffer arguments so this stack of - * framebuffers shouldn't be used anymore. - */ -COGL_DEPRECATED -void -cogl_push_draw_buffer (void); - -/** - * cogl_pop_draw_buffer: - * - * Restore cogl_set_draw_buffer() state. - * - * Deprecated: 1.16: The latest drawing apis take explicit - * #CoglFramebuffer arguments so this stack of - * framebuffers shouldn't be used anymore. - */ -COGL_DEPRECATED -void -cogl_pop_draw_buffer (void); - /** * cogl_read_pixels: * @x: The window x position to start reading from @@ -234,32 +187,6 @@ cogl_read_pixels (int x, CoglPixelFormat format, uint8_t *pixels); - -/* XXX: Since this api was marked unstable, maybe we can just - * remove this api if we can't find anyone is using it. */ -/** - * cogl_framebuffer_get_color_format: (skip) - * @framebuffer: A #CoglFramebuffer framebuffer - * - * Queries the common #CoglPixelFormat of all color buffers attached - * to this framebuffer. For an offscreen framebuffer created with - * cogl_offscreen_new_with_texture() this will correspond to the format - * of the texture. - * - * This API is deprecated because it is missleading to report a - * #CoglPixelFormat for the internal format of the @framebuffer since - * #CoglPixelFormat is such a precise format description and it's - * only the set of components and the premultiplied alpha status - * that is really known. - * - * Since: 1.8 - * Stability: unstable - * Deprecated 1.18: Removed since it is misleading - */ -COGL_DEPRECATED -CoglPixelFormat -cogl_framebuffer_get_color_format (CoglFramebuffer *framebuffer); - G_END_DECLS #endif /* __COGL_FRAMEBUFFER_DEPRECATED_H__ */