Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
flutter_boost_1.22.4
Commits
136ff5db
Commit
136ff5db
authored
Jun 08, 2020
by
余玠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix GPU后台渲染的crash。
这种fix方法应该不是根本性的方案,但的确减少了线上相关crash日志
parent
ac3bc276
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
ios/Classes/Engine/FLBFlutterEngine.m
ios/Classes/Engine/FLBFlutterEngine.m
+3
-1
ios/Classes/container/FLBFlutterViewContainer.m
ios/Classes/container/FLBFlutterViewContainer.m
+7
-2
No files found.
ios/Classes/Engine/FLBFlutterEngine.m
View file @
136ff5db
...
...
@@ -76,7 +76,9 @@
-
(
void
)
resume
{
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.resumed"
];
if
([
UIApplication
sharedApplication
].
applicationState
==
UIApplicationStateActive
){
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.resumed"
];
}
}
-
(
void
)
inactive
...
...
ios/Classes/container/FLBFlutterViewContainer.m
View file @
136ff5db
...
...
@@ -272,8 +272,13 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
params:
_params
uniqueId:
self
.
uniqueIDString
];
//NOTES:务必在show之后再update,否则有闪烁; 或导致侧滑返回时上一个页面会和top页面内容一样
[
self
surfaceUpdated
:
YES
];
//根据淘宝特价版日志证明,即使在UIViewController的viewDidAppear下,application也可能在inactive模式,此时如果提交渲染会导致GPU后台渲染而crash
//参考:https://github.com/flutter/flutter/issues/57973
//https://github.com/flutter/engine/pull/18742
if
([
UIApplication
sharedApplication
].
applicationState
==
UIApplicationStateActive
){
//NOTES:务必在show之后再update,否则有闪烁; 或导致侧滑返回时上一个页面会和top页面内容一样
[
self
surfaceUpdated
:
YES
];
}
[
super
viewDidAppear
:
animated
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment