Skip to content

Commit 8f603fd

Browse files
committed
Add some function comments around the new double context handling
1 parent ce60c1c commit 8f603fd

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
@@ -96,6 +96,13 @@ static void pgtk_clip_to_row (struct window *w, struct glyph_row *row,
9696
static struct frame *
9797
pgtk_any_window_to_frame (GdkWindow *window);
9898

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

65966603
/* Tell Emacs about this window system. */
65976604
Fprovide (Qpgtk, Qnil);
6598-
65996605
}
66006606

6601-
6607+
/* Cairo does not allow resizing a surface/context after it is
6608+
* created, so we need to trash the old context, create a new context
6609+
* on the next cr_clip_begin with the new dimensions and request a
6610+
* re-draw.
6611+
*
6612+
* This Will leave the active context available to present on screen
6613+
* until a redrawn frame is completed.
6614+
*/
66026615
void
66036616
pgtk_cr_update_surface_desired_size (struct frame *f, int width, int height)
66046617
{

0 commit comments

Comments
 (0)