[gtk+/wip/alexl/broadway4] broadway: Remove remaining unused window_update code
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/alexl/broadway4] broadway: Remove remaining unused window_update code
- Date: Tue, 21 Nov 2017 23:39:17 +0000 (UTC)
commit 63ac78c3bd5b92fb8c11a98b71c116c872c6e8ef
Author: Alexander Larsson <alexl redhat com>
Date: Tue Nov 21 19:49:29 2017 +0100
broadway: Remove remaining unused window_update code
gdk/broadway/broadway-output.c | 11 ---------
gdk/broadway/broadway-output.h | 3 --
gdk/broadway/broadway-protocol.h | 8 ------
gdk/broadway/broadway-server.c | 21 -----------------
gdk/broadway/broadway-server.h | 3 --
gdk/broadway/broadway.js | 14 -----------
gdk/broadway/broadwayd.c | 7 -----
gdk/broadway/gdkbroadway-server.c | 14 -----------
gdk/broadway/gdkbroadway-server.h | 3 --
gdk/broadway/gdkwindow-broadway.c | 45 +------------------------------------
gdk/broadway/gdkwindow-broadway.h | 1 -
11 files changed, 1 insertions(+), 129 deletions(-)
---
diff --git a/gdk/broadway/broadway-output.c b/gdk/broadway/broadway-output.c
index 89326c5..193d68e 100644
--- a/gdk/broadway/broadway-output.c
+++ b/gdk/broadway/broadway-output.c
@@ -287,17 +287,6 @@ broadway_output_set_transient_for (BroadwayOutput *output,
}
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,
guint32 *data,
diff --git a/gdk/broadway/broadway-output.h b/gdk/broadway/broadway-output.h
index eb29c17..024df8e 100644
--- a/gdk/broadway/broadway-output.h
+++ b/gdk/broadway/broadway-output.h
@@ -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,
diff --git a/gdk/broadway/broadway-protocol.h b/gdk/broadway/broadway-protocol.h
index 7f7a5e9..3266330 100644
--- a/gdk/broadway/broadway-protocol.h
+++ b/gdk/broadway/broadway-protocol.h
@@ -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,
@@ -191,12 +190,6 @@ typedef struct {
typedef struct {
BroadwayRequestBase base;
guint32 id;
- guint32 texture;
-} BroadwayRequestUpdate;
-
-typedef struct {
- BroadwayRequestBase base;
- guint32 id;
guint32 offset;
guint32 size;
} BroadwayRequestUploadTexture;
@@ -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;
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c
index 4aa1b26..859fa68 100644
--- a/gdk/broadway/broadway-server.c
+++ b/gdk/broadway/broadway-server.c
@@ -1519,24 +1519,6 @@ broadway_server_has_client (BroadwayServer *server)
}
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,
gint n_data,
@@ -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);
}
diff --git a/gdk/broadway/broadway-server.h b/gdk/broadway/broadway-server.h
index 1432a0a..4bc81a7 100644
--- a/gdk/broadway/broadway-server.h
+++ b/gdk/broadway/broadway-server.h
@@ -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,
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 6192977..80bd9df 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -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();
diff --git a/gdk/broadway/broadwayd.c b/gdk/broadway/broadwayd.c
index b95e8c8..27ceff4 100644
--- a/gdk/broadway/broadwayd.c
+++ b/gdk/broadway/broadwayd.c
@@ -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);
diff --git a/gdk/broadway/gdkbroadway-server.c b/gdk/broadway/gdkbroadway-server.c
index f873a77..28959a7 100644
--- a/gdk/broadway/gdkbroadway-server.c
+++ b/gdk/broadway/gdkbroadway-server.c
@@ -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)
{
diff --git a/gdk/broadway/gdkbroadway-server.h b/gdk/broadway/gdkbroadway-server.h
index f679153..8ff26eb 100644
--- a/gdk/broadway/gdkbroadway-server.h
+++ b/gdk/broadway/gdkbroadway-server.h
@@ -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);
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index f1fe25d..4b71b45 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -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);
}
diff --git a/gdk/broadway/gdkwindow-broadway.h b/gdk/broadway/gdkwindow-broadway.h
index 925efbf..9e672f3 100644
--- a/gdk/broadway/gdkwindow-broadway.h
+++ b/gdk/broadway/gdkwindow-broadway.h
@@ -55,7 +55,6 @@ struct _GdkWindowImplBroadway
GdkCursor *cursor;
int id;
- int texture_id;
gboolean visible;
gboolean maximized;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]