diff options
author | Dan Stoza <stoza@google.com> | 2014-03-17 18:46:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-17 18:46:14 +0000 |
commit | 2c22093c1c6131c5ec11e6d68ec0d4ae6eaed080 (patch) | |
tree | a3612bf4a839286fa61a182bf74cfffa1a14edce /cmds/flatland | |
parent | ce9f107c9d9ad4fdc0ad43ccd545823caa3cf933 (diff) | |
parent | 6780a2d6a5351977a793c08935bd3492c9942494 (diff) | |
download | frameworks_native-2c22093c1c6131c5ec11e6d68ec0d4ae6eaed080.zip frameworks_native-2c22093c1c6131c5ec11e6d68ec0d4ae6eaed080.tar.gz frameworks_native-2c22093c1c6131c5ec11e6d68ec0d4ae6eaed080.tar.bz2 |
Merge "Remove deprecated BufferQueue constructor"
Diffstat (limited to 'cmds/flatland')
-rw-r--r-- | cmds/flatland/GLHelper.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmds/flatland/GLHelper.cpp b/cmds/flatland/GLHelper.cpp index 05d082b..4b5aba9 100644 --- a/cmds/flatland/GLHelper.cpp +++ b/cmds/flatland/GLHelper.cpp @@ -201,14 +201,16 @@ bool GLHelper::getShaderProgram(const char* name, GLuint* outPgm) { bool GLHelper::createNamedSurfaceTexture(GLuint name, uint32_t w, uint32_t h, sp<GLConsumer>* glConsumer, EGLSurface* surface) { - sp<BufferQueue> bq = new BufferQueue(mGraphicBufferAlloc); - sp<GLConsumer> glc = new GLConsumer(bq, name, + sp<IGraphicBufferProducer> producer; + sp<IGraphicBufferConsumer> consumer; + BufferQueue::createBufferQueue(&producer, &consumer, mGraphicBufferAlloc); + sp<GLConsumer> glc = new GLConsumer(consumer, name, GL_TEXTURE_EXTERNAL_OES, false); glc->setDefaultBufferSize(w, h); glc->setDefaultMaxBufferCount(3); glc->setConsumerUsageBits(GRALLOC_USAGE_HW_COMPOSER); - sp<ANativeWindow> anw = new Surface(bq); + sp<ANativeWindow> anw = new Surface(producer); EGLSurface s = eglCreateWindowSurface(mDisplay, mConfig, anw.get(), NULL); if (s == EGL_NO_SURFACE) { fprintf(stderr, "eglCreateWindowSurface error: %#x\n", eglGetError()); |