| #ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_BSGRAPHICBUFFERPRODUCER_H |
| #define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_BSGRAPHICBUFFERPRODUCER_H |
| |
| #include <android-base/macros.h> |
| #include <cutils/trace.h> |
| #include <future> |
| #include <android/hardware/graphics/bufferqueue/1.0/IGraphicBufferProducer.h> |
| |
| #include <hidl/HidlPassthroughSupport.h> |
| #include <hidl/TaskRunner.h> |
| namespace android { |
| namespace hardware { |
| namespace graphics { |
| namespace bufferqueue { |
| namespace V1_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::V1_0::IGraphicBufferProducer follow. |
| ::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", "1.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) { |
| 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); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "requestBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_status, _hidl_out_buffer); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> 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", "1.0", "IGraphicBufferProducer", "setMaxDequeuedBufferCount", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setMaxDequeuedBufferCount(maxDequeuedBuffers); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setMaxDequeuedBufferCount", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> 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", "1.0", "IGraphicBufferProducer", "setAsyncMode", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setAsyncMode(async); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setAsyncMode", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> dequeueBuffer(uint32_t width, uint32_t height, ::android::hardware::graphics::common::V1_0::PixelFormat format, uint32_t usage, bool getFrameTimestamps, 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 *)&width); |
| _hidl_args.push_back((void *)&height); |
| _hidl_args.push_back((void *)&format); |
| _hidl_args.push_back((void *)&usage); |
| _hidl_args.push_back((void *)&getFrameTimestamps); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "dequeueBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->dequeueBuffer(width, height, format, usage, getFrameTimestamps, [&](const auto &_hidl_out_status, const auto &_hidl_out_slot, const auto &_hidl_out_fence, const auto &_hidl_out_outTimestamps) { |
| 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_fence); |
| _hidl_args.push_back((void *)&_hidl_out_outTimestamps); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "dequeueBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_status, _hidl_out_slot, _hidl_out_fence, _hidl_out_outTimestamps); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> 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", "1.0", "IGraphicBufferProducer", "detachBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->detachBuffer(slot); |
| |
| int32_t _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", "1.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", "1.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", "1.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::media::V1_0::AnwBuffer& buffer, 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); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "attachBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->attachBuffer(buffer, [&](const auto &_hidl_out_status, const auto &_hidl_out_slot) { |
| 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); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "attachBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_status, _hidl_out_slot); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> queueBuffer(int32_t slot, const ::android::hardware::graphics::bufferqueue::V1_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", "1.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", "1.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<int32_t> 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", "1.0", "IGraphicBufferProducer", "cancelBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->cancelBuffer(slot, fence); |
| |
| int32_t _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", "1.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", "1.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", "1.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::V1_0::IProducerListener>& listener, int32_t 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", "1.0", "IGraphicBufferProducer", "connect", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::sp<::android::hardware::graphics::bufferqueue::V1_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", "1.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<int32_t> disconnect(int32_t api, ::android::hardware::graphics::bufferqueue::V1_0::IGraphicBufferProducer::DisconnectMode mode) 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); |
| _hidl_args.push_back((void *)&mode); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "disconnect", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->disconnect(api, mode); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "disconnect", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> setSidebandStream(const ::android::hardware::hidl_handle& stream) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setSidebandStream::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&stream); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "setSidebandStream", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setSidebandStream(stream); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setSidebandStream", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> allocateBuffers(uint32_t width, uint32_t height, ::android::hardware::graphics::common::V1_0::PixelFormat format, uint32_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", "1.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); |
| |
| 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.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "allocateBuffers", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> 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", "1.0", "IGraphicBufferProducer", "allowAllocation", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->allowAllocation(allow); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "allowAllocation", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> 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", "1.0", "IGraphicBufferProducer", "setGenerationNumber", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setGenerationNumber(generationNumber); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setGenerationNumber", &_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", "1.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", "1.0", "IGraphicBufferProducer", "getConsumerName", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_name); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> setSharedBufferMode(bool sharedBufferMode) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setSharedBufferMode::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&sharedBufferMode); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "setSharedBufferMode", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setSharedBufferMode(sharedBufferMode); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setSharedBufferMode", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> setAutoRefresh(bool autoRefresh) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::setAutoRefresh::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&autoRefresh); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "setAutoRefresh", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setAutoRefresh(autoRefresh); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setAutoRefresh", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<int32_t> 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", "1.0", "IGraphicBufferProducer", "setDequeueTimeout", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setDequeueTimeout(timeoutNs); |
| |
| int32_t _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", "1.0", "IGraphicBufferProducer", "setDequeueTimeout", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getLastQueuedBuffer(getLastQueuedBuffer_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::getLastQueuedBuffer::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", "1.0", "IGraphicBufferProducer", "getLastQueuedBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getLastQueuedBuffer([&](const auto &_hidl_out_status, const auto &_hidl_out_buffer, const auto &_hidl_out_fence, const auto &_hidl_out_transformMatrix) { |
| 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); |
| _hidl_args.push_back((void *)&_hidl_out_transformMatrix); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "getLastQueuedBuffer", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_status, _hidl_out_buffer, _hidl_out_fence, _hidl_out_transformMatrix); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getFrameTimestamps(getFrameTimestamps_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferProducer::getFrameTimestamps::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", "1.0", "IGraphicBufferProducer", "getFrameTimestamps", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getFrameTimestamps([&](const auto &_hidl_out_timeStamps) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_timeStamps); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "getFrameTimestamps", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_timeStamps); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getUniqueId(getUniqueId_cb _hidl_cb) 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", "1.0", "IGraphicBufferProducer", "getUniqueId", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getUniqueId([&](const auto &_hidl_out_status, const auto &_hidl_out_outId) { |
| 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_outId); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.graphics.bufferqueue", "1.0", "IGraphicBufferProducer", "getUniqueId", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_status, _hidl_out_outId); |
| }); |
| |
| 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 V1_0 |
| } // namespace bufferqueue |
| } // namespace graphics |
| } // namespace hardware |
| } // namespace android |
| |
| #endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_BSGRAPHICBUFFERPRODUCER_H |