Browse Source

mac-virtualcam: Remove unnecessary IOSurfaceLocks in Mach Server

IOSurface locks are only necessary when any processing with the data
contained in the surface is done and an explicit copy of data from GPU
memory back to CPU memory is needed.
PatTheMav 3 years ago
parent
commit
0b0ac1b958
1 changed files with 0 additions and 3 deletions
  1. 0 3
      plugins/mac-virtualcam/src/obs-plugin/OBSDALMachServer.mm

+ 0 - 3
plugins/mac-virtualcam/src/obs-plugin/OBSDALMachServer.mm

@@ -15,7 +15,6 @@
 @property NSPort *port;
 @property NSMutableSet *clientPorts;
 @property NSRunLoop *runLoop;
-@property uint32_t seed;
 @end
 
 @implementation OBSDALMachServer
@@ -156,7 +155,6 @@
 			return;
 		}
 
-		IOSurfaceLock(surface, 0, &_seed);
 		mach_port_t framePort = IOSurfaceCreateMachPort(surface);
 
 		if (!framePort) {
@@ -176,7 +174,6 @@
 					 ]];
 
 		mach_port_deallocate(mach_task_self(), framePort);
-		IOSurfaceUnlock(surface, 0, &_seed);
 	}
 }