// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_CONTEXT_H_ #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_CONTEXT_H_ #include #include "impeller/display_list/aiks_context.h" #include "impeller/renderer/context.h" #include "impeller/toolkit/interop/impeller.h" #include "impeller/toolkit/interop/object.h" namespace impeller::interop { class Context final : public Object { public: class BackendData; static ScopedObject CreateOpenGLES( std::function proc_address_callback); explicit Context(std::shared_ptr context, std::shared_ptr backend_data); ~Context() override; Context(const Context&) = delete; Context& operator=(const Context&) = delete; bool IsValid() const; std::shared_ptr GetContext() const; AiksContext& GetAiksContext(); private: impeller::AiksContext context_; std::shared_ptr backend_data_; }; } // namespace impeller::interop #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_CONTEXT_H_