summaryrefslogtreecommitdiff
path: root/native/android/native_window_jni.cpp
AgeCommit message (Collapse)Author
2021-05-05ANativeWindow_fromSurface: Use acquire not incStrongRobert Carr
When we call incStrong like this, it won't work if the caller of ANativeWindow_fromSurface later calls ANativeWindow_release and so we leak the reference indefinitely. We change to call acquire so that the caller can call release. Bug: 186190571 Test: Existing tests pass Change-Id: I647a856923c891da2d305471f5ff84103d1f9ed5
2017-04-03ANativeWindow_toSurface implementationJiwen 'Steve' Cai
This enables the conversion from an ANativeWindow (created by NDK API such as: AImageReader_create) to a Java Surface, so that developers can hookup a Java Producer to a native buffer consumer. This CL also introduces android_view_Surface_createFromSurface helper function in libandroid_runtime to convert a C++ sp<Surface> to a Java Surface object. Bug: 36862948 Test: android.media.cts.NativeImageReaderTest Change-Id: Ia99adb654da505ac117a8e58153ac800df23a650
2017-02-10separate the JNI part of the NDK into their own sourceMathias Agopian
Test: built and booted device Bug: 35164655 Change-Id: I944c9f28730b82e8c428b5384dc57e1b296144b2