Flutter Engine
The Flutter Engine
ProtectedUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef ProtectedUtils_DEFINED
9#define ProtectedUtils_DEFINED
10
13
14class GrDirectContext;
15class SkImage;
16class SkSurface;
17class SkSurfaceProps;
18struct SkISize;
19
20#ifdef SK_GRAPHITE
21namespace skgpu {
22 enum class Protected : bool;
23}
24namespace skgpu::graphite {
25 class Recorder;
26}
27#endif
28
29namespace ProtectedUtils {
30
31/*
32 * These factories create Surfaces and Images with an explicitly specified protected status.
33 * If the Surface/Image cannot be created with the specified protected status nullptr will
34 * be returned.
35 */
36
39 bool textureable,
40 bool isProtected,
41 const SkSurfaceProps* = nullptr);
42
43void CheckImageBEProtection(SkImage*, bool expectingProtected);
44
48 bool isProtected);
49
50#ifdef SK_GRAPHITE
54
59#endif
60
61} // namespace ProtectedUtils
62
63#endif // ProtectedUtils_DEFINED
DlColor color
sk_sp< SkSurface > CreateProtectedSkSurface(GrDirectContext *dContext, SkISize size, bool textureable, bool isProtected, const SkSurfaceProps *surfaceProps)
sk_sp< SkImage > CreateProtectedSkImage(GrDirectContext *dContext, SkISize size, SkColor4f color, bool isProtected)
void CheckImageBEProtection(SkImage *image, bool expectingProtected)
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: GpuTools.h:21
Protected
Definition: GpuTypes.h:61
Definition: SkSize.h:16