lin
2025-07-30 fcd736bf35fd93b563e9bbf594f2aa7b62028cc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <android/log.h>
#include <android/native_window.h>
#include <android/native_window_jni.h>
 
#include <rsEnv.h>
#include "rsDispatch.h"
#define LOG_API(...)
 
extern "C" void AllocationSetSurface(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc, jobject sur, dispatchTable dispatchTab)
{
    LOG_API("nAllocationSetSurface, con(%p), alloc(%p), surface(%p)",
            con, alloc, sur);
 
    ANativeWindow* s = NULL;
    if (sur != 0) {
        s = ANativeWindow_fromSurface(_env, sur);
    }
    dispatchTab.AllocationSetSurface(con, alloc, s);
}