Flutter Engine
The Flutter Engine
embedder_surface.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_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_
7
8#include <memory>
9#include "flutter/flow/embedded_views.h"
10#include "flutter/flow/surface.h"
11#include "flutter/fml/macros.h"
12
13namespace flutter {
14
16 public:
18
20
21 virtual bool IsValid() const = 0;
22
23 virtual std::unique_ptr<Surface> CreateGPUSurface() = 0;
24
25 virtual std::shared_ptr<impeller::Context> CreateImpellerContext() const;
26
28
29 private:
30 FML_DISALLOW_COPY_AND_ASSIGN(EmbedderSurface);
31};
32
33} // namespace flutter
34
35#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_
virtual std::shared_ptr< impeller::Context > CreateImpellerContext() const
virtual bool IsValid() const =0
virtual std::unique_ptr< Surface > CreateGPUSurface()=0
virtual sk_sp< GrDirectContext > CreateResourceContext() const