From a587ac2b71f5422058b272980eb06b0dd72ae374 Mon Sep 17 00:00:00 2001 From: Ethan Date: Tue, 2 Jul 2024 10:50:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20main=20thread=20=20=20UI?= =?UTF-8?q?=20API=20called=20on=20a=20background=20thread:=20-[UIView=20bo?= =?UTF-8?q?unds]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MultiViewFilterExample.xcodeproj/project.pbxproj | 8 ++++++++ framework/Source/iOS/GPUImageView.m | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/iOS/MultiViewFilterExample/MultiViewFilterExample.xcodeproj/project.pbxproj b/examples/iOS/MultiViewFilterExample/MultiViewFilterExample.xcodeproj/project.pbxproj index 47a86b7a7..c243f6f10 100755 --- a/examples/iOS/MultiViewFilterExample/MultiViewFilterExample.xcodeproj/project.pbxproj +++ b/examples/iOS/MultiViewFilterExample/MultiViewFilterExample.xcodeproj/project.pbxproj @@ -205,12 +205,18 @@ attributes = { LastUpgradeCheck = 0500; ORGANIZATIONNAME = "Cell Phone"; + TargetAttributes = { + BC01CA8014E7620600967264 = { + DevelopmentTeam = T86RGZBM38; + }; + }; }; buildConfigurationList = BC01CA7B14E7620600967264 /* Build configuration list for PBXProject "MultiViewFilterExample" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = BC01CA7614E7620600967264; @@ -375,6 +381,7 @@ BC01CA9A14E7620600967264 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEVELOPMENT_TEAM = T86RGZBM38; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MultiViewFilterExample/MultiViewFilterExample-Prefix.pch"; INFOPLIST_FILE = "MultiViewFilterExample/MultiViewFilterExample-Info.plist"; @@ -387,6 +394,7 @@ BC01CA9B14E7620600967264 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DEVELOPMENT_TEAM = T86RGZBM38; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MultiViewFilterExample/MultiViewFilterExample-Prefix.pch"; INFOPLIST_FILE = "MultiViewFilterExample/MultiViewFilterExample-Info.plist"; diff --git a/framework/Source/iOS/GPUImageView.m b/framework/Source/iOS/GPUImageView.m index e092b80ee..5d3c6999a 100755 --- a/framework/Source/iOS/GPUImageView.m +++ b/framework/Source/iOS/GPUImageView.m @@ -235,7 +235,9 @@ - (void)recalculateViewGeometry; runSynchronouslyOnVideoProcessingQueue(^{ CGFloat heightScaling, widthScaling; - CGSize currentViewSize = self.bounds.size; + runOnMainQueueWithoutDeadlocking(^{ + currentBounds = self.bounds; + }); // CGFloat imageAspectRatio = inputImageSize.width / inputImageSize.height; // CGFloat viewAspectRatio = currentViewSize.width / currentViewSize.height;