Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1037123003: Implement support for KHR_blend_equation_advanced (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zzz2_barriers
Patch Set: Properly track the previous patch Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 73bf6f0ee6aaf6fc2a0e90dfcc572ed49e0cce48..b0634a16646aafdb0589a97b6f1d6eb45b0a3e1e 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -306,6 +306,19 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fStencilWrapOpsSupport = true;
}
+ // GL_KHR_blend_equation_advanced is a proper subset of GL_NV_blend_equation_advanced, with all
+ // the same enums, but we still check for the NV variants to support legacy drivers that didn't
+ // export the KHR extension yet.
+ if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") ||
+ ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) {
+ fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport;
+ } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") ||
+ ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) {
+ fBlendEquationSupport = kAdvanced_BlendEquationSupport;
+ } else {
+ fBlendEquationSupport = kBasic_BlendEquationSupport;
+ }
+
if (kGL_GrGLStandard == standard) {
fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the desktop VBO
// extension includes glMapBuffer.

Powered by Google App Engine
This is Rietveld 408576698