Flutter Engine
The Flutter Engine
shell
common
context_options.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_COMMON_CONTEXT_OPTIONS_H_
6
#define FLUTTER_SHELL_COMMON_CONTEXT_OPTIONS_H_
7
8
#if !SLIMPELLER
9
10
#include <optional>
11
12
#include "flutter/fml/macros.h"
13
#include "
third_party/skia/include/gpu/GrContextOptions.h
"
14
15
namespace
flutter
{
16
17
enum class
ContextType
{
18
/// The context is used to render to a texture or renderbuffer.
19
kRender
,
20
/// The context will only be used to transfer resources to and from device
21
/// memory. No rendering will be performed using this context.
22
kResource
,
23
};
24
25
//------------------------------------------------------------------------------
26
/// @brief Initializes GrContextOptions with values suitable for Flutter.
27
/// The options can be further tweaked before a GrContext is created
28
/// from these options.
29
///
30
/// @param[in] type The type of context that will be created using these
31
/// options.
32
/// @param[in] type The client rendering API that will be wrapped using a
33
/// context with these options. This argument is only required
34
/// if the context is going to be used with a particular
35
/// client rendering API.
36
///
37
/// @return The default graphics context options.
38
///
39
GrContextOptions
MakeDefaultContextOptions
(
40
ContextType
type
,
41
std::optional<GrBackendApi> api = std::nullopt);
42
43
}
// namespace flutter
44
45
#endif
// !SLIMPELLER
46
47
#endif
// FLUTTER_SHELL_COMMON_CONTEXT_OPTIONS_H_
GrContextOptions.h
type
GLenum type
Definition:
blit_command_gles.cc:126
flutter
Definition:
asset_manager.cc:10
flutter::MakeDefaultContextOptions
GrContextOptions MakeDefaultContextOptions(ContextType type, std::optional< GrBackendApi > api)
Initializes GrContextOptions with values suitable for Flutter. The options can be further tweaked bef...
Definition:
context_options.cc:13
flutter::ContextType
ContextType
Definition:
context_options.h:17
flutter::ContextType::kRender
@ kRender
The context is used to render to a texture or renderbuffer.
flutter::ContextType::kResource
@ kResource
skgpu::ContextType
ContextType
Definition:
ContextType.h:19
GrContextOptions
Definition:
GrContextOptions.h:23
Generated on Sun Jun 23 2024 21:55:07 for Flutter Engine by
1.9.4