diff options
author | Dan Stoza <stoza@google.com> | 2014-03-18 16:51:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-18 16:51:26 +0000 |
commit | ebf562f4c91f5fcbb5a7f1b79060c1e9d2f76892 (patch) | |
tree | 494c31eed29786e9b72fa2e62ae3870bc64e0b95 /cmds | |
parent | 47b496dac93235740011fcfe7578b19c6b8445e5 (diff) | |
parent | b278f5e70c001391779525fb4d3b024503ba9466 (diff) | |
download | frameworks_av-ebf562f4c91f5fcbb5a7f1b79060c1e9d2f76892.zip frameworks_av-ebf562f4c91f5fcbb5a7f1b79060c1e9d2f76892.tar.gz frameworks_av-ebf562f4c91f5fcbb5a7f1b79060c1e9d2f76892.tar.bz2 |
Merge "Remove deprecated BufferQueue constructor"
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. |