[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e111a5f 08/35: Draw offscreen surface
From: |
Lars Ingebrigtsen |
Subject: |
master e111a5f 08/35: Draw offscreen surface |
Date: |
Sat, 6 Nov 2021 22:01:55 -0400 (EDT) |
branch: master
commit e111a5f3a0a3f1354df6bfb23cb121f38046853b
Author: Po Lu <luangruo@yahoo.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Draw offscreen surface
* src/xwidget.c (xv_do_draw): Draw offscreen surface.
---
src/xwidget.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/xwidget.c b/src/xwidget.c
index ff7d095..c758987 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -520,12 +520,20 @@ xwidget_hide_view (struct xwidget_view *xv)
static void
xv_do_draw (struct xwidget_view *xw, struct xwidget *w)
{
+ GtkOffscreenWindow *wnd;
+ cairo_surface_t *surface;
block_input ();
+ wnd = GTK_OFFSCREEN_WINDOW (w->widgetwindow_osr);
+ surface = gtk_offscreen_window_get_surface (wnd);
cairo_save (xw->cr_context);
- cairo_translate (xw->cr_context, -xw->clip_left,
- -xw->clip_top);
- gtk_widget_draw (w->widgetwindow_osr, xw->cr_context);
+ if (surface)
+ {
+ cairo_set_source_surface (xw->cr_context, surface, xw->clip_left,
+ xw->clip_top);
+ cairo_set_operator (xw->cr_context, CAIRO_OPERATOR_SOURCE);
+ cairo_paint (xw->cr_context);
+ }
cairo_restore (xw->cr_context);
unblock_input ();
- master f52f772 04/35: Allow xwidgets to accept motion and button events, (continued)
- master f52f772 04/35: Allow xwidgets to accept motion and button events, Lars Ingebrigtsen, 2021/11/06
- master c9c1b43 06/35: Use gtk_widget_queue_draw instead of xv_do_draw, Lars Ingebrigtsen, 2021/11/06
- master b48a89f 11/35: Fix special events in xwidgets, Lars Ingebrigtsen, 2021/11/06
- master 32b9df6 10/35: Fix drag on xwidget motion events, Lars Ingebrigtsen, 2021/11/06
- master 6ed7454 12/35: Add xwidget-webkit-edit-mode to make using the WebKit browser easier, Lars Ingebrigtsen, 2021/11/06
- master 8ddeebb 13/35: Allow enabling xwidget-webkit-edit-mode via a binding, Lars Ingebrigtsen, 2021/11/06
- master 74711c0 22/35: Display page titles in xwidget webkit header line, Lars Ingebrigtsen, 2021/11/06
- master eb5a079 24/35: Fix cursor for new widget views, Lars Ingebrigtsen, 2021/11/06
- master 1a84537 29/35: Add xwidget-webkit-isearch to the menu bar and tool bar, Lars Ingebrigtsen, 2021/11/06
- master e750329 28/35: Add xwidget-webkit-isearch-mode, Lars Ingebrigtsen, 2021/11/06
- master e111a5f 08/35: Draw offscreen surface,
Lars Ingebrigtsen <=
- master 3e64039 09/35: Handle crossing events on xwidget windows correctly, Lars Ingebrigtsen, 2021/11/06
- master 650e5e8 14/35: Fix xwidget scrolling, Lars Ingebrigtsen, 2021/11/06
- master 49ed706 15/35: Select window when clicking on an xwidget view, Lars Ingebrigtsen, 2021/11/06
- master d97718c 17/35: Add a menu to xwidget-webkit, Lars Ingebrigtsen, 2021/11/06
- master f1fbf87 20/35: Make the WebKit inspector available, Lars Ingebrigtsen, 2021/11/06
- master 7269bdd 21/35: Improve detail of load-changed xwidget events, Lars Ingebrigtsen, 2021/11/06
- master 32ec485 16/35: Redisplay xwidget view windows instead of just setting their size, Lars Ingebrigtsen, 2021/11/06
- master cd7158e 18/35: Add new tool-bar items to xwidget-webkit, Lars Ingebrigtsen, 2021/11/06
- master 8729ae2 19/35: Add xwidget-webkit-copy-selection-as-kill to the menu bar, Lars Ingebrigtsen, 2021/11/06
- master 1cc19d0 23/35: Add support for cursors in xwidget views, Lars Ingebrigtsen, 2021/11/06