android_rscompat_usage_io.cpp 570 B

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