Flutter Engine
The Flutter Engine
offscreen_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_FLOW_LAYERS_OFFSCREEN_SURFACE_H_
6#define FLUTTER_FLOW_LAYERS_OFFSCREEN_SURFACE_H_
7
8#if !SLIMPELLER
9
10#include "flutter/fml/logging.h"
11#include "flutter/fml/macros.h"
12
13#include "flutter/display_list/dl_canvas.h"
14#include "flutter/display_list/skia/dl_sk_canvas.h"
19
20class GrDirectContext;
21
22namespace flutter {
23
25 public:
26 explicit OffscreenSurface(GrDirectContext* surface_context,
27 const SkISize& size);
28
29 ~OffscreenSurface() = default;
30
31 sk_sp<SkData> GetRasterData(bool compressed) const;
32
34
35 bool IsValid() const;
36
37 private:
38 sk_sp<SkSurface> offscreen_surface_;
39 DlSkCanvasAdapter adapter_;
40
41 FML_DISALLOW_COPY_AND_ASSIGN(OffscreenSurface);
42};
43
44} // namespace flutter
45
46#endif // !SLIMPELLER
47
48#endif // FLUTTER_FLOW_LAYERS_OFFSCREEN_SURFACE_H_
Developer-facing API for rendering anything within the engine.
Definition: dl_canvas.h:38
Backend implementation of |DlCanvas| for |SkCanvas|.
Definition: dl_sk_canvas.h:20
sk_sp< SkData > GetRasterData(bool compressed) const
OffscreenSurface(GrDirectContext *surface_context, const SkISize &size)
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