Flutter Engine
The Flutter Engine
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_FUCHSIA_FLUTTER_SURFACE_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_SURFACE_H_
7
8#include "flutter/flow/surface.h"
9#include "flutter/fml/macros.h"
10#include "flutter/fml/memory/weak_ptr.h"
11
12namespace flutter_runner {
13
14// The interface between the Flutter rasterizer and the underlying platform. May
15// be constructed on any thread but will be used by the engine only on the
16// raster thread.
17class Surface final : public flutter::Surface {
18 public:
19 Surface(std::string debug_label,
20 std::shared_ptr<flutter::ExternalViewEmbedder> view_embedder,
21 GrDirectContext* gr_context);
22
23 ~Surface() override;
24
25 private:
26 const std::string debug_label_;
27 std::shared_ptr<flutter::ExternalViewEmbedder> view_embedder_;
28 GrDirectContext* gr_context_;
29
30 // |flutter::Surface|
31 bool IsValid() override;
32
33 // |flutter::Surface|
34 std::unique_ptr<flutter::SurfaceFrame> AcquireFrame(
35 const SkISize& size) override;
36
37 // |flutter::Surface|
38 GrDirectContext* GetContext() override;
39
40 // |flutter::Surface|
41 SkMatrix GetRootTransformation() const override;
42
43 FML_DISALLOW_COPY_AND_ASSIGN(Surface);
44};
45
46} // namespace flutter_runner
47
48#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_SURFACE_H_
Abstract Base Class that represents where we will be rendering content.
Definition: surface.h:24
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
Definition: SkSize.h:16