1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright (C) 2016 Rockchip Electronics Co., Ltd. 3*4882a593Smuzhiyun * Authors: 4*4882a593Smuzhiyun * Zhiqin Wei <wzq@rock-chips.com> 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Licensed under the Apache License, Version 2.0 (the "License"); 7*4882a593Smuzhiyun * you may not use this file except in compliance with the License. 8*4882a593Smuzhiyun * You may obtain a copy of the License at 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * http://www.apache.org/licenses/LICENSE-2.0 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * Unless required by applicable law or agreed to in writing, software 13*4882a593Smuzhiyun * distributed under the License is distributed on an "AS IS" BASIS, 14*4882a593Smuzhiyun * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15*4882a593Smuzhiyun * See the License for the specific language governing permissions and 16*4882a593Smuzhiyun * limitations under the License. 17*4882a593Smuzhiyun */ 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #ifndef _rk_graphic_buffer_h_ 20*4882a593Smuzhiyun #define _rk_graphic_buffer_h_ 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #ifdef ANDROID 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun #include <stdint.h> 25*4882a593Smuzhiyun #include <vector> 26*4882a593Smuzhiyun #include <sys/types.h> 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #include <system/graphics.h> 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun #include <utils/Thread.h> 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #include <stdlib.h> 33*4882a593Smuzhiyun #include <stdio.h> 34*4882a593Smuzhiyun #include <string.h> 35*4882a593Smuzhiyun #include <errno.h> 36*4882a593Smuzhiyun #include <time.h> 37*4882a593Smuzhiyun #include <unistd.h> 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun #include <sys/mman.h> 40*4882a593Smuzhiyun #include <linux/stddef.h> 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun #include <utils/Atomic.h> 43*4882a593Smuzhiyun #include <utils/Errors.h> 44*4882a593Smuzhiyun #include <android/log.h> 45*4882a593Smuzhiyun #include <utils/Log.h> 46*4882a593Smuzhiyun #include <log/log_main.h> 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun #include "drmrga.h" 49*4882a593Smuzhiyun #include "rga.h" 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun // ------------------------------------------------------------------------------- 52*4882a593Smuzhiyun int RkRgaGetHandleFd(buffer_handle_t handle, int *fd); 53*4882a593Smuzhiyun int RkRgaGetHandleAttributes(buffer_handle_t handle, 54*4882a593Smuzhiyun std::vector<int> *attrs); 55*4882a593Smuzhiyun int RkRgaGetHandleMapAddress(buffer_handle_t handle, 56*4882a593Smuzhiyun void **buf); 57*4882a593Smuzhiyun #endif //Android 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun #endif //_rk_graphic_buffer_h_ 60