Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 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 | |
Derek Sollenberger | e78f7c9 | 2019-07-31 15:18:47 -0400 | [diff] [blame] | 17 | #include <android/hardware_buffer.h> |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 18 | |
| 19 | #include "jni.h" |
| 20 | |
| 21 | namespace android { |
| 22 | |
Derek Sollenberger | e78f7c9 | 2019-07-31 15:18:47 -0400 | [diff] [blame] | 23 | class GraphicBuffer; |
| 24 | |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 25 | // This function does not perform any type checking, the specified |
| 26 | // object must be an instance of android.view.GraphicBuffer |
Derek Sollenberger | e78f7c9 | 2019-07-31 15:18:47 -0400 | [diff] [blame] | 27 | sp<GraphicBuffer> android_graphics_GraphicBuffer_getNativeGraphicsBuffer(JNIEnv* env, jobject obj); |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 28 | |
Derek Sollenberger | e78f7c9 | 2019-07-31 15:18:47 -0400 | [diff] [blame] | 29 | extern jobject android_graphics_GraphicBuffer_createFromAHardwareBuffer(JNIEnv* env, |
| 30 | AHardwareBuffer* buffer); |
sergeyv | 6e3658a | 2017-01-04 16:57:51 -0800 | [diff] [blame] | 31 | |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 32 | } |