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 "third_party/skia/include/gpu/GrContext.h" 11 12 namespace flutter { 13 // Interface for methods that manage access to the resource GrContext and Skia 14 // unref queue. Meant to be implemented by the owner of the resource GrContext, 15 // i.e. the shell's IOManager. 16 class IOManager { 17 public: 18 virtual ~IOManager() = default; 19 20 virtual fml::WeakPtr<IOManager> GetWeakIOManager() const = 0; 21 22 virtual fml::WeakPtr<GrContext> GetResourceContext() const = 0; 23 24 virtual fml::RefPtr<flutter::SkiaUnrefQueue> GetSkiaUnrefQueue() const = 0; 25 }; 26 27 } // namespace flutter 28 29 #endif // FLUTTER_LIB_UI_IO_MANAGER_H_ 30