emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 8b4da35: Set image_cache_refcount before x_default_


From: Martin Rudalics
Subject: [Emacs-diffs] master 8b4da35: Set image_cache_refcount before x_default_parameter calls. (Bug#20802)
Date: Thu, 18 Jun 2015 12:33:13 +0000

branch: master
commit 8b4da353849ec1c1988910412783043340e936d4
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>

    Set image_cache_refcount before x_default_parameter calls.  (Bug#20802)
    
    * src/nsfns.m (Fx_create_frame):
    * src/xfns.c (Fx_create_frame, x_create_tip_frame): Move setting
    image_cache_refcount before first x_default_parameter call.
---
 src/nsfns.m |   10 +++++-----
 src/xfns.c  |   24 ++++++++++++------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/nsfns.m b/src/nsfns.m
index 286445c..c5ff42f 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1196,6 +1196,11 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
     register_font_driver (&nsfont_driver, f);
 #endif
 
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+
+  init_frame_faces (f);
+
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                        "fontBackend", "FontBackend", RES_TYPE_STRING);
 
@@ -1250,11 +1255,6 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
   x_default_parameter (f, parms, Qright_fringe, Qnil,
                       "rightFringe", "RightFringe", RES_TYPE_NUMBER);
 
-  image_cache_refcount =
-    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
-
-  init_frame_faces (f);
-
   /* Read comment about this code in corresponding place in xfns.c.  */
   adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
                     FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1,
diff --git a/src/xfns.c b/src/xfns.c
index d066043..88d187c 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3138,6 +3138,12 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
   register_font_driver (&xfont_driver, f);
 #endif /* not USE_CAIRO */
 
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+#ifdef GLYPH_DEBUG
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                       "fontBackend", "FontBackend", RES_TYPE_STRING);
 
@@ -3216,12 +3222,6 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
                                        "scrollBarBackground",
                                        "ScrollBarBackground", false);
 
-  image_cache_refcount =
-    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
-#ifdef GLYPH_DEBUG
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
-
   /* Init faces before x_default_parameter is called for the
      scroll-bar-width parameter because otherwise we end up in
      init_iterator with a null face cache, which should not happen.  */
@@ -5145,6 +5145,12 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
 #endif /* HAVE_FREETYPE */
 #endif /* not USE_CAIRO */
 
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+#ifdef GLYPH_DEBUG
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                       "fontBackend", "FontBackend", RES_TYPE_STRING);
 
@@ -5189,12 +5195,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   x_default_parameter (f, parms, Qborder_color, build_string ("black"),
                       "borderColor", "BorderColor", RES_TYPE_STRING);
 
-  image_cache_refcount =
-    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
-#ifdef GLYPH_DEBUG
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
-
   /* Init faces before x_default_parameter is called for the
      scroll-bar-width parameter because otherwise we end up in
      init_iterator with a null face cache, which should not happen.  */



reply via email to

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