1 /* 2 * Copyright 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V2_0_H2BPRODUCERLISTENER_H 18 #define ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V2_0_H2BPRODUCERLISTENER_H 19 20 #include <android/hardware/graphics/bufferqueue/2.0/IProducerListener.h> 21 #include <gui/IProducerListener.h> 22 #include <hidl/HybridInterface.h> 23 24 namespace android { 25 namespace hardware { 26 namespace graphics { 27 namespace bufferqueue { 28 namespace V2_0 { 29 namespace utils { 30 31 using HProducerListener = ::android::hardware::graphics::bufferqueue::V2_0:: 32 IProducerListener; 33 34 using BProducerListener = ::android::IProducerListener; 35 36 class H2BProducerListener 37 : public H2BConverter<HProducerListener, BnProducerListener> { 38 public: 39 H2BProducerListener(sp<HProducerListener> const& base); 40 virtual void onBufferReleased() override; 41 virtual bool needsReleaseNotify() override; 42 }; 43 44 } // namespace utils 45 } // namespace V2_0 46 } // namespace bufferqueue 47 } // namespace graphics 48 } // namespace hardware 49 } // namespace android 50 51 #endif // ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V2_0_H2BPRODUCERLISTENER_H 52 53