Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Enumerations | Functions
proc_table_gles.h File Reference
#include <functional>
#include <string>
#include "flutter/fml/logging.h"
#include "flutter/fml/mapping.h"
#include "impeller/renderer/backend/gles/capabilities_gles.h"
#include "impeller/renderer/backend/gles/description_gles.h"
#include "impeller/renderer/backend/gles/gles.h"

Go to the source code of this file.

Classes

struct  impeller::AutoErrorCheck
 
struct  impeller::GLProc< T >
 
class  impeller::ProcTableGLES
 

Namespaces

namespace  impeller
 

Macros

#define FOR_EACH_IMPELLER_PROC(PROC)
 
#define FOR_EACH_IMPELLER_ES_ONLY_PROC(PROC)
 
#define FOR_EACH_IMPELLER_DESKTOP_ONLY_PROC(PROC)
 
#define FOR_EACH_IMPELLER_GLES3_PROC(PROC)   PROC(BlitFramebuffer);
 
#define FOR_EACH_IMPELLER_EXT_PROC(PROC)
 
#define IMPELLER_PROC(name)    GLProc<decltype(gl##name)> name = {"gl" #name, nullptr};
 

Enumerations

enum class  impeller::DebugResourceType {
  impeller::kTexture , impeller::kBuffer , impeller::kProgram , impeller::kShader ,
  impeller::kRenderBuffer , impeller::kFrameBuffer
}
 

Functions

const char * impeller::GLErrorToString (GLenum value)
 
bool impeller::GLErrorIsFatal (GLenum value)
 
void() impeller::glClearDepthf (GLfloat depth)
 
void() impeller::glDepthRangef (GLfloat n, GLfloat f)
 
void() impeller::glClearDepth (GLdouble depth)
 
void() impeller::glDepthRange (GLdouble n, GLdouble f)
 

Macro Definition Documentation

◆ FOR_EACH_IMPELLER_DESKTOP_ONLY_PROC

#define FOR_EACH_IMPELLER_DESKTOP_ONLY_PROC (   PROC)
Value:
PROC(ClearDepth); \
PROC(DepthRange);

Definition at line 199 of file proc_table_gles.h.

219 {
220 kTexture,
221 kBuffer,
222 kProgram,
223 kShader,
226};
227
228class ProcTableGLES {
229 public:
230 using Resolver = std::function<void*(const char* function_name)>;
231 explicit ProcTableGLES(Resolver resolver);
232 ProcTableGLES(ProcTableGLES&& other) = default;
233
234 ~ProcTableGLES();
235
236#define IMPELLER_PROC(name) \
237 GLProc<decltype(gl##name)> name = {"gl" #name, nullptr};
238
244
245#undef IMPELLER_PROC
246
247 bool IsValid() const;
248
249 /// @brief Set the source for the attached [shader].
250 ///
251 /// Optionally, [defines] may contain a string value that will be
252 /// append to the shader source after the version marker. This can be used to
253 /// support static specialization. For example, setting "#define Foo 1".
254 void ShaderSourceMapping(GLuint shader,
255 const fml::Mapping& mapping,
256 const std::vector<Scalar>& defines = {}) const;
257
258 const DescriptionGLES* GetDescription() const;
259
260 const std::shared_ptr<const CapabilitiesGLES>& GetCapabilities() const;
261
262 std::string DescribeCurrentFramebuffer() const;
263
264 std::string GetProgramInfoLogString(GLuint program) const;
265
266 bool IsCurrentFramebufferComplete() const;
267
268 bool SetDebugLabel(DebugResourceType type,
269 GLint name,
270 const std::string& label) const;
271
272 void PushDebugGroup(const std::string& string) const;
273
274 void PopDebugGroup() const;
275
276 // Visible For testing.
277 std::optional<std::string> ComputeShaderWithDefines(
278 const fml::Mapping& mapping,
279 const std::vector<Scalar>& defines) const;
280
281 private:
282 bool is_valid_ = false;
283 std::unique_ptr<DescriptionGLES> description_;
284 std::shared_ptr<const CapabilitiesGLES> capabilities_;
285 GLint debug_label_max_length_ = 0;
286
287 ProcTableGLES(const ProcTableGLES&) = delete;
288
289 ProcTableGLES& operator=(const ProcTableGLES&) = delete;
290};
291
292} // namespace impeller
293
294#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_PROC_TABLE_GLES_H_
const char * name
Definition fuchsia.cc:50
const char *const function_name
#define IMPELLER_PROC(proc_ivar)
#define FOR_EACH_IMPELLER_EXT_PROC(PROC)
#define FOR_EACH_IMPELLER_GLES3_PROC(PROC)
#define FOR_EACH_IMPELLER_DESKTOP_ONLY_PROC(PROC)
#define FOR_EACH_IMPELLER_ES_ONLY_PROC(PROC)
#define FOR_EACH_IMPELLER_PROC(PROC)

◆ FOR_EACH_IMPELLER_ES_ONLY_PROC

#define FOR_EACH_IMPELLER_ES_ONLY_PROC (   PROC)
Value:
PROC(ClearDepthf); \
PROC(DepthRangef);

Definition at line 191 of file proc_table_gles.h.

◆ FOR_EACH_IMPELLER_EXT_PROC

#define FOR_EACH_IMPELLER_EXT_PROC (   PROC)
Value:
PROC(DebugMessageControlKHR); \
PROC(DiscardFramebufferEXT); \
PROC(FramebufferTexture2DMultisampleEXT); \
PROC(PushDebugGroupKHR); \
PROC(PopDebugGroupKHR); \
PROC(ObjectLabelKHR); \
PROC(RenderbufferStorageMultisampleEXT); \
PROC(GenQueriesEXT); \
PROC(DeleteQueriesEXT); \
PROC(GetQueryObjectui64vEXT); \
PROC(BeginQueryEXT); \
PROC(EndQueryEXT); \
PROC(GetQueryObjectuivEXT);

Definition at line 205 of file proc_table_gles.h.

◆ FOR_EACH_IMPELLER_GLES3_PROC

#define FOR_EACH_IMPELLER_GLES3_PROC (   PROC)    PROC(BlitFramebuffer);

Definition at line 203 of file proc_table_gles.h.

◆ FOR_EACH_IMPELLER_PROC

#define FOR_EACH_IMPELLER_PROC (   PROC)

Definition at line 102 of file proc_table_gles.h.

◆ IMPELLER_PROC

#define IMPELLER_PROC (   name)     GLProc<decltype(gl##name)> name = {"gl" #name, nullptr};

Definition at line 237 of file proc_table_gles.h.

238 {"gl" #name, nullptr};