• 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_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_
6 #define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_
7 
8 #include "flutter/flow/embedded_views.h"
9 #include "flutter/fml/macros.h"
10 #include "flutter/shell/common/surface.h"
11 
12 namespace flutter {
13 
14 class EmbedderSurface {
15  public:
16   EmbedderSurface();
17 
18   virtual ~EmbedderSurface();
19 
20   virtual bool IsValid() const = 0;
21 
22   virtual std::unique_ptr<Surface> CreateGPUSurface() = 0;
23 
24   virtual sk_sp<GrContext> CreateResourceContext() const = 0;
25 
26  private:
27   FML_DISALLOW_COPY_AND_ASSIGN(EmbedderSurface);
28 };
29 
30 }  // namespace flutter
31 
32 #endif  // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_
33