emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1c3e868: Remove non-Xdbe double-buffering code on c


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] master 1c3e868: Remove non-Xdbe double-buffering code on cairo
Date: Fri, 14 Jun 2019 23:45:26 -0400 (EDT)

branch: master
commit 1c3e8684c8b1d5f53e9eff05f0ea2a38b4207dd7
Author: YAMAMOTO Mitsuharu <address@hidden>
Commit: YAMAMOTO Mitsuharu <address@hidden>

    Remove non-Xdbe double-buffering code on cairo
    
    * src/xterm.c (x_begin_cr_clip, x_update_end) [USE_CAIRO]: Don't do
    handcrafted double-buffering with image surface.
---
 src/xterm.c | 47 ++++++-----------------------------------------
 1 file changed, 6 insertions(+), 41 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 1608621..bc56e99 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -385,15 +385,12 @@ x_begin_cr_clip (struct frame *f, GC gc)
     {
       int width = FRAME_CR_SURFACE_DESIRED_WIDTH (f);
       int height = FRAME_CR_SURFACE_DESIRED_HEIGHT (f);
-      cairo_surface_t *surface;
-      if (FRAME_X_DOUBLE_BUFFERED_P (f))
-       surface = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
-                                            FRAME_X_RAW_DRAWABLE (f),
-                                            FRAME_X_VISUAL (f),
-                                            width, height);
-      else
-       surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
-                                             width, height);
+      cairo_surface_t *surface
+       = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
+                                    FRAME_X_RAW_DRAWABLE (f),
+                                    FRAME_X_VISUAL (f),
+                                    width, height);
+
       cr = FRAME_CR_CONTEXT (f) = cairo_create (surface);
       cairo_surface_destroy (surface);
     }
@@ -1243,38 +1240,6 @@ x_update_end (struct frame *f)
   /* Mouse highlight may be displayed again.  */
   MOUSE_HL_INFO (f)->mouse_face_defer = false;
 
-#ifdef USE_CAIRO
-  if (!FRAME_X_DOUBLE_BUFFERED_P (f))
-    {
-      block_input ();
-      cairo_surface_t *source_surface = cairo_get_target (FRAME_CR_CONTEXT 
(f));
-      if (source_surface)
-       {
-         cairo_t *cr;
-         cairo_surface_t *surface;
-         int width, height;
-
-         width = FRAME_PIXEL_WIDTH (f);
-         height = FRAME_PIXEL_HEIGHT (f);
-         if (! FRAME_EXTERNAL_TOOL_BAR (f))
-           height += FRAME_TOOL_BAR_HEIGHT (f);
-         if (! FRAME_EXTERNAL_MENU_BAR (f))
-           height += FRAME_MENU_BAR_HEIGHT (f);
-         surface = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
-                                              FRAME_X_DRAWABLE (f),
-                                              FRAME_X_VISUAL (f),
-                                              width, height);
-         cr = cairo_create (surface);
-         cairo_surface_destroy (surface);
-
-         cairo_set_source_surface (cr, source_surface, 0, 0);
-         cairo_paint (cr);
-         cairo_destroy (cr);
-       }
-      unblock_input ();
-    }
-#endif
-
 #ifndef XFlush
   block_input ();
   XFlush (FRAME_X_DISPLAY (f));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]