-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorsteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
... to make ownership semantics more clear and not rely on raw pointers where we don't need to.
See below:
const char* GLErrorToString(GLenum value);
bool GLErrorIsFatal(GLenum value);
struct AutoErrorCheck {
const PFNGLGETERRORPROC error_fn;
const char* name;
AutoErrorCheck(PFNGLGETERRORPROC error, const char* name)
: error_fn(error), name(name) {}
~AutoErrorCheck() {
if (error_fn) {
auto error = error_fn();
if (error == GL_NO_ERROR) {
return;
}
if (GLErrorIsFatal(error)) {
FML_LOG(FATAL) << "Fatal GL Error " << GLErrorToString(error) << "("
<< error << ")"
<< " encountered on call to " << name;
} else {
FML_LOG(ERROR) << "GL Error " << GLErrorToString(error) << "(" << error
<< ")"
<< " encountered on call to " << name;
}
}
}
};
template <class T>
struct GLProc {
using GLFunctionType = T;
//----------------------------------------------------------------------------
/// The name of the GL function.
///
const char* name = nullptr;Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorsteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team