mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
5ef114ba42
This is based on the rolling hashes code from http://cgit.freedesktop.org/~krh/weston/log/?h=remote It works by incrementally calculating hashes for every 32x32 block in each frame sent, and then refering back to such blocks when encoding the next frame. This means we detect when a block matches an existing block in the previous frame in a different position. This is great for detecting scrolling, which we need now that the gdk level scrolling is neutered.
21 lines
874 B
C
21 lines
874 B
C
#ifndef __BROADWAY_BUFFER__
|
|
#define __BROADWAY_BUFFER__
|
|
|
|
#include "broadway-protocol.h"
|
|
#include <glib-object.h>
|
|
|
|
typedef struct _BroadwayBuffer BroadwayBuffer;
|
|
|
|
BroadwayBuffer *broadway_buffer_create (int width,
|
|
int height,
|
|
guint8 *data,
|
|
int stride);
|
|
void broadway_buffer_destroy (BroadwayBuffer *buffer);
|
|
void broadway_buffer_encode (BroadwayBuffer *buffer,
|
|
BroadwayBuffer *prev,
|
|
GString *dest);
|
|
int broadway_buffer_get_width (BroadwayBuffer *buffer);
|
|
int broadway_buffer_get_height (BroadwayBuffer *buffer);
|
|
|
|
#endif /* __BROADWAY_BUFFER__ */
|