• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_RUNTIME_SKIA_CONCURRENT_EXECUTOR_H_
6 #define FLUTTER_RUNTIME_SKIA_CONCURRENT_EXECUTOR_H_
7 
8 #include "flutter/fml/closure.h"
9 #include "flutter/fml/macros.h"
10 #include "third_party/skia/include/core/SkExecutor.h"
11 
12 namespace flutter {
13 
14 class SkiaConcurrentExecutor : public SkExecutor {
15  public:
16   using OnWorkCallback = std::function<void(fml::closure work)>;
17   SkiaConcurrentExecutor(OnWorkCallback on_work);
18 
19   ~SkiaConcurrentExecutor() override;
20 
21   void add(fml::closure work) override;
22 
23  private:
24   OnWorkCallback on_work_;
25 
26   FML_DISALLOW_COPY_AND_ASSIGN(SkiaConcurrentExecutor);
27 };
28 
29 }  // namespace flutter
30 
31 #endif  // FLUTTER_RUNTIME_SKIA_CONCURRENT_EXECUTOR_H_
32