| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::AutoErrorCheck Struct Reference

`#include <proc_table_gles.h>`

## Public Member Functions
| AutoErrorCheck (PFNGLGETERRORPROC error, std::string_view name)
| ~AutoErrorCheck ()

## Public Attributes
const PFNGLGETERRORPROC | error_fn
std::string_view | name

## Detailed Description

Definition at line 27 of file proc_table_gles.h.

## Constructor & Destructor Documentation

## ◆ AutoErrorCheck()

impeller::AutoErrorCheck::AutoErrorCheck | ( | PFNGLGETERRORPROC | error,
|  | std::string_view | name
| ) |  |
| inline

Definition at line 34 of file proc_table_gles.h.

35 : error_fn(error), name(name) {}
impeller::AutoErrorCheck::error_fn
const PFNGLGETERRORPROC error_fn
Definition: proc_table_gles.h:28
impeller::AutoErrorCheck::name
std::string_view name
Definition: proc_table_gles.h:32

## ◆ ~AutoErrorCheck()

impeller::AutoErrorCheck::~AutoErrorCheck | ( |  | ) |
| inline

Definition at line 37 of file proc_table_gles.h.

37 {
38 if (error_fn) {
39 auto error = error_fn();
40 if (error == GL_NO_ERROR) {
41 return;
42 }
43 if (GLErrorIsFatal(error)) {
44 FML_LOG(FATAL) << "Fatal GL Error " << GLErrorToString(error) << "("
45 << error << ")" << " encountered on call to " << name;
46 } else {
47 FML_LOG(ERROR) << "GL Error " << GLErrorToString(error) << "(" << error
48 << ")" << " encountered on call to " << name;
49 }
50 }
51 }
impeller::GLErrorToString
std::string_view GLErrorToString(GLenum value)
Definition: proc_table_gles.cc:19
impeller::GLErrorIsFatal
bool GLErrorIsFatal(GLenum value)
Definition: proc_table_gles.cc:39

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

## Member Data Documentation

## ◆ error_fn

const PFNGLGETERRORPROC impeller::AutoErrorCheck::error_fn

Definition at line 28 of file proc_table_gles.h.

Referenced by ~AutoErrorCheck().

## ◆ name

std::string_view impeller::AutoErrorCheck::name

Name of the GL call being wrapped. should not be stored beyond the caller's lifetime.

Definition at line 32 of file proc_table_gles.h.

Referenced by ~AutoErrorCheck().

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

- impeller/renderer/backend/gles/proc_table_gles.h