Commit adbce3a9 authored by Roman Sedaikin's avatar Roman Sedaikin

Fixed crash when releasing CAMetalDrawable resource.

parent 5eb489bd
...@@ -91,7 +91,6 @@ JNIEXPORT jlong JNICALL Java_org_jetbrains_skiko_redrawer_MetalRedrawer_makeMeta ...@@ -91,7 +91,6 @@ JNIEXPORT jlong JNICALL Java_org_jetbrains_skiko_redrawer_MetalRedrawer_makeMeta
JNIEnv * env, jobject redrawer, jlong devicePtr, jint width, jint height) JNIEnv * env, jobject redrawer, jlong devicePtr, jint width, jint height)
{ {
MetalDevice *device = (MetalDevice *) devicePtr; MetalDevice *device = (MetalDevice *) devicePtr;
[device.drawableHandle release];
id<CAMetalDrawable> currentDrawable = [device.layer nextDrawable]; id<CAMetalDrawable> currentDrawable = [device.layer nextDrawable];
GrMtlTextureInfo info; GrMtlTextureInfo info;
info.fTexture.retain(currentDrawable.texture); info.fTexture.retain(currentDrawable.texture);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment