diff options
author | Dan Stoza <stoza@google.com> | 2014-03-12 12:18:37 -0700 |
---|---|---|
committer | Dan Stoza <stoza@google.com> | 2014-03-12 16:13:06 -0700 |
commit | b278f5e70c001391779525fb4d3b024503ba9466 (patch) | |
tree | 79da000fcd746c20f554d590ee4cb06d0daa3f77 /cmds | |
parent | 3a0fb34ed9fcb665e71cc055abde520af393c493 (diff) | |
download | frameworks_av-b278f5e70c001391779525fb4d3b024503ba9466.zip frameworks_av-b278f5e70c001391779525fb4d3b024503ba9466.tar.gz frameworks_av-b278f5e70c001391779525fb4d3b024503ba9466.tar.bz2 |
Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: I7d98eb8e9201fd920552e7eab75da42a5e2c7dca
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/screenrecord/FrameOutput.cpp | 8 | ||||
-rw-r--r-- | cmds/screenrecord/FrameOutput.h | 4 | ||||
-rw-r--r-- | cmds/screenrecord/Overlay.cpp | 9 | ||||
-rw-r--r-- | cmds/screenrecord/Overlay.h | 6 |
4 files changed, 13 insertions, 14 deletions
diff --git a/cmds/screenrecord/FrameOutput.cpp b/cmds/screenrecord/FrameOutput.cpp index b5cf2f9..06b1f70 100644 --- a/cmds/screenrecord/FrameOutput.cpp +++ b/cmds/screenrecord/FrameOutput.cpp @@ -67,8 +67,10 @@ status_t FrameOutput::createInputSurface(int width, int height, return UNKNOWN_ERROR; } - mBufferQueue = new BufferQueue(/*new GraphicBufferAlloc()*/); - mGlConsumer = new GLConsumer(mBufferQueue, mExtTextureName, + sp<IGraphicBufferProducer> producer; + sp<IGraphicBufferConsumer> consumer; + BufferQueue::createBufferQueue(&producer, &consumer); + mGlConsumer = new GLConsumer(consumer, mExtTextureName, GL_TEXTURE_EXTERNAL_OES); mGlConsumer->setName(String8("virtual display")); mGlConsumer->setDefaultBufferSize(width, height); @@ -79,7 +81,7 @@ status_t FrameOutput::createInputSurface(int width, int height, mPixelBuf = new uint8_t[width * height * kGlBytesPerPixel]; - *pBufferProducer = mBufferQueue; + *pBufferProducer = producer; ALOGD("FrameOutput::createInputSurface OK"); return NO_ERROR; diff --git a/cmds/screenrecord/FrameOutput.h b/cmds/screenrecord/FrameOutput.h index bb66e05..c1148d0 100644 --- a/cmds/screenrecord/FrameOutput.h +++ b/cmds/screenrecord/FrameOutput.h @@ -77,10 +77,6 @@ private: // Set by the FrameAvailableListener callback. bool mFrameAvailable; - // Our queue. The producer side is passed to the virtual display, the - // consumer side feeds into our GLConsumer. - sp<BufferQueue> mBufferQueue; - // This receives frames from the virtual display and makes them available // as an external texture. sp<GLConsumer> mGlConsumer; diff --git a/cmds/screenrecord/Overlay.cpp b/cmds/screenrecord/Overlay.cpp index 2e98874..94f560d 100644 --- a/cmds/screenrecord/Overlay.cpp +++ b/cmds/screenrecord/Overlay.cpp @@ -84,7 +84,7 @@ status_t Overlay::start(const sp<IGraphicBufferProducer>& outputSurface, assert(mState == RUNNING); ALOGV("Overlay::start successful"); - *pBufferProducer = mBufferQueue; + *pBufferProducer = mProducer; return NO_ERROR; } @@ -169,8 +169,9 @@ status_t Overlay::setup_l() { return UNKNOWN_ERROR; } - mBufferQueue = new BufferQueue(/*new GraphicBufferAlloc()*/); - mGlConsumer = new GLConsumer(mBufferQueue, mExtTextureName, + sp<IGraphicBufferConsumer> consumer; + BufferQueue::createBufferQueue(&mProducer, &consumer); + mGlConsumer = new GLConsumer(consumer, mExtTextureName, GL_TEXTURE_EXTERNAL_OES); mGlConsumer->setName(String8("virtual display")); mGlConsumer->setDefaultBufferSize(width, height); @@ -187,7 +188,7 @@ void Overlay::release_l() { ALOGV("Overlay::release_l"); mOutputSurface.clear(); mGlConsumer.clear(); - mBufferQueue.clear(); + mProducer.clear(); mTexProgram.release(); mExtTexProgram.release(); diff --git a/cmds/screenrecord/Overlay.h b/cmds/screenrecord/Overlay.h index 48e48e0..b1b5c29 100644 --- a/cmds/screenrecord/Overlay.h +++ b/cmds/screenrecord/Overlay.h @@ -122,9 +122,9 @@ private: // surface. sp<IGraphicBufferProducer> mOutputSurface; - // Our queue. The producer side is passed to the virtual display, the - // consumer side feeds into our GLConsumer. - sp<BufferQueue> mBufferQueue; + // Producer side of queue, passed into the virtual display. + // The consumer end feeds into our GLConsumer. + sp<IGraphicBufferProducer> mProducer; // This receives frames from the virtual display and makes them available // as an external texture. |