cogl: Remove unused OnScreen dirty_closures
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
This commit is contained in:
parent
47d427a95d
commit
e638e5dfab
2 changed files with 0 additions and 126 deletions
|
@ -46,8 +46,6 @@ typedef struct _CoglOnscreenPrivate
|
|||
{
|
||||
CoglList frame_closures;
|
||||
|
||||
CoglList dirty_closures;
|
||||
|
||||
int64_t frame_counter;
|
||||
int64_t swap_frame_counter; /* frame counter at last all to
|
||||
* cogl_onscreen_swap_region() or
|
||||
|
@ -76,11 +74,6 @@ G_DEFINE_BOXED_TYPE (CoglFrameClosure,
|
|||
cogl_dummy_copy,
|
||||
cogl_dummy_free)
|
||||
|
||||
G_DEFINE_BOXED_TYPE (CoglOnscreenDirtyClosure,
|
||||
cogl_onscreen_dirty_closure,
|
||||
cogl_dummy_copy,
|
||||
cogl_dummy_free)
|
||||
|
||||
G_DEFINE_QUARK (cogl-scanout-error-quark, cogl_scanout_error)
|
||||
|
||||
static gboolean
|
||||
|
@ -114,7 +107,6 @@ cogl_onscreen_init_from_template (CoglOnscreen *onscreen,
|
|||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
|
||||
_cogl_list_init (&priv->frame_closures);
|
||||
_cogl_list_init (&priv->dirty_closures);
|
||||
|
||||
cogl_framebuffer_init_config (framebuffer, &onscreen_template->config);
|
||||
}
|
||||
|
@ -141,7 +133,6 @@ cogl_onscreen_dispose (GObject *object)
|
|||
CoglFrameInfo *frame_info;
|
||||
|
||||
_cogl_closure_list_disconnect_all (&priv->frame_closures);
|
||||
_cogl_closure_list_disconnect_all (&priv->dirty_closures);
|
||||
|
||||
while ((frame_info = g_queue_pop_tail (&priv->pending_frame_infos)))
|
||||
g_object_unref (frame_info);
|
||||
|
@ -216,16 +207,8 @@ _cogl_dispatch_onscreen_cb (CoglContext *context)
|
|||
_cogl_container_of (context->onscreen_dirty_queue.next,
|
||||
CoglOnscreenQueuedDirty,
|
||||
link);
|
||||
CoglOnscreen *onscreen = qe->onscreen;
|
||||
CoglOnscreenPrivate *priv = cogl_onscreen_get_instance_private (onscreen);
|
||||
|
||||
_cogl_list_remove (&qe->link);
|
||||
|
||||
_cogl_closure_list_invoke (&priv->dirty_closures,
|
||||
CoglOnscreenDirtyCallback,
|
||||
qe->onscreen,
|
||||
&qe->info);
|
||||
|
||||
g_object_unref (qe->onscreen);
|
||||
|
||||
g_free (qe);
|
||||
|
@ -561,29 +544,6 @@ _cogl_framebuffer_winsys_update_size (CoglFramebuffer *framebuffer,
|
|||
_cogl_onscreen_queue_full_dirty (COGL_ONSCREEN (framebuffer));
|
||||
}
|
||||
|
||||
CoglOnscreenDirtyClosure *
|
||||
cogl_onscreen_add_dirty_callback (CoglOnscreen *onscreen,
|
||||
CoglOnscreenDirtyCallback callback,
|
||||
void *user_data,
|
||||
GDestroyNotify destroy)
|
||||
{
|
||||
CoglOnscreenPrivate *priv = cogl_onscreen_get_instance_private (onscreen);
|
||||
|
||||
return _cogl_closure_list_add (&priv->dirty_closures,
|
||||
callback,
|
||||
user_data,
|
||||
destroy);
|
||||
}
|
||||
|
||||
void
|
||||
cogl_onscreen_remove_dirty_callback (CoglOnscreen *onscreen,
|
||||
CoglOnscreenDirtyClosure *closure)
|
||||
{
|
||||
g_return_if_fail (closure);
|
||||
|
||||
_cogl_closure_disconnect (closure);
|
||||
}
|
||||
|
||||
int64_t
|
||||
cogl_onscreen_get_frame_counter (CoglOnscreen *onscreen)
|
||||
{
|
||||
|
|
|
@ -472,92 +472,6 @@ struct _CoglOnscreenDirtyInfo
|
|||
int width, height;
|
||||
};
|
||||
|
||||
/**
|
||||
* CoglOnscreenDirtyCallback:
|
||||
* @onscreen: The onscreen that the frame is associated with
|
||||
* @info: A #CoglOnscreenDirtyInfo struct containing the details of the
|
||||
* dirty area
|
||||
* @user_data: The user pointer passed to
|
||||
* cogl_onscreen_add_frame_callback()
|
||||
*
|
||||
* Is a callback that can be registered via
|
||||
* cogl_onscreen_add_dirty_callback() to be called when the windowing
|
||||
* system determines that a region of the onscreen window has been
|
||||
* lost and the application should redraw it.
|
||||
*/
|
||||
typedef void (*CoglOnscreenDirtyCallback) (CoglOnscreen *onscreen,
|
||||
const CoglOnscreenDirtyInfo *info,
|
||||
void *user_data);
|
||||
|
||||
/**
|
||||
* CoglOnscreenDirtyClosure:
|
||||
*
|
||||
* An opaque type that tracks a #CoglOnscreenDirtyCallback and associated
|
||||
* user data. A #CoglOnscreenDirtyClosure pointer will be returned from
|
||||
* cogl_onscreen_add_dirty_callback() and it allows you to remove a
|
||||
* callback later using cogl_onscreen_remove_dirty_callback().
|
||||
*/
|
||||
typedef struct _CoglClosure CoglOnscreenDirtyClosure;
|
||||
|
||||
/**
|
||||
* cogl_onscreen_dirty_closure_get_type:
|
||||
*
|
||||
* Returns: a #GType that can be used with the GLib type system.
|
||||
*/
|
||||
COGL_EXPORT
|
||||
GType cogl_onscreen_dirty_closure_get_type (void);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_add_dirty_callback:
|
||||
* @onscreen: A #CoglOnscreen framebuffer
|
||||
* @callback: (scope notified): A callback function to call for dirty events
|
||||
* @user_data: (closure): A private pointer to be passed to @callback
|
||||
* @destroy: (allow-none): An optional callback to destroy @user_data when the
|
||||
* @callback is removed or @onscreen is freed.
|
||||
*
|
||||
* Installs a @callback function that will be called whenever the
|
||||
* window system has lost the contents of a region of the onscreen
|
||||
* buffer and the application should redraw it to repair the buffer.
|
||||
* For example this may happen in a window system without a compositor
|
||||
* if a window that was previously covering up the onscreen window has
|
||||
* been moved causing a region of the onscreen to be exposed.
|
||||
*
|
||||
* The @callback will be passed a #CoglOnscreenDirtyInfo struct which
|
||||
* describes a rectangle containing the newly dirtied region. Note that
|
||||
* this may be called multiple times to describe a non-rectangular
|
||||
* region composed of multiple smaller rectangles.
|
||||
*
|
||||
* The dirty events are separate from %COGL_FRAME_EVENT_SYNC events so
|
||||
* the application should also listen for this event before rendering
|
||||
* the dirty region to ensure that the framebuffer is actually ready
|
||||
* for rendering.
|
||||
*
|
||||
* Returns: (transfer none): a #CoglOnscreenDirtyClosure pointer that can be
|
||||
* used to remove the callback and associated @user_data later.
|
||||
*/
|
||||
COGL_EXPORT CoglOnscreenDirtyClosure *
|
||||
cogl_onscreen_add_dirty_callback (CoglOnscreen *onscreen,
|
||||
CoglOnscreenDirtyCallback callback,
|
||||
void *user_data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_remove_dirty_callback:
|
||||
* @onscreen: A #CoglOnscreen
|
||||
* @closure: A #CoglOnscreenDirtyClosure returned from
|
||||
* cogl_onscreen_add_dirty_callback()
|
||||
*
|
||||
* Removes a callback and associated user data that were previously
|
||||
* registered using cogl_onscreen_add_dirty_callback().
|
||||
*
|
||||
* If a destroy callback was passed to
|
||||
* cogl_onscreen_add_dirty_callback() to destroy the user data then
|
||||
* this will also get called.
|
||||
*/
|
||||
COGL_EXPORT void
|
||||
cogl_onscreen_remove_dirty_callback (CoglOnscreen *onscreen,
|
||||
CoglOnscreenDirtyClosure *closure);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_get_frame_counter:
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue