Flutter Impeller
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 25 of file proc_table_gles.h.

Constructor & Destructor Documentation

◆ AutoErrorCheck()

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

Definition at line 31 of file proc_table_gles.h.

32  : error_fn(error), name(name) {}
const PFNGLGETERRORPROC error_fn

◆ ~AutoErrorCheck()

impeller::AutoErrorCheck::~AutoErrorCheck ( )
inline

Definition at line 34 of file proc_table_gles.h.

34  {
35  if (error_fn) {
36  auto error = error_fn();
37  if (error == GL_NO_ERROR) {
38  return;
39  }
40  if (GLErrorIsFatal(error)) {
41  FML_LOG(FATAL) << "Fatal GL Error " << GLErrorToString(error) << "("
42  << error << ")" << " encountered on call to " << name;
43  } else {
44  FML_LOG(ERROR) << "GL Error " << GLErrorToString(error) << "(" << error
45  << ")" << " encountered on call to " << name;
46  }
47  }
48  }
bool GLErrorIsFatal(GLenum value)
const char * GLErrorToString(GLenum value)

References error_fn, impeller::GLErrorIsFatal(), impeller::GLErrorToString(), and name.

Member Data Documentation

◆ error_fn

const PFNGLGETERRORPROC impeller::AutoErrorCheck::error_fn

Definition at line 26 of file proc_table_gles.h.

Referenced by ~AutoErrorCheck().

◆ name

const char* impeller::AutoErrorCheck::name

Definition at line 29 of file proc_table_gles.h.

Referenced by ~AutoErrorCheck().


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