Flutter Engine
 
Loading...
Searching...
No Matches
android_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_ANDROID_SURFACE_ANDROID_SURFACE_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_SURFACE_ANDROID_SURFACE_H_
7
8#include <memory>
11#include "flutter/fml/macros.h"
15
16namespace impeller {
17class Context;
18} // namespace impeller
19
20namespace flutter {
21
22class AndroidExternalViewEmbedder;
23
25 public:
26 virtual ~AndroidSurface();
27
28 virtual bool IsValid() const = 0;
29
30 virtual void TeardownOnScreenContext() = 0;
31
32 virtual std::unique_ptr<Surface> CreateGPUSurface(
33 GrDirectContext* gr_context = nullptr) = 0;
34
35 virtual bool OnScreenSurfaceResize(const DlISize& size) = 0;
36
37 virtual bool ResourceContextMakeCurrent() = 0;
38
39 virtual bool ResourceContextClearCurrent() = 0;
40
41 virtual bool SetNativeWindow(
43 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade) = 0;
44
45 virtual std::unique_ptr<Surface> CreateSnapshotSurface();
46
47 virtual std::shared_ptr<impeller::Context> GetImpellerContext();
48
49 virtual void SetupImpellerSurface();
50
51 protected:
53};
54
56 public:
58
59 virtual ~AndroidSurfaceFactory() = default;
60
61 virtual std::unique_ptr<AndroidSurface> CreateSurface() = 0;
62};
63
64} // namespace flutter
65
66#endif // FLUTTER_SHELL_PLATFORM_ANDROID_SURFACE_ANDROID_SURFACE_H_
virtual std::unique_ptr< AndroidSurface > CreateSurface()=0
virtual ~AndroidSurfaceFactory()=default
virtual bool IsValid() const =0
virtual std::unique_ptr< Surface > CreateSnapshotSurface()
virtual bool SetNativeWindow(fml::RefPtr< AndroidNativeWindow > window, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade)=0
virtual std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context=nullptr)=0
virtual void TeardownOnScreenContext()=0
virtual std::shared_ptr< impeller::Context > GetImpellerContext()
virtual bool ResourceContextClearCurrent()=0
virtual void SetupImpellerSurface()
virtual bool ResourceContextMakeCurrent()=0
virtual bool OnScreenSurfaceResize(const DlISize &size)=0
GLFWwindow * window
Definition main.cc:60
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size