Flutter Engine
io_manager.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_LIB_UI_IO_MANAGER_H_
6 #define FLUTTER_LIB_UI_IO_MANAGER_H_
7 
8 #include "flutter/flow/skia_gpu_object.h"
9 #include "flutter/fml/memory/weak_ptr.h"
10 #include "flutter/fml/synchronization/sync_switch.h"
11 #include "third_party/skia/include/gpu/GrDirectContext.h"
12 
13 namespace flutter {
14 // Interface for methods that manage access to the resource GrDirectContext and
15 // Skia unref queue. Meant to be implemented by the owner of the resource
16 // GrDirectContext, i.e. the shell's IOManager.
17 class IOManager {
18  public:
19  virtual ~IOManager() = default;
20 
21  virtual fml::WeakPtr<IOManager> GetWeakIOManager() const = 0;
22 
24 
26 
27  virtual std::shared_ptr<fml::SyncSwitch> GetIsGpuDisabledSyncSwitch() = 0;
28 };
29 
30 } // namespace flutter
31 
32 #endif // FLUTTER_LIB_UI_IO_MANAGER_H_
virtual fml::WeakPtr< GrDirectContext > GetResourceContext() const =0
virtual fml::WeakPtr< IOManager > GetWeakIOManager() const =0
virtual fml::RefPtr< flutter::SkiaUnrefQueue > GetSkiaUnrefQueue() const =0
virtual std::shared_ptr< fml::SyncSwitch > GetIsGpuDisabledSyncSwitch()=0
virtual ~IOManager()=default