Fix texture upload callbacks in Java/Kotlin (#6939)

* Fix texture upload callbacks in Java/Kotlin

* Update release notes
This commit is contained in:
Romain Guy
2023-07-06 15:53:24 -07:00
committed by GitHub
parent 3beb39f30b
commit 4582ce8769
3 changed files with 4 additions and 5 deletions

View File

@@ -8,3 +8,4 @@ appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md).
## Release notes for next branch cut
- Java/Kotlin: user callbacks were not invoked on successful texture upload

View File

@@ -511,9 +511,7 @@ public:
private:
void* mData = nullptr;
jobject mBitmap = nullptr;
jobject mHandler = nullptr;
jobject mCallback = nullptr;
jobject mBitmap{};
AndroidBitmapInfo mInfo{};
};

View File

@@ -231,7 +231,7 @@ class MainActivity : Activity() {
animator.repeatCount = ValueAnimator.INFINITE
animator.addUpdateListener { a ->
val v = (a.animatedValue as Float)
camera.lookAt(cos(v) * 4.5, 1.5, sin(v) * 4.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0)
camera.lookAt(cos(v) * 5.5, 1.5, sin(v) * 5.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0)
}
animator.start()
}
@@ -253,7 +253,7 @@ class MainActivity : Activity() {
// Stop the animation and any pending frame
choreographer.removeFrameCallback(frameScheduler)
animator.cancel();
animator.cancel()
// Always detach the surface before destroying the engine
uiHelper.detach()