Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f82b111a authored by Jamie Gennis's avatar Jamie Gennis Committed by Android (Google) Code Review
Browse files

Merge "rsdGL uses DummyConsumer"

parents 1fc18056 ae540b99
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);