blob: 02ab51329f9d1eb88e1bbd65130517f8f6fdca46 [file] [log] [blame]
#ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V2_0_BSGRAPHICBUFFERPRODUCER_H
#define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V2_0_BSGRAPHICBUFFERPRODUCER_H
#include <android-base/macros.h>
#include <cutils/trace.h>
#include <future>
#include <android/hardware/graphics/bufferqueue/2.0/IGraphicBufferProducer.h>
#include <hidl/HidlPassthroughSupport.h>
#include <hidl/TaskRunner.h>
namespace android {
namespace hardware {
namespace graphics {
namespace bufferqueue {
namespace V2_0 {
struct BsGraphicBufferProducer : IGraphicBufferProducer, ::android::hardware::details::HidlInstrumentor {
explicit BsGraphicBufferProducer(const ::android::sp<IGraphicBufferProducer> impl);
/**
* The pure class is what this class wraps.
*/
typedef IGraphicBufferProducer Pure;
typedef ::android::hardware::details::bs_tag _hidl_tag;
// Methods from ::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer follow.
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> setMaxDequeuedBufferCount(int32_t maxDequeuedBuffers) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setMaxDequeuedBufferCount::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&maxDequeuedBuffers);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setMaxDequeuedBufferCount", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setMaxDequeuedBufferCount(maxDequeuedBuffers);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setMaxDequeuedBufferCount", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> requestBuffer(int32_t slot, requestBuffer_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::requestBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&slot);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "requestBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->requestBuffer(slot, [&](const auto &_hidl_out_status, const auto &_hidl_out_buffer, const auto &_hidl_out_generationNumber) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_buffer);
_hidl_args.push_back((void *)&_hidl_out_generationNumber);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "requestBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_buffer, _hidl_out_generationNumber);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> setAsyncMode(bool async) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setAsyncMode::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&async);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setAsyncMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setAsyncMode(async);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setAsyncMode", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> dequeueBuffer(const ::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer::DequeueBufferInput& input, dequeueBuffer_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::dequeueBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&input);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "dequeueBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->dequeueBuffer(input, [&](const auto &_hidl_out_status, const auto &_hidl_out_slot, const auto &_hidl_out_output) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_slot);
_hidl_args.push_back((void *)&_hidl_out_output);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "dequeueBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_slot, _hidl_out_output);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> detachBuffer(int32_t slot) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::detachBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&slot);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "detachBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->detachBuffer(slot);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "detachBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> detachNextBuffer(detachNextBuffer_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::detachNextBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "detachNextBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->detachNextBuffer([&](const auto &_hidl_out_status, const auto &_hidl_out_buffer, const auto &_hidl_out_fence) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_buffer);
_hidl_args.push_back((void *)&_hidl_out_fence);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "detachNextBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_buffer, _hidl_out_fence);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> attachBuffer(const ::android::hardware::graphics::common::V1_2::HardwareBuffer& buffer, uint32_t generationNumber, attachBuffer_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::attachBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&buffer);
_hidl_args.push_back((void *)&generationNumber);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "attachBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->attachBuffer(buffer, generationNumber, [&](const auto &_hidl_out_status, const auto &_hidl_out_slot, const auto &_hidl_out_releaseAllBuffers) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_slot);
_hidl_args.push_back((void *)&_hidl_out_releaseAllBuffers);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "attachBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_slot, _hidl_out_releaseAllBuffers);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> queueBuffer(int32_t slot, const ::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer::QueueBufferInput& input, queueBuffer_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::queueBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&slot);
_hidl_args.push_back((void *)&input);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "queueBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->queueBuffer(slot, input, [&](const auto &_hidl_out_status, const auto &_hidl_out_output) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_output);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "queueBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_output);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> cancelBuffer(int32_t slot, const ::android::hardware::hidl_handle& fence) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::cancelBuffer::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&slot);
_hidl_args.push_back((void *)&fence);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "cancelBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->cancelBuffer(slot, fence);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "cancelBuffer", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> query(int32_t what, query_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::query::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&what);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "query", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->query(what, [&](const auto &_hidl_out_result, const auto &_hidl_out_value) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_result);
_hidl_args.push_back((void *)&_hidl_out_value);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "query", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_result, _hidl_out_value);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> connect(const ::android::sp<::android::hardware::graphics::bufferqueue::V2_0::IProducerListener>& listener, ::android::hardware::graphics::bufferqueue::V2_0::ConnectionType api, bool producerControlledByApp, connect_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::connect::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&listener);
_hidl_args.push_back((void *)&api);
_hidl_args.push_back((void *)&producerControlledByApp);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "connect", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::graphics::bufferqueue::V2_0::IProducerListener> _hidl_wrapped_listener;
if (listener != nullptr && !listener->isRemote()) {
_hidl_wrapped_listener = ::android::hardware::details::wrapPassthrough(listener);
if (_hidl_wrapped_listener == nullptr) {
return ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped_listener = listener;
}
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->connect(_hidl_wrapped_listener, api, producerControlledByApp, [&](const auto &_hidl_out_status, const auto &_hidl_out_output) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_output);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "connect", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_output);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> disconnect(::android::hardware::graphics::bufferqueue::V2_0::ConnectionType api) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::disconnect::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&api);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "disconnect", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->disconnect(api);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "disconnect", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> allocateBuffers(uint32_t width, uint32_t height, uint32_t format, uint64_t usage) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::allocateBuffers::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&width);
_hidl_args.push_back((void *)&height);
_hidl_args.push_back((void *)&format);
_hidl_args.push_back((void *)&usage);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "allocateBuffers", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->allocateBuffers(width, height, format, usage);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "allocateBuffers", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> allowAllocation(bool allow) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::allowAllocation::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&allow);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "allowAllocation", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->allowAllocation(allow);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "allowAllocation", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> setGenerationNumber(uint32_t generationNumber) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setGenerationNumber::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&generationNumber);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setGenerationNumber", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setGenerationNumber(generationNumber);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setGenerationNumber", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<::android::hardware::graphics::bufferqueue::V2_0::Status> setDequeueTimeout(int64_t timeoutNs) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setDequeueTimeout::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&timeoutNs);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setDequeueTimeout", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->setDequeueTimeout(timeoutNs);
::android::hardware::graphics::bufferqueue::V2_0::Status _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "setDequeueTimeout", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<uint64_t> getUniqueId() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::getUniqueId::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "getUniqueId", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getUniqueId();
uint64_t _hidl_out_id = _hidl_return;
(void) _hidl_out_id;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_id);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "getUniqueId", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getConsumerName(getConsumerName_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::getConsumerName::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "getConsumerName", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getConsumerName([&](const auto &_hidl_out_name) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_name);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "2.0", "IGraphicBufferProducer", "getConsumerName", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_name);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
// Methods from ::android::hidl::base::V1_0::IBase follow.
::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::interfaceChain::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->interfaceChain([&](const auto &_hidl_out_descriptors) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_descriptors);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_descriptors);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::debug::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&fd);
_hidl_args.push_back((void *)&options);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->debug(fd, options);
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::interfaceDescriptor::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->interfaceDescriptor([&](const auto &_hidl_out_descriptor) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_descriptor);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_descriptor);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::getHashChain::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getHashChain([&](const auto &_hidl_out_hashchain) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_hashchain);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_hashchain);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> setHALInstrumentation() override {
configureInstrumentation();
return ::android::hardware::Void();
}
::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::linkToDeath::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&recipient);
_hidl_args.push_back((void *)&cookie);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->linkToDeath(recipient, cookie);
bool _hidl_out_success = _hidl_return;
(void) _hidl_out_success;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_success);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> ping() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::ping::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->ping();
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::getDebugInfo::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getDebugInfo([&](const auto &_hidl_out_info) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_info);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_info);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> notifySyspropsChanged() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::notifySyspropsChanged::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = addOnewayTask([mImpl = this->mImpl
#ifdef __ANDROID_DEBUGGABLE__
, mEnableInstrumentation = this->mEnableInstrumentation, mInstrumentationCallbacks = this->mInstrumentationCallbacks
#endif // __ANDROID_DEBUGGABLE__
] {
mImpl->notifySyspropsChanged();
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
});
return _hidl_return;
}
::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::unlinkToDeath::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&recipient);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->unlinkToDeath(recipient);
bool _hidl_out_success = _hidl_return;
(void) _hidl_out_success;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_success);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
private:
const ::android::sp<IGraphicBufferProducer> mImpl;
::android::hardware::details::TaskRunner mOnewayQueue;
::android::hardware::Return<void> addOnewayTask(std::function<void(void)>);
};
} // namespace V2_0
} // namespace bufferqueue
} // namespace graphics
} // namespace hardware
} // namespace android
#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V2_0_BSGRAPHICBUFFERPRODUCER_H