summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jamie Gennis <jgennis@google.com> 2012-03-26 17:20:06 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-03-26 17:20:06 -0700
commitf82b111a6d1cce9a31a008c6461ee72fa350f278 (patch)
tree77f0a9597b752713fc6d614329cb7c70385eb9a5
parent1fc18056eb87e86773a5863ca60623d4023795a6 (diff)
parentae540b9943dfd3b5ff757954a988978b68e73687 (diff)
Merge "rsdGL uses DummyConsumer"
-rw-r--r--libs/rs/driver/rsdGL.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/rs/driver/rsdGL.cpp b/libs/rs/driver/rsdGL.cpp
index fae602ccdee5..0860417a13bc 100644
--- a/libs/rs/driver/rsdGL.cpp
+++ b/libs/rs/driver/rsdGL.cpp
@@ -43,6 +43,7 @@
#include "rsdFrameBufferObj.h"
#include <gui/SurfaceTextureClient.h>
+#include <gui/DummyConsumer.h>
using namespace android;
using namespace android::renderscript;
@@ -326,8 +327,11 @@ bool rsdGLInit(const Context *rsc) {
}
gGLContextCount++;
- sp<SurfaceTexture> st(new SurfaceTexture(123));
- sp<SurfaceTextureClient> stc(new SurfaceTextureClient(st));
+ // Create a BufferQueue with a fake consumer
+ sp<BufferQueue> bq = new BufferQueue();
+ sp<DummyConsumer> dummy = new DummyConsumer(bq);
+ sp<SurfaceTextureClient> stc(new SurfaceTextureClient(static_cast<sp<ISurfaceTexture> >(bq)));
+
dc->gl.egl.surfaceDefault = eglCreateWindowSurface(dc->gl.egl.display, dc->gl.egl.config,
static_cast<ANativeWindow*>(stc.get()),
NULL);