Merge "Remove deprecated BufferQueue constructor"
This commit is contained in:
commit
14226716f2
@ -169,7 +169,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
mutable sp<CpuConsumer> mCpuConsumer;
|
mutable sp<CpuConsumer> mCpuConsumer;
|
||||||
mutable sp<BufferQueue> mBufferQueue;
|
mutable sp<IGraphicBufferProducer> mProducer;
|
||||||
CpuConsumer::LockedBuffer mBuffer;
|
CpuConsumer::LockedBuffer mBuffer;
|
||||||
bool mHaveBuffer;
|
bool mHaveBuffer;
|
||||||
|
|
||||||
|
@ -646,8 +646,9 @@ ScreenshotClient::~ScreenshotClient() {
|
|||||||
|
|
||||||
sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
|
sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
|
||||||
if (mCpuConsumer == NULL) {
|
if (mCpuConsumer == NULL) {
|
||||||
mBufferQueue = new BufferQueue();
|
sp<IGraphicBufferConsumer> consumer;
|
||||||
mCpuConsumer = new CpuConsumer(mBufferQueue, 1);
|
BufferQueue::createBufferQueue(&mProducer, &consumer);
|
||||||
|
mCpuConsumer = new CpuConsumer(consumer, 1);
|
||||||
mCpuConsumer->setName(String8("ScreenshotClient"));
|
mCpuConsumer->setName(String8("ScreenshotClient"));
|
||||||
}
|
}
|
||||||
return mCpuConsumer;
|
return mCpuConsumer;
|
||||||
@ -667,7 +668,7 @@ status_t ScreenshotClient::update(const sp<IBinder>& display,
|
|||||||
mHaveBuffer = false;
|
mHaveBuffer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t err = s->captureScreen(display, mBufferQueue,
|
status_t err = s->captureScreen(display, mProducer,
|
||||||
reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform);
|
reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform);
|
||||||
|
|
||||||
if (err == NO_ERROR) {
|
if (err == NO_ERROR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user