mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Reland "RTM must to acquire lock before called IsMergedUnsafe (#28514)" (flutter/engine#28581)
This commit is contained in:
parent
6bde20b27a
commit
4e77bce9f4
@ -91,7 +91,9 @@ bool RasterThreadMerger::IsOnPlatformThread() const {
|
||||
return MessageLoop::GetCurrentTaskQueueId() == platform_queue_id_;
|
||||
}
|
||||
|
||||
bool RasterThreadMerger::IsOnRasterizingThread() const {
|
||||
bool RasterThreadMerger::IsOnRasterizingThread() {
|
||||
std::scoped_lock lock(mutex_);
|
||||
|
||||
if (IsMergedUnSafe()) {
|
||||
return IsOnPlatformThread();
|
||||
} else {
|
||||
|
||||
@ -89,7 +89,7 @@ class RasterThreadMerger
|
||||
// Returns true if the current thread owns rasterizing.
|
||||
// When the threads are merged, platform thread owns rasterizing.
|
||||
// When un-merged, raster thread owns rasterizing.
|
||||
bool IsOnRasterizingThread() const;
|
||||
bool IsOnRasterizingThread();
|
||||
|
||||
// Returns true if the current thread is the platform thread.
|
||||
bool IsOnPlatformThread() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user