blob: ff35204b2ec9c5d8a53cce86f235a2385b2b9eab [file] [log] [blame]
Alec Mouricf3ad872020-04-27 22:36:17 -07001/*
2 * Copyright 2020 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#include <android/surface_texture_jni.h>
18#include <surfacetexture/surface_texture_platform.h>
19
20using namespace android;
21
22ANativeWindow* ASurfaceTexture_acquireANativeWindow(ASurfaceTexture* st) {
23 return ASurfaceTexture_routeAcquireANativeWindow(st);
24}
25
26int ASurfaceTexture_attachToGLContext(ASurfaceTexture* st, uint32_t texName) {
27 return ASurfaceTexture_routeAttachToGLContext(st, texName);
28}
29
30int ASurfaceTexture_detachFromGLContext(ASurfaceTexture* st) {
31 return ASurfaceTexture_routeDetachFromGLContext(st);
32}
33
34void ASurfaceTexture_release(ASurfaceTexture* st) {
35 return ASurfaceTexture_routeRelease(st);
36}
37
38int ASurfaceTexture_updateTexImage(ASurfaceTexture* st) {
39 return ASurfaceTexture_routeUpdateTexImage(st);
40}
41
42void ASurfaceTexture_getTransformMatrix(ASurfaceTexture* st, float mtx[16]) {
43 return ASurfaceTexture_routeGetTransformMatrix(st, mtx);
44}
45
46int64_t ASurfaceTexture_getTimestamp(ASurfaceTexture* st) {
47 return ASurfaceTexture_routeGetTimestamp(st);
48}
49
50ASurfaceTexture* ASurfaceTexture_fromSurfaceTexture(JNIEnv* env, jobject surfacetexture) {
51 return ASurfaceTexture_routeFromSurfaceTexture(env, surfacetexture);
52}