Flutter Engine
The Flutter Engine
capabilities_gles.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_IMPELLER_RENDERER_BACKEND_GLES_CAPABILITIES_GLES_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_CAPABILITIES_GLES_H_
7
8#include <cstddef>
9
15
16namespace impeller {
17
18class ProcTableGLES;
19
20//------------------------------------------------------------------------------
21/// @brief The Vulkan layers and extensions wrangler.
22///
24 : public Capabilities,
25 public BackendCast<CapabilitiesGLES, Capabilities> {
26 public:
27 explicit CapabilitiesGLES(const ProcTableGLES& gl);
28
30
32
34
36
37 // Must be at least 8.
39
40 // Must be at least 16.
42
43 // Must be at least 16.
45
46 // Must be at least 1.
48
49 // Must be at least 8.
51
52 // Must be at least 64.
54
55 // Must be at least 8.
57
58 // Must be at least 8.
60
61 // May be 0.
63
64 // Must be at least 128.
66
67 // Must be at least display size.
69
70 // May be 0.
72
73 // May be 0.
75
76 size_t GetMaxTextureUnits(ShaderStage stage) const;
77
78 bool IsANGLE() const;
79
80 // |Capabilities|
81 bool SupportsOffscreenMSAA() const override;
82
83 // |Capabilities|
84 bool SupportsImplicitResolvingMSAA() const override;
85
86 // |Capabilities|
87 bool SupportsSSBO() const override;
88
89 // |Capabilities|
90 bool SupportsTextureToTextureBlits() const override;
91
92 // |Capabilities|
93 bool SupportsFramebufferFetch() const override;
94
95 // |Capabilities|
96 bool SupportsCompute() const override;
97
98 // |Capabilities|
99 bool SupportsComputeSubgroups() const override;
100
101 // |Capabilities|
102 bool SupportsReadFromResolve() const override;
103
104 // |Capabilities|
105 bool SupportsDecalSamplerAddressMode() const override;
106
107 // |Capabilities|
108 bool SupportsDeviceTransientTextures() const override;
109
110 // |Capabilities|
111 PixelFormat GetDefaultColorFormat() const override;
112
113 // |Capabilities|
114 PixelFormat GetDefaultStencilFormat() const override;
115
116 // |Capabilities|
118
119 // |Capabilities|
121
122 private:
123 bool supports_framebuffer_fetch_ = false;
124 bool supports_decal_sampler_address_mode_ = false;
125 bool supports_offscreen_msaa_ = false;
126 bool supports_implicit_msaa_ = false;
127 bool is_angle_ = false;
128 PixelFormat default_glyph_atlas_format_ = PixelFormat::kUnknown;
129};
130
131} // namespace impeller
132
133#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_CAPABILITIES_GLES_H_
The Vulkan layers and extensions wrangler.
bool SupportsImplicitResolvingMSAA() const override
Whether the context backend supports multisampled rendering to the on-screen surface without requirin...
PixelFormat GetDefaultDepthStencilFormat() const override
Returns a supported PixelFormat for textures that store both a stencil and depth component....
CapabilitiesGLES & operator=(CapabilitiesGLES &&)=delete
PixelFormat GetDefaultColorFormat() const override
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
bool SupportsSSBO() const override
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
bool SupportsTextureToTextureBlits() const override
Whether the context backend supports blitting from one texture region to another texture region (via ...
CapabilitiesGLES(const CapabilitiesGLES &)=delete
CapabilitiesGLES(const ProcTableGLES &gl)
size_t GetMaxTextureUnits(ShaderStage stage) const
CapabilitiesGLES(CapabilitiesGLES &&)=delete
bool SupportsOffscreenMSAA() const override
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
PixelFormat GetDefaultStencilFormat() const override
Returns a supported PixelFormat for textures that store stencil information. May include a depth chan...
bool SupportsReadFromResolve() const override
Whether the context backend supports binding the current RenderPass attachments. This is supported if...
bool SupportsDeviceTransientTextures() const override
Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") text...
bool SupportsDecalSamplerAddressMode() const override
Whether the context backend supports SamplerAddressMode::Decal.
PixelFormat GetDefaultGlyphAtlasFormat() const override
Returns the default pixel format for the alpha bitmap glyph atlas.
bool SupportsCompute() const override
Whether the context backend supports ComputePass.
bool SupportsComputeSubgroups() const override
Whether the context backend supports configuring ComputePass command subgroups.
CapabilitiesGLES & operator=(const CapabilitiesGLES &)=delete
bool SupportsFramebufferFetch() const override
Whether the context backend is able to support pipelines with shaders that read from the framebuffer ...
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:99
gl
Definition: malisc.py:41