Merge "Remove deprecated BufferQueue constructor"

This commit is contained in:
Dan Stoza 2014-03-18 16:56:14 +00:00 committed by Android (Google) Code Review
commit 14226716f2
2 changed files with 5 additions and 4 deletions

View File

@ -169,7 +169,7 @@ public:
private:
mutable sp<CpuConsumer> mCpuConsumer;
mutable sp<BufferQueue> mBufferQueue;
mutable sp<IGraphicBufferProducer> mProducer;
CpuConsumer::LockedBuffer mBuffer;
bool mHaveBuffer;

View File

@ -646,8 +646,9 @@ ScreenshotClient::~ScreenshotClient() {
sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
if (mCpuConsumer == NULL) {
mBufferQueue = new BufferQueue();
mCpuConsumer = new CpuConsumer(mBufferQueue, 1);
sp<IGraphicBufferConsumer> consumer;
BufferQueue::createBufferQueue(&mProducer, &consumer);
mCpuConsumer = new CpuConsumer(consumer, 1);
mCpuConsumer->setName(String8("ScreenshotClient"));
}
return mCpuConsumer;
@ -667,7 +668,7 @@ status_t ScreenshotClient::update(const sp<IBinder>& display,
mHaveBuffer = false;
}
status_t err = s->captureScreen(display, mBufferQueue,
status_t err = s->captureScreen(display, mProducer,
reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform);
if (err == NO_ERROR) {