Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
impeller::AutoErrorCheck Struct Reference

#include <proc_table_gles.h>

Public Member Functions

 AutoErrorCheck (PFNGLGETERRORPROC error, const char *name)
 
 ~AutoErrorCheck ()
 

Public Attributes

const PFNGLGETERRORPROC error_fn
 
const char * name
 

Detailed Description

Definition at line 22 of file proc_table_gles.h.

Constructor & Destructor Documentation

◆ AutoErrorCheck()

impeller::AutoErrorCheck::AutoErrorCheck ( PFNGLGETERRORPROC  error,
const char *  name 
)
inline

Definition at line 29 of file proc_table_gles.h.

30 : error_fn(error), name(name) {}
const uint8_t uint32_t uint32_t GError ** error
const PFNGLGETERRORPROC error_fn

◆ ~AutoErrorCheck()

impeller::AutoErrorCheck::~AutoErrorCheck ( )
inline

Definition at line 32 of file proc_table_gles.h.

32 {
33 if (error_fn) {
34 auto error = error_fn();
35 if (error == GL_NO_ERROR) {
36 return;
37 }
38 if (GLErrorIsFatal(error)) {
39 FML_LOG(FATAL) << "Fatal GL Error " << GLErrorToString(error) << "("
40 << error << ")" << " encountered on call to " << name;
41 } else {
42 FML_LOG(ERROR) << "GL Error " << GLErrorToString(error) << "(" << error
43 << ")" << " encountered on call to " << name;
44 }
45 }
46 }
#define FATAL(error)
#define FML_LOG(severity)
Definition logging.h:82
bool GLErrorIsFatal(GLenum value)
const char * GLErrorToString(GLenum value)
#define ERROR(message)

Member Data Documentation

◆ error_fn

const PFNGLGETERRORPROC impeller::AutoErrorCheck::error_fn

Definition at line 23 of file proc_table_gles.h.

◆ name

const char* impeller::AutoErrorCheck::name

Definition at line 27 of file proc_table_gles.h.


The documentation for this struct was generated from the following file: