Skip to content

Commit

Permalink
Merge pull request emacs-mirror#17 from fejfighter/pgtk-context-flip-…
Browse files Browse the repository at this point in the history
…doco

Add some function comments around the new double context handling
  • Loading branch information
Yuuki Harano authored Mar 29, 2020
2 parents f9eb318 + 8f603fd commit 180c564
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/pgtkterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ static void pgtk_clip_to_row (struct window *w, struct glyph_row *row,
static struct frame *
pgtk_any_window_to_frame (GdkWindow *window);

/*
* This is not a flip context in the same sense as gpu rendering
* scences, it only occurs when a new context was required due to a
* resize or other fundamental change. This is called when that
* context's surface has completed drawing
*/

static void flip_cr_context(struct frame *f)
{
PGTK_TRACE("flip_cr_context");
Expand Down Expand Up @@ -6606,10 +6613,16 @@ If set to a non-float value, there will be no wait at all. */);

/* Tell Emacs about this window system. */
Fprovide (Qpgtk, Qnil);

}


/* Cairo does not allow resizing a surface/context after it is
* created, so we need to trash the old context, create a new context
* on the next cr_clip_begin with the new dimensions and request a
* re-draw.
*
* This Will leave the active context available to present on screen
* until a redrawn frame is completed.
*/
void
pgtk_cr_update_surface_desired_size (struct frame *f, int width, int height)
{
Expand Down

0 comments on commit 180c564

Please sign in to comment.