Skip to content

Commit f82b111

Browse files
Jamie GennisAndroid (Google) Code Review
authored andcommitted
Merge "rsdGL uses DummyConsumer"
2 parents 1fc1805 + ae540b9 commit f82b111

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libs/rs/driver/rsdGL.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "rsdFrameBufferObj.h"
4444

4545
#include <gui/SurfaceTextureClient.h>
46+
#include <gui/DummyConsumer.h>
4647

4748
using namespace android;
4849
using namespace android::renderscript;
@@ -326,8 +327,11 @@ bool rsdGLInit(const Context *rsc) {
326327
}
327328
gGLContextCount++;
328329

329-
sp<SurfaceTexture> st(new SurfaceTexture(123));
330-
sp<SurfaceTextureClient> stc(new SurfaceTextureClient(st));
330+
// Create a BufferQueue with a fake consumer
331+
sp<BufferQueue> bq = new BufferQueue();
332+
sp<DummyConsumer> dummy = new DummyConsumer(bq);
333+
sp<SurfaceTextureClient> stc(new SurfaceTextureClient(static_cast<sp<ISurfaceTexture> >(bq)));
334+
331335
dc->gl.egl.surfaceDefault = eglCreateWindowSurface(dc->gl.egl.display, dc->gl.egl.config,
332336
static_cast<ANativeWindow*>(stc.get()),
333337
NULL);

0 commit comments

Comments
 (0)