[Top][All Lists]

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

Re: Change to NS drawing routines

From: Alan Third
Subject: Re: Change to NS drawing routines
Date: Mon, 13 Aug 2018 20:36:04 +0100
User-agent: Mutt/1.10.0 (2018-05-17)

On Mon, Aug 13, 2018 at 10:10:41PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 13 Aug 2018 19:46:59 +0100
> > From: Alan Third <address@hidden>
> > Cc: address@hidden
> > 
> > Going through the previous email discussions, linked in the thread
> > above, Eli made it clear that he sees using the expose functions to
> > draw, when it’s not an expose event, as being incorrect.
> > 
> > i.e. this:
> > 
> > > > Again, invalidating an area to let the "expose" handler draw
> > > > afterwards is a very standard, primary, canonical, and sometimes
> > > > only way of drawing nowadays. (If you call it is an abuse or
> > > > trick, you'll be laughed.)
> > > 
> > > You can laugh, if you want, but I still think it's abuse, and won't
> > > be convinced by being laughed at.
> > 
> > from http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00435.html
> > 
> > I can understand the argument to an extent, but I don’t have another
> > solution.
> We could discuss this again, perhaps the details have changed, or we
> might be able o find some compromise everybody can live with.
> For starters, what changes, if any, would you need to make in the
> glyph matrices, and why?

For this none, I can do it all in the NS specific code.

I’ve changed all the NS drawing functions to check whether they are
allowed to draw. If not then I mark the area as dirty.

I’ve added an ns_flush_display function that I believe is called at
the end of redisplay (flush_frame). I wasn’t sure about this but it
looks as though it works, (i.e. everything draws OK) so I assume it’s

Anyway, ns_flush_display asks Cocoa/GNUstep to redraw the frame, which
results in drawRect being called which calls expose_frame on the
rectangles that have been marked as dirty.
Alan Third

reply via email to

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