Flutter Engine
The Flutter Engine
embedder_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_EMBEDDER_EMBEDDER_SURFACE_SOFTWARE_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_SOFTWARE_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/gpu/gpu_surface_software.h"
10#include "flutter/shell/platform/embedder/embedder_external_view_embedder.h"
11#include "flutter/shell/platform/embedder/embedder_surface.h"
12
14
15namespace flutter {
16
19 public:
21 std::function<bool(const void* allocation, size_t row_bytes, size_t height)>
23 };
24
26 SoftwareDispatchTable software_dispatch_table,
27 std::shared_ptr<EmbedderExternalViewEmbedder> external_view_embedder);
28
30
31 private:
32 bool valid_ = false;
33 SoftwareDispatchTable software_dispatch_table_;
34 sk_sp<SkSurface> sk_surface_;
35 std::shared_ptr<EmbedderExternalViewEmbedder> external_view_embedder_;
36
37 // |EmbedderSurface|
38 bool IsValid() const override;
39
40 // |EmbedderSurface|
41 std::unique_ptr<Surface> CreateGPUSurface() override;
42
43 // |EmbedderSurface|
44 sk_sp<GrDirectContext> CreateResourceContext() const override;
45
46 // |GPUSurfaceSoftwareDelegate|
47 sk_sp<SkSurface> AcquireBackingStore(const SkISize& size) override;
48
49 // |GPUSurfaceSoftwareDelegate|
50 bool PresentBackingStore(sk_sp<SkSurface> backing_store) override;
51
52 FML_DISALLOW_COPY_AND_ASSIGN(EmbedderSurfaceSoftware);
53};
54
55} // namespace flutter
56
57#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_SOFTWARE_H_
EmbedderSurfaceSoftware(SoftwareDispatchTable software_dispatch_table, std::shared_ptr< EmbedderExternalViewEmbedder > external_view_embedder)
Interface implemented by all platform surfaces that can present a software backing store to the "scre...
Dart_NativeFunction function
Definition: fuchsia.cc:51
it will be possible to load the file into Perfetto s trace viewer 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
Definition: switches.h:259
int32_t height
Definition: SkSize.h:16
std::function< bool(const void *allocation, size_t row_bytes, size_t height)> software_present_backing_store