Flutter Engine
The Flutter Engine
fml
memory
task_runner_checker.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_FML_MEMORY_TASK_RUNNER_CHECKER_H_
6
#define FLUTTER_FML_MEMORY_TASK_RUNNER_CHECKER_H_
7
8
#include "flutter/fml/message_loop.h"
9
#include "flutter/fml/task_runner.h"
10
11
namespace
fml
{
12
13
class
TaskRunnerChecker
final {
14
public
:
15
TaskRunnerChecker
();
16
17
~TaskRunnerChecker
();
18
19
bool
RunsOnCreationTaskRunner
()
const
;
20
21
static
bool
RunsOnTheSameThread
(
TaskQueueId
queue_a,
TaskQueueId
queue_b);
22
23
private
:
24
TaskQueueId
initialized_queue_id_;
25
std::set<TaskQueueId> subsumed_queue_ids_;
26
27
TaskQueueId
InitTaskQueueId();
28
};
29
30
#if !defined(NDEBUG)
31
#define FML_DECLARE_TASK_RUNNER_CHECKER(c) fml::TaskRunnerChecker c
32
#define FML_DCHECK_TASK_RUNNER_IS_CURRENT(c) \
33
FML_DCHECK((c).RunsOnCreationTaskRunner())
34
#else
35
#define FML_DECLARE_TASK_RUNNER_CHECKER(c)
36
#define FML_DCHECK_TASK_RUNNER_IS_CURRENT(c) ((void)0)
37
#endif
38
39
}
// namespace fml
40
41
#endif
// FLUTTER_FML_MEMORY_TASK_RUNNER_CHECKER_H_
fml::TaskQueueId
Definition:
task_queue_id.h:15
fml::TaskRunnerChecker
Definition:
task_runner_checker.h:13
fml::TaskRunnerChecker::TaskRunnerChecker
TaskRunnerChecker()
Definition:
task_runner_checker.cc:9
fml::TaskRunnerChecker::RunsOnCreationTaskRunner
bool RunsOnCreationTaskRunner() const
Definition:
task_runner_checker.cc:17
fml::TaskRunnerChecker::~TaskRunnerChecker
~TaskRunnerChecker()
fml::TaskRunnerChecker::RunsOnTheSameThread
static bool RunsOnTheSameThread(TaskQueueId queue_a, TaskQueueId queue_b)
Definition:
task_runner_checker.cc:31
fml
Definition:
ascii_trie.cc:9
Generated on Sun Jun 23 2024 21:54:58 for Flutter Engine by
1.9.4