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