Replace GrGLInterface's function pointers with std::functions.
This is to facilitate binding to GLES2Interface in Chromium rather than the C interface. It requires capturing the GLES2Interface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674823002
Review URL: https://codereview.chromium.org/1674823002
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index a913fbe..3b06c57 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -664,11 +664,11 @@
// additions are detected by checking the existence of the function.
// We also use *Then* functions that not all drivers might have. Check
// them for consistency.
- if (nullptr == gli->fFunctions.fStencilThenCoverFillPath ||
- nullptr == gli->fFunctions.fStencilThenCoverStrokePath ||
- nullptr == gli->fFunctions.fStencilThenCoverFillPathInstanced ||
- nullptr == gli->fFunctions.fStencilThenCoverStrokePathInstanced ||
- nullptr == gli->fFunctions.fProgramPathFragmentInputGen) {
+ if (!gli->fFunctions.fStencilThenCoverFillPath ||
+ !gli->fFunctions.fStencilThenCoverStrokePath ||
+ !gli->fFunctions.fStencilThenCoverFillPathInstanced ||
+ !gli->fFunctions.fStencilThenCoverStrokePathInstanced ||
+ !gli->fFunctions.fProgramPathFragmentInputGen) {
return false;
}
return true;