diff options
| author | Martin Rudalics | 2015-06-18 14:32:32 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2015-06-18 14:32:32 +0200 |
| commit | 8b4da353849ec1c1988910412783043340e936d4 (patch) | |
| tree | b60a4af5916bffee438bd76bdf6dcc81c366f61b /src | |
| parent | c4782ea5a7c5a63b6e004aefbb3b3898d3846ad5 (diff) | |
| download | emacs-8b4da353849ec1c1988910412783043340e936d4.tar.gz emacs-8b4da353849ec1c1988910412783043340e936d4.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsfns.m | 10 | ||||
| -rw-r--r-- | src/xfns.c | 24 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index 286445c0030..c5ff42f960a 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1196,6 +1196,11 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 1196 | register_font_driver (&nsfont_driver, f); | 1196 | register_font_driver (&nsfont_driver, f); |
| 1197 | #endif | 1197 | #endif |
| 1198 | 1198 | ||
| 1199 | image_cache_refcount = | ||
| 1200 | FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; | ||
| 1201 | |||
| 1202 | init_frame_faces (f); | ||
| 1203 | |||
| 1199 | x_default_parameter (f, parms, Qfont_backend, Qnil, | 1204 | x_default_parameter (f, parms, Qfont_backend, Qnil, |
| 1200 | "fontBackend", "FontBackend", RES_TYPE_STRING); | 1205 | "fontBackend", "FontBackend", RES_TYPE_STRING); |
| 1201 | 1206 | ||
| @@ -1250,11 +1255,6 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 1250 | x_default_parameter (f, parms, Qright_fringe, Qnil, | 1255 | x_default_parameter (f, parms, Qright_fringe, Qnil, |
| 1251 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | 1256 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); |
| 1252 | 1257 | ||
| 1253 | image_cache_refcount = | ||
| 1254 | FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; | ||
| 1255 | |||
| 1256 | init_frame_faces (f); | ||
| 1257 | |||
| 1258 | /* Read comment about this code in corresponding place in xfns.c. */ | 1258 | /* Read comment about this code in corresponding place in xfns.c. */ |
| 1259 | adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), | 1259 | adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), |
| 1260 | FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, | 1260 | FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1, |
diff --git a/src/xfns.c b/src/xfns.c index d066043ae5e..88d187cdd62 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3138,6 +3138,12 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3138 | register_font_driver (&xfont_driver, f); | 3138 | register_font_driver (&xfont_driver, f); |
| 3139 | #endif /* not USE_CAIRO */ | 3139 | #endif /* not USE_CAIRO */ |
| 3140 | 3140 | ||
| 3141 | image_cache_refcount = | ||
| 3142 | FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; | ||
| 3143 | #ifdef GLYPH_DEBUG | ||
| 3144 | dpyinfo_refcount = dpyinfo->reference_count; | ||
| 3145 | #endif /* GLYPH_DEBUG */ | ||
| 3146 | |||
| 3141 | x_default_parameter (f, parms, Qfont_backend, Qnil, | 3147 | x_default_parameter (f, parms, Qfont_backend, Qnil, |
| 3142 | "fontBackend", "FontBackend", RES_TYPE_STRING); | 3148 | "fontBackend", "FontBackend", RES_TYPE_STRING); |
| 3143 | 3149 | ||
| @@ -3216,12 +3222,6 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3216 | "scrollBarBackground", | 3222 | "scrollBarBackground", |
| 3217 | "ScrollBarBackground", false); | 3223 | "ScrollBarBackground", false); |
| 3218 | 3224 | ||
| 3219 | image_cache_refcount = | ||
| 3220 | FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; | ||
| 3221 | #ifdef GLYPH_DEBUG | ||
| 3222 | dpyinfo_refcount = dpyinfo->reference_count; | ||
| 3223 | #endif /* GLYPH_DEBUG */ | ||
| 3224 | |||
| 3225 | /* Init faces before x_default_parameter is called for the | 3225 | /* Init faces before x_default_parameter is called for the |
| 3226 | scroll-bar-width parameter because otherwise we end up in | 3226 | scroll-bar-width parameter because otherwise we end up in |
| 3227 | init_iterator with a null face cache, which should not happen. */ | 3227 | init_iterator with a null face cache, which should not happen. */ |
| @@ -5145,6 +5145,12 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 5145 | #endif /* HAVE_FREETYPE */ | 5145 | #endif /* HAVE_FREETYPE */ |
| 5146 | #endif /* not USE_CAIRO */ | 5146 | #endif /* not USE_CAIRO */ |
| 5147 | 5147 | ||
| 5148 | image_cache_refcount = | ||
| 5149 | FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; | ||
| 5150 | #ifdef GLYPH_DEBUG | ||
| 5151 | dpyinfo_refcount = dpyinfo->reference_count; | ||
| 5152 | #endif /* GLYPH_DEBUG */ | ||
| 5153 | |||
| 5148 | x_default_parameter (f, parms, Qfont_backend, Qnil, | 5154 | x_default_parameter (f, parms, Qfont_backend, Qnil, |
| 5149 | "fontBackend", "FontBackend", RES_TYPE_STRING); | 5155 | "fontBackend", "FontBackend", RES_TYPE_STRING); |
| 5150 | 5156 | ||
| @@ -5189,12 +5195,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 5189 | x_default_parameter (f, parms, Qborder_color, build_string ("black"), | 5195 | x_default_parameter (f, parms, Qborder_color, build_string ("black"), |
| 5190 | "borderColor", "BorderColor", RES_TYPE_STRING); | 5196 | "borderColor", "BorderColor", RES_TYPE_STRING); |
| 5191 | 5197 | ||
| 5192 | image_cache_refcount = | ||
| 5193 | FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; | ||
| 5194 | #ifdef GLYPH_DEBUG | ||
| 5195 | dpyinfo_refcount = dpyinfo->reference_count; | ||
| 5196 | #endif /* GLYPH_DEBUG */ | ||
| 5197 | |||
| 5198 | /* Init faces before x_default_parameter is called for the | 5198 | /* Init faces before x_default_parameter is called for the |
| 5199 | scroll-bar-width parameter because otherwise we end up in | 5199 | scroll-bar-width parameter because otherwise we end up in |
| 5200 | init_iterator with a null face cache, which should not happen. */ | 5200 | init_iterator with a null face cache, which should not happen. */ |