Skip to content

Commit ce60c1c

Browse files
author
Yuuki Harano
authored
Merge pull request emacs-mirror#14 from fejfighter/pgtk-double-buffer-opt
PGTK double-buffer Optimisations
2 parents 01e02f4 + 4214851 commit ce60c1c

File tree

3 files changed

+110
-129
lines changed

3 files changed

+110
-129
lines changed

src/image.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
3434
#include <c-ctype.h>
3535
#include <flexmember.h>
3636

37-
#ifdef HAVE_PGTK
38-
#include <cairo.h>
39-
#endif
40-
4137
#include "lisp.h"
4238
#include "frame.h"
4339
#include "process.h"
@@ -406,7 +402,8 @@ static cairo_pattern_t *
406402
image_create_pattern_from_pixbuf (struct frame *f, GdkPixbuf *pixbuf)
407403
{
408404
GdkPixbuf *pb = gdk_pixbuf_add_alpha (pixbuf, TRUE, 255, 255, 255);
409-
cairo_surface_t *surface = cairo_surface_create_similar_image (f->output_data.pgtk->cr_surface,
405+
cairo_surface_t *surface = cairo_surface_create_similar_image (cairo_get_target(
406+
f->output_data.pgtk->cr_context),
410407
CAIRO_FORMAT_A1,
411408
gdk_pixbuf_get_width (pb),
412409
gdk_pixbuf_get_height (pb));

0 commit comments

Comments
 (0)