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