cogl: Replace OnscreenDirtyInfo with MtkRectangle
It is a rectangle after all and is only used internally, so instead of making it private just replace it Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
This commit is contained in:
parent
6b0a289d77
commit
50fc438599
5 changed files with 9 additions and 27 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "cogl/cogl-framebuffer-private.h"
|
||||
#include "cogl/cogl-closure-list-private.h"
|
||||
#include "cogl/cogl-list.h"
|
||||
#include "mtk/mtk-rectangle.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
@ -51,7 +52,7 @@ typedef struct _CoglOnscreenQueuedDirty
|
|||
CoglList link;
|
||||
|
||||
CoglOnscreen *onscreen;
|
||||
CoglOnscreenDirtyInfo info;
|
||||
MtkRectangle info;
|
||||
} CoglOnscreenQueuedDirty;
|
||||
|
||||
void
|
||||
|
@ -65,8 +66,8 @@ COGL_EXPORT void
|
|||
_cogl_onscreen_notify_complete (CoglOnscreen *onscreen, CoglFrameInfo *info);
|
||||
|
||||
void
|
||||
_cogl_onscreen_queue_dirty (CoglOnscreen *onscreen,
|
||||
const CoglOnscreenDirtyInfo *info);
|
||||
_cogl_onscreen_queue_dirty (CoglOnscreen *onscreen,
|
||||
const MtkRectangle *info);
|
||||
|
||||
void
|
||||
cogl_onscreen_bind (CoglOnscreen *onscreen);
|
||||
|
|
|
@ -231,8 +231,8 @@ _cogl_onscreen_queue_dispatch_idle (CoglOnscreen *onscreen)
|
|||
}
|
||||
|
||||
void
|
||||
_cogl_onscreen_queue_dirty (CoglOnscreen *onscreen,
|
||||
const CoglOnscreenDirtyInfo *info)
|
||||
_cogl_onscreen_queue_dirty (CoglOnscreen *onscreen,
|
||||
const MtkRectangle *info)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
|
||||
|
@ -249,7 +249,7 @@ void
|
|||
_cogl_onscreen_queue_full_dirty (CoglOnscreen *onscreen)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
CoglOnscreenDirtyInfo info;
|
||||
MtkRectangle info;
|
||||
|
||||
info.x = 0;
|
||||
info.y = 0;
|
||||
|
|
|
@ -403,25 +403,6 @@ COGL_EXPORT void
|
|||
cogl_onscreen_remove_frame_callback (CoglOnscreen *onscreen,
|
||||
CoglFrameClosure *closure);
|
||||
|
||||
/**
|
||||
* CoglOnscreenDirtyInfo:
|
||||
* @x: Left edge of the dirty rectangle
|
||||
* @y: Top edge of the dirty rectangle, measured from the top of the window
|
||||
* @width: Width of the dirty rectangle
|
||||
* @height: Height of the dirty rectangle
|
||||
*
|
||||
* A structure passed to callbacks registered using
|
||||
* cogl_onscreen_add_dirty_callback(). The members describe a
|
||||
* rectangle within the onscreen buffer that should be redrawn.
|
||||
*/
|
||||
typedef struct _CoglOnscreenDirtyInfo CoglOnscreenDirtyInfo;
|
||||
|
||||
struct _CoglOnscreenDirtyInfo
|
||||
{
|
||||
int x, y;
|
||||
int width, height;
|
||||
};
|
||||
|
||||
/**
|
||||
* cogl_onscreen_get_frame_counter:
|
||||
*
|
||||
|
|
|
@ -121,7 +121,7 @@ event_filter_cb (XEvent *xevent, void *data)
|
|||
|
||||
if (onscreen)
|
||||
{
|
||||
CoglOnscreenDirtyInfo info;
|
||||
MtkRectangle info;
|
||||
|
||||
info.x = xevent->xexpose.x;
|
||||
info.y = xevent->xexpose.y;
|
||||
|
|
|
@ -226,7 +226,7 @@ glx_event_filter_cb (XEvent *xevent, void *data)
|
|||
|
||||
if (onscreen)
|
||||
{
|
||||
CoglOnscreenDirtyInfo info;
|
||||
MtkRectangle info;
|
||||
|
||||
info.x = xevent->xexpose.x;
|
||||
info.y = xevent->xexpose.y;
|
||||
|
|
Loading…
Reference in a new issue