Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: webrtc/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m

Issue 3002583002: Ensure UIView.layer is accessed on main thread. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
diff --git a/webrtc/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m b/webrtc/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
index 5a60ba3e896ddd0585ab7746c261537faa46a9c6..8af3384e7f9f3645d837670e63bb54db52842432 100644
--- a/webrtc/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
+++ b/webrtc/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
@@ -27,11 +27,14 @@
if (_captureSession == captureSession) {
return;
}
- _captureSession = captureSession;
- AVCaptureVideoPreviewLayer *previewLayer = [self previewLayer];
- [RTCDispatcher dispatchAsyncOnType:RTCDispatcherTypeCaptureSession
+ [RTCDispatcher dispatchAsyncOnType:RTCDispatcherTypeMain
block:^{
- previewLayer.session = captureSession;
+ _captureSession = captureSession;
+ AVCaptureVideoPreviewLayer *previewLayer = [self previewLayer];
+ [RTCDispatcher dispatchAsyncOnType:RTCDispatcherTypeCaptureSession
+ block:^{
+ previewLayer.session = captureSession;
+ }];
}];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698