Flutter Engine
The Flutter Engine
skia_concurrent_executor.cc
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#include "flutter/runtime/skia_concurrent_executor.h"
6
7#include "flutter/fml/trace_event.h"
8
9namespace flutter {
10
12 : on_work_(on_work) {}
13
15
17 if (!work) {
18 return;
19 }
20 on_work_([work]() {
21 TRACE_EVENT0("flutter", "SkiaExecutor");
22 work();
23 });
24}
25
26} // namespace flutter
std::function< void(fml::closure work)> OnWorkCallback
void add(fml::closure work) override
SkiaConcurrentExecutor(const OnWorkCallback &on_work)
Create a new instance of the executor.
std::function< void()> closure
Definition: closure.h:14
#define TRACE_EVENT0(category_group, name)
Definition: trace_event.h:131