Skip to content

Commit 180c564

Browse files
author
Yuuki Harano
authored
Merge pull request emacs-mirror#17 from fejfighter/pgtk-context-flip-doco
Add some function comments around the new double context handling
2 parents f9eb318 + 8f603fd commit 180c564

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/pgtkterm.c

+15-2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ static void pgtk_clip_to_row (struct window *w, struct glyph_row *row,
9797
static struct frame *
9898
pgtk_any_window_to_frame (GdkWindow *window);
9999

100+
/*
101+
* This is not a flip context in the same sense as gpu rendering
102+
* scences, it only occurs when a new context was required due to a
103+
* resize or other fundamental change. This is called when that
104+
* context's surface has completed drawing
105+
*/
106+
100107
static void flip_cr_context(struct frame *f)
101108
{
102109
PGTK_TRACE("flip_cr_context");
@@ -6606,10 +6613,16 @@ If set to a non-float value, there will be no wait at all. */);
66066613

66076614
/* Tell Emacs about this window system. */
66086615
Fprovide (Qpgtk, Qnil);
6609-
66106616
}
66116617

6612-
6618+
/* Cairo does not allow resizing a surface/context after it is
6619+
* created, so we need to trash the old context, create a new context
6620+
* on the next cr_clip_begin with the new dimensions and request a
6621+
* re-draw.
6622+
*
6623+
* This Will leave the active context available to present on screen
6624+
* until a redrawn frame is completed.
6625+
*/
66136626
void
66146627
pgtk_cr_update_surface_desired_size (struct frame *f, int width, int height)
66156628
{

0 commit comments

Comments
 (0)