summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-24 12:52:34 +0800
committerChia-I Wu <olvaffe@gmail.com>2009-09-24 12:53:50 +0800
commitd5e732764b7165ba5355805a3efa1596f1e78a4a (patch)
tree1ec32c7018f3fa13adf3335f68be36e04be713c1
parentef1a6243ef110b0b5fbaa81d74003db5d5d33c0d (diff)
egl_android: Minor fixes to image surface.
-rw-r--r--src/egl/drivers/android/droid_intel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/drivers/android/droid_intel.c b/src/egl/drivers/android/droid_intel.c
index 3b1afba2ea..070b2706a9 100644
--- a/src/egl/drivers/android/droid_intel.c
+++ b/src/egl/drivers/android/droid_intel.c
@@ -117,6 +117,10 @@ intel_get_native_buffer(struct droid_backend *backend,
{
struct droid_surface_intel *isurf = lookup_surface(surf);
+ /* non-window surface is single-buffered */
+ if (isurf->type != INTEL_SURFACE_TYPE_WINDOW)
+ return NULL;
+
if (!isurf->native_buffer.name)
return NULL;
@@ -355,6 +359,7 @@ intel_get_surface_buffers(struct droid_backend *backend,
if (isurf->type == INTEL_SURFACE_TYPE_IMAGE &&
att == __DRI_BUFFER_FRONT_LEFT) {
+ /* return native buffer */
buffers[num] = isurf->native_buffer;
buffers[num].attachment = att;
handles[num] = 0;