Flutter Engine
 
Loading...
Searching...
No Matches
android_surface_software.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_ANDROID_SURFACE_SOFTWARE_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SURFACE_SOFTWARE_H_
7
14
15#include "third_party/skia/include/core/SkSurface.h"
16
17namespace flutter {
18
21 public:
23
25
26 // |AndroidSurface|
27 bool IsValid() const override;
28
29 // |AndroidSurface|
30 bool ResourceContextMakeCurrent() override;
31
32 // |AndroidSurface|
33 bool ResourceContextClearCurrent() override;
34
35 // |AndroidSurface|
36 std::unique_ptr<Surface> CreateGPUSurface(
37 GrDirectContext* gr_context) override;
38
39 // |AndroidSurface|
40 void TeardownOnScreenContext() override;
41
42 // |AndroidSurface|
43 bool OnScreenSurfaceResize(const DlISize& size) override;
44
45 // |AndroidSurface|
46 bool SetNativeWindow(
48 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade) override;
49
50 // |GPUSurfaceSoftwareDelegate|
51 sk_sp<SkSurface> AcquireBackingStore(const DlISize& size) override;
52
53 // |GPUSurfaceSoftwareDelegate|
54 bool PresentBackingStore(sk_sp<SkSurface> backing_store) override;
55
56 private:
57 sk_sp<SkSurface> sk_surface_;
59 SkColorType target_color_type_;
60 SkAlphaType target_alpha_type_;
61
63};
64
65} // namespace flutter
66
67#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SURFACE_SOFTWARE_H_
sk_sp< SkSurface > AcquireBackingStore(const DlISize &size) override
Called when the GPU surface needs a new buffer to render a new frame into.
bool PresentBackingStore(sk_sp< SkSurface > backing_store) override
Called by the platform when a frame has been rendered into the backing store and the platform must di...
bool OnScreenSurfaceResize(const DlISize &size) override
bool SetNativeWindow(fml::RefPtr< AndroidNativeWindow > window, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade) override
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context) override
Interface implemented by all platform surfaces that can present a software backing store to the "scre...
GLFWwindow * window
Definition main.cc:60
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
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