am 187edf93
: Merge "BufferItemConsumer: add functions to set default buffer format/size" into jb-mr2-dev
* commit '187edf93c6245bb8fb3187c49f2174492ed6e049': BufferItemConsumer: add functions to set default buffer format/size
This commit is contained in:
commit
f3d93d4363
@ -84,6 +84,14 @@ class BufferItemConsumer: public ConsumerBase
|
|||||||
|
|
||||||
sp<IGraphicBufferProducer> getProducerInterface() const { return getBufferQueue(); }
|
sp<IGraphicBufferProducer> getProducerInterface() const { return getBufferQueue(); }
|
||||||
|
|
||||||
|
// setDefaultBufferSize is used to set the size of buffers returned by
|
||||||
|
// requestBuffers when a with and height of zero is requested.
|
||||||
|
status_t setDefaultBufferSize(uint32_t w, uint32_t h);
|
||||||
|
|
||||||
|
// setDefaultBufferFormat allows the BufferQueue to create
|
||||||
|
// GraphicBuffers of a defaultFormat if no format is specified
|
||||||
|
// in dequeueBuffer
|
||||||
|
status_t setDefaultBufferFormat(uint32_t defaultFormat);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace android
|
} // namespace android
|
||||||
|
@ -93,4 +93,14 @@ status_t BufferItemConsumer::releaseBuffer(const BufferItem &item,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status_t BufferItemConsumer::setDefaultBufferSize(uint32_t w, uint32_t h) {
|
||||||
|
Mutex::Autolock _l(mMutex);
|
||||||
|
return mBufferQueue->setDefaultBufferSize(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
status_t BufferItemConsumer::setDefaultBufferFormat(uint32_t defaultFormat) {
|
||||||
|
Mutex::Autolock _l(mMutex);
|
||||||
|
return mBufferQueue->setDefaultBufferFormat(defaultFormat);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace android
|
} // namespace android
|
||||||
|
Loading…
Reference in New Issue
Block a user