5#ifndef FLUTTER_FML_SHARED_THREAD_MERGER_H_
6#define FLUTTER_FML_SHARED_THREAD_MERGER_H_
8#include <condition_variable>
11#include "flutter/fml/macros.h"
12#include "flutter/fml/memory/ref_counted.h"
13#include "flutter/fml/message_loop_task_queues.h"
17class RasterThreadMerger;
62 bool enabled_ =
false;
67 std::map<RasterThreadMergerId, std::atomic_size_t> lease_term_by_caller_;
69 bool IsAllLeaseTermsZeroUnSafe()
const;
71 bool UnMergeNowUnSafe();
SharedThreadMerger(TaskQueueId owner, TaskQueueId subsumed)
bool UnMergeNowIfLastOne(RasterThreadMergerId caller)
bool IsMergedUnSafe() const
void SetEnabledUnSafe(bool enabled)
bool IsEnabledUnSafe() const
void ExtendLeaseTo(RasterThreadMergerId caller, size_t lease_term)
bool DecrementLease(RasterThreadMergerId caller)
bool MergeWithLease(RasterThreadMergerId caller, size_t lease_term)
void * RasterThreadMergerId