From 12be51af871b1f7bf7390b226e2f98febde51df9 Mon Sep 17 00:00:00 2001
From: Timothy Strelchun <Timothy.Strelchun@Intel.Com>
Date: Mon, 21 Jun 2010 21:40:55 -0700
Subject: [PATCH] Added surface_pool_get_local

Added the function surface_pool_get_local to enable a surface
buffer pool to obtain its own local data.  Useful for custom
surface buffer pools so that they do not have to explicitly
store a static local pointer to it during init/join.
---
 src/core/surface_pool.c |   12 +++++++++++-
 src/core/surface_pool.h |    8 +++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/core/surface_pool.c b/src/core/surface_pool.c
index 0518df2..cfcc8a4 100644
--- a/src/core/surface_pool.c
+++ b/src/core/surface_pool.c
@@ -1,5 +1,5 @@
 /*
-   (c) Copyright 2001-2009  The world wide DirectFB Open Source Community (directfb.org)
+   (c) Copyright 2001-2010  The world wide DirectFB Open Source Community (directfb.org)
    (c) Copyright 2000-2004  Convergence (integrated media) GmbH
 
    All rights reserved.
@@ -107,6 +107,16 @@ static DFBResult backup_allocation( CoreSurfacePool       *pool,
 
 /**********************************************************************************************************************/
 
+/*
+ * Enable a surface pool to obtain its own local data without having to 
+ * explicitly store a static local pointer to it during init/join.
+ */
+void *
+surface_pool_get_local( const CoreSurfacePool *pool )
+{
+     return get_local( pool );
+}
+
 DFBResult
 dfb_surface_pool_initialize( CoreDFB                 *core,
                              const SurfacePoolFuncs  *funcs,
diff --git a/src/core/surface_pool.h b/src/core/surface_pool.h
index fc049e0..7b33df9 100644
--- a/src/core/surface_pool.h
+++ b/src/core/surface_pool.h
@@ -1,5 +1,5 @@
 /*
-   (c) Copyright 2001-2009  The world wide DirectFB Open Source Community (directfb.org)
+   (c) Copyright 2001-2010  The world wide DirectFB Open Source Community (directfb.org)
    (c) Copyright 2000-2004  Convergence (integrated media) GmbH
 
    All rights reserved.
@@ -268,5 +268,11 @@ DFBResult dfb_surface_pool_enumerate ( CoreSurfacePool         *pool,
                                        void                    *ctx );
 
 
+/*
+     Get a surface pool's process-specific void data pointer.
+*/
+void *
+surface_pool_get_local( const CoreSurfacePool *pool );
+
 #endif
 
-- 
1.6.1.9.g97c34

