summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRodrigo Obregon <robregon@ti.com>2010-11-03 15:16:18 -0500
committerRodrigo Obregon <robregon@ti.com>2010-11-03 15:16:18 -0500
commit84043438cfa7f0f934cb8884315e9db2fd3c7e2c (patch)
treeef0a53f647c528e949a30ad2a5f79882029be0fa /include
parentdb2403ff3251bebb5dd6bdb98f826a8e04dc6ed1 (diff)
downloadframeworks_base-84043438cfa7f0f934cb8884315e9db2fd3c7e2c.zip
frameworks_base-84043438cfa7f0f934cb8884315e9db2fd3c7e2c.tar.gz
frameworks_base-84043438cfa7f0f934cb8884315e9db2fd3c7e2c.tar.bz2
Framebuffer: Support variable number of framebuffers in the UI
This change defines a macro NUM_FRAME_BUFFERS to set the desired number of framebuffers to be used by the UI, instead of hard-coding 2 framebuffers. Aditional logic has been added to handle the initialization and destruction of NUM_FRAME_BUFFERS buffers. Change-Id: I3a4bfec3e0f453432f2ffebf084c00f574d3be46 Signed-off-by: Rodrigo Obregon <robregon@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/ui/FramebufferNativeWindow.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h
index 8ea3ab9..e9c7df2 100644
--- a/include/ui/FramebufferNativeWindow.h
+++ b/include/ui/FramebufferNativeWindow.h
@@ -29,6 +29,7 @@
#include <ui/egl/android_natives.h>
+#define NUM_FRAME_BUFFERS 2
extern "C" EGLNativeWindowType android_createDisplaySurface(void);
@@ -69,7 +70,7 @@ private:
framebuffer_device_t* fbDev;
alloc_device_t* grDev;
- sp<NativeBuffer> buffers[2];
+ sp<NativeBuffer> buffers[NUM_FRAME_BUFFERS];
sp<NativeBuffer> front;
mutable Mutex mutex;