forked from AuroraMiddleware/gtk
broadway: Remove remaining unused window_update code
This commit is contained in:
parent
f7d8ee041b
commit
54e7a8f0c0
@ -286,17 +286,6 @@ broadway_output_set_transient_for (BroadwayOutput *output,
|
||||
append_uint16 (output, parent_id);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_window_update (BroadwayOutput *output,
|
||||
int id,
|
||||
guint32 texture)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_WINDOW_UPDATE);
|
||||
|
||||
append_uint16 (output, id);
|
||||
append_uint32 (output, texture);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_window_set_nodes (BroadwayOutput *output,
|
||||
int id,
|
||||
|
@ -53,9 +53,6 @@ void broadway_output_move_resize_surface (BroadwayOutput *output,
|
||||
void broadway_output_set_transient_for (BroadwayOutput *output,
|
||||
int id,
|
||||
int parent_id);
|
||||
void broadway_output_window_update (BroadwayOutput *output,
|
||||
int id,
|
||||
guint32 texture);
|
||||
void broadway_output_window_set_nodes (BroadwayOutput *output,
|
||||
int id,
|
||||
guint32 *data,
|
||||
|
@ -160,7 +160,6 @@ typedef enum {
|
||||
BROADWAY_REQUEST_SHOW_WINDOW,
|
||||
BROADWAY_REQUEST_HIDE_WINDOW,
|
||||
BROADWAY_REQUEST_SET_TRANSIENT_FOR,
|
||||
BROADWAY_REQUEST_UPDATE,
|
||||
BROADWAY_REQUEST_MOVE_RESIZE,
|
||||
BROADWAY_REQUEST_GRAB_POINTER,
|
||||
BROADWAY_REQUEST_UNGRAB_POINTER,
|
||||
@ -188,12 +187,6 @@ typedef struct {
|
||||
guint32 parent;
|
||||
} BroadwayRequestSetTransientFor;
|
||||
|
||||
typedef struct {
|
||||
BroadwayRequestBase base;
|
||||
guint32 id;
|
||||
guint32 texture;
|
||||
} BroadwayRequestUpdate;
|
||||
|
||||
typedef struct {
|
||||
BroadwayRequestBase base;
|
||||
guint32 id;
|
||||
@ -260,7 +253,6 @@ typedef union {
|
||||
BroadwayRequestShowWindow show_window;
|
||||
BroadwayRequestHideWindow hide_window;
|
||||
BroadwayRequestSetTransientFor set_transient_for;
|
||||
BroadwayRequestUpdate update;
|
||||
BroadwayRequestMoveResize move_resize;
|
||||
BroadwayRequestGrabPointer grab_pointer;
|
||||
BroadwayRequestUngrabPointer ungrab_pointer;
|
||||
|
@ -1518,24 +1518,6 @@ broadway_server_has_client (BroadwayServer *server)
|
||||
return server->output != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
broadway_server_window_update (BroadwayServer *server,
|
||||
gint id,
|
||||
guint32 texture)
|
||||
{
|
||||
BroadwayWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (server->id_ht, GINT_TO_POINTER (id));
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
window->texture = texture;
|
||||
|
||||
if (server->output != NULL)
|
||||
broadway_output_window_update (server->output, window->id,
|
||||
window->texture);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_server_window_set_nodes (BroadwayServer *server,
|
||||
gint id,
|
||||
@ -1803,9 +1785,6 @@ broadway_server_resync_windows (BroadwayServer *server)
|
||||
broadway_output_window_set_nodes (server->output, window->id,
|
||||
window->nodes, window->nodes_len);
|
||||
|
||||
broadway_output_window_update (server->output, window->id,
|
||||
window->texture);
|
||||
|
||||
if (window->visible)
|
||||
broadway_output_show_surface (server->output, window->id);
|
||||
}
|
||||
|
@ -82,9 +82,6 @@ void broadway_server_release_texture (BroadwayServer *
|
||||
guint32 id);
|
||||
cairo_surface_t * broadway_server_create_surface (int width,
|
||||
int height);
|
||||
void broadway_server_window_update (BroadwayServer *server,
|
||||
gint id,
|
||||
guint32 texture);
|
||||
void broadway_server_window_set_nodes (BroadwayServer *server,
|
||||
gint id,
|
||||
gint n_data,
|
||||
|
@ -291,14 +291,6 @@ function cmdLowerSurface(id)
|
||||
restackWindows();
|
||||
}
|
||||
|
||||
function cmdWindowUpdate(id, texture_id)
|
||||
{
|
||||
var surface = surfaces[id];
|
||||
var texture_url = textures[texture_id];
|
||||
|
||||
surface.div.src = texture_url;
|
||||
}
|
||||
|
||||
function handleNode(parent, node_data, data_pos)
|
||||
{
|
||||
var type = node_data[data_pos++];
|
||||
@ -459,12 +451,6 @@ function handleCommands(cmd)
|
||||
cmdLowerSurface(id);
|
||||
break;
|
||||
|
||||
case 'b': // Update window
|
||||
id = cmd.get_16();
|
||||
var texture = cmd.get_32();
|
||||
cmdWindowUpdate(id, texture);
|
||||
break;
|
||||
|
||||
case 't': // Upload texture
|
||||
id = cmd.get_32();
|
||||
var data = cmd.get_data();
|
||||
|
@ -282,13 +282,6 @@ client_handle_request (BroadwayClient *client,
|
||||
request->set_transient_for.id,
|
||||
request->set_transient_for.parent);
|
||||
break;
|
||||
case BROADWAY_REQUEST_UPDATE:
|
||||
global_id = GPOINTER_TO_INT (g_hash_table_lookup (client->textures,
|
||||
GINT_TO_POINTER (request->update.texture)));
|
||||
broadway_server_window_update (server,
|
||||
request->update.id,
|
||||
global_id);
|
||||
break;
|
||||
case BROADWAY_REQUEST_SET_NODES:
|
||||
{
|
||||
gsize array_size = request->base.size - sizeof (BroadwayRequestSetNodes) + sizeof(guint32);
|
||||
|
@ -552,20 +552,6 @@ _gdk_broadway_server_window_set_transient_for (GdkBroadwayServer *server,
|
||||
BROADWAY_REQUEST_SET_TRANSIENT_FOR);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_server_window_update (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
guint32 texture)
|
||||
{
|
||||
BroadwayRequestUpdate msg;
|
||||
|
||||
msg.id = id;
|
||||
msg.texture = texture;
|
||||
|
||||
gdk_broadway_server_send_message (server, msg,
|
||||
BROADWAY_REQUEST_UPDATE);
|
||||
}
|
||||
|
||||
static int
|
||||
open_shared_memory (void)
|
||||
{
|
||||
|
@ -63,9 +63,6 @@ guint32 gdk_broadway_server_upload_texture (GdkBroadwaySer
|
||||
GdkTexture *texture);
|
||||
void gdk_broadway_server_release_texture (GdkBroadwayServer *server,
|
||||
guint32 id);
|
||||
void _gdk_broadway_server_window_update (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
guint32 texture);
|
||||
void gdk_broadway_server_window_set_nodes (GdkBroadwayServer *server,
|
||||
guint32 id,
|
||||
GArray *nodes);
|
||||
|
@ -99,53 +99,12 @@ find_broadway_display (void)
|
||||
static void
|
||||
update_dirty_windows_and_sync (void)
|
||||
{
|
||||
GList *l;
|
||||
GdkBroadwayDisplay *display;
|
||||
gboolean updated_surface;
|
||||
|
||||
display = GDK_BROADWAY_DISPLAY (find_broadway_display ());
|
||||
g_assert (display != NULL);
|
||||
|
||||
updated_surface = FALSE;
|
||||
for (l = display->toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = l->data;
|
||||
|
||||
if (impl->dirty)
|
||||
{
|
||||
GdkTexture *texture;
|
||||
guint32 texture_id;
|
||||
|
||||
impl->dirty = FALSE;
|
||||
updated_surface = TRUE;
|
||||
|
||||
if (impl->texture_id)
|
||||
gdk_broadway_server_release_texture (display->server, impl->texture_id);
|
||||
impl->texture_id = 0;
|
||||
|
||||
texture = gdk_texture_new_for_surface (impl->surface);
|
||||
texture_id = gdk_broadway_server_upload_texture (display->server, texture);
|
||||
g_object_unref (texture);
|
||||
|
||||
impl->texture_id = texture_id;
|
||||
|
||||
|
||||
if (impl->node_data)
|
||||
gdk_broadway_server_window_set_nodes (display->server, impl->id, impl->node_data);
|
||||
|
||||
_gdk_broadway_server_window_update (display->server,
|
||||
impl->id,
|
||||
texture_id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* We sync here to ensure all references to the impl->surface memory
|
||||
is done, as we may later paint new data in them. */
|
||||
if (updated_surface)
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
else
|
||||
gdk_display_flush (GDK_DISPLAY (display));
|
||||
gdk_display_flush (GDK_DISPLAY (display));
|
||||
}
|
||||
|
||||
static guint flush_id = 0;
|
||||
@ -360,8 +319,6 @@ _gdk_broadway_window_destroy (GdkWindow *window,
|
||||
g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER (impl->id));
|
||||
|
||||
_gdk_broadway_server_destroy_window (broadway_display->server, impl->id);
|
||||
if (impl->texture_id)
|
||||
gdk_broadway_server_release_texture (broadway_display->server, impl->texture_id);
|
||||
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,6 @@ struct _GdkWindowImplBroadway
|
||||
GdkCursor *cursor;
|
||||
|
||||
int id;
|
||||
int texture_id;
|
||||
|
||||
gboolean visible;
|
||||
gboolean maximized;
|
||||
|
Loading…
Reference in New Issue
Block a user