im2d_expand.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
  3. * Authors:
  4. * Cerf Yu <cerf.yu@rock-chips.com>
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. #ifndef _im2d_expand_h_
  19. #define _im2d_expand_h_
  20. #ifdef __cplusplus
  21. #include "im2d_type.h"
  22. #if ANDROID
  23. #include <ui/GraphicBuffer.h>
  24. using namespace android;
  25. IM_API rga_buffer_handle_t importbuffer_GraphicBuffer_handle(buffer_handle_t hnd);
  26. IM_API rga_buffer_handle_t importbuffer_GraphicBuffer(sp<GraphicBuffer> buf);
  27. IM_API rga_buffer_t wrapbuffer_handle(buffer_handle_t hnd);
  28. IM_API rga_buffer_t wrapbuffer_GraphicBuffer(sp<GraphicBuffer> buf);
  29. #if USE_AHARDWAREBUFFER
  30. #include <android/hardware_buffer.h>
  31. IM_API rga_buffer_handle_t importbuffer_AHardwareBuffer(AHardwareBuffer *buf);
  32. IM_API rga_buffer_t wrapbuffer_AHardwareBuffer(AHardwareBuffer *buf);
  33. #endif /* #if USE_AHARDWAREBUFFER */
  34. #endif /* #if ANDROID */
  35. #endif /* #ifdef __cplusplus */
  36. #endif