On Thu, Jul 16, 2009 at 08:19:30AM -0600, Brian Paul wrote:
> >diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c
> >new file mode 100644
> >index 0000000..7b999ab
> >--- /dev/null
> >+++ b/src/egl/main/eglcurrent.c
> >@@ -0,0 +1,261 @@
> >+#include <stdlib.h>
> >+#include "eglcurrent.h"
> >+#include "eglcontext.h"
> >+#include "egllog.h"
> >+
> >+
> >+static _EGLThreadInfo dummy_thread;
> What's the story with dummy threads?  Please add a comment to
> explain this.
It is returned when allocation of a thread's _EGLThreadInfo fails so
that _eglGetCurrentThread never returns NULL.  It is considered
read-only.  Functions that update per-thread info, like eglBindAPI or
eglMakeCurrent, should check the dummy-ness before they do anything.

I will add a comment to it.
> >+
> >+
> >+/**
> >+ * Return if current thread info is dummy.
> >+ * A dummy thread info should not be modified.
> >+ */
> >+EGLBoolean
> >+_eglDummyCurrentThread(void)
> >+{
> >+   _EGLThreadInfo *t = _eglGetTSD();
> >+   return (!t || t == &dummy_thread);
> >+}
> A predicate funciton like this should be named _eglIsDummyCurrentThread().
Will do.

-- 
Regards,
olv

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to