Implement support for CHROMIUM_path_rendering pseudo extension
Implement support for path rendering in Chromium through
CHROMIUM_path_rendering pseudo extension.
The extension defines a new pseudo-gl function,
BindFragmentInputLocation. This behaves similarly to the
BindUniformLocation pseudo-gl function. The idea is to assign fragment
input location to a fragment input before linking the program.
BUG=chromium:344330
Committed: https://skia.googlesource.com/skia/+/eeef46d181f9f8db388ecea81df699fc1b3c9280
Review URL: https://codereview.chromium.org/1192663002
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 22ad057..318426b 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -464,16 +464,20 @@
}
bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
- if (!ctxInfo.hasExtension("GL_NV_path_rendering")) {
+ bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rendering");
+
+ if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRendering)) {
return false;
}
+
if (kGL_GrGLStandard == ctxInfo.standard()) {
if (ctxInfo.version() < GR_GL_VER(4, 3) &&
!ctxInfo.hasExtension("GL_ARB_program_interface_query")) {
return false;
}
} else {
- if (ctxInfo.version() < GR_GL_VER(3, 1)) {
+ if (!hasChromiumPathRendering &&
+ ctxInfo.version() < GR_GL_VER(3, 1)) {
return false;
}
}