Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Wed, 18 Aug 1999 18:00:54 +0200

Re: Ping-pong buffers on KGIcon are here!

Andreas Beck wrote:
> 
> > > The app now tries to lock down a directbuffer. The same as above happens.
> > > It waits on the accel lock, engages the fb lock, frees the accel lock.
> > > It draws some stuff on the DB.
> > > While doing so, it calls a LibGGI primitive with the DB still locked.
> 
> > It is essential for Glide and (future) DirectX operation that this
> > (calling GGI primitives while a DB is acquired) is not allowed.
> 
> Why ? At worst, we'd just auto-free the fb for the time the ggi primitive
> request is executing. Note, that the reaction that follows in the
> description I gave above, is equivalent to a DB-release, call accel,
> DB-acquire, due to the synchronous accel operation it induces.

Becuase:
a) Acquiring/Releasing the DB may be a very costly operation, it
   should not be done too much, and definitely not implicitly.
b) We'd have to stuff unnecessary code in every ggi primitive to
   check whether any DB is acquired or not.
c) I see no gain at all in allowing this. Well-written applications
   simply shouldn't mix DB access with ggi primitives.

> I am thinking about compatibility here, when wrapper libs (SVGAlib might
> be a candidate for that) don't have that restriction.

Then wrapper libs can free/allocate the DB themselves when necessary.
That is an exception, and not something well-written applications
should do.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se


Index: [thread] [date] [subject] [author]