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

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

Issue 1039693004: Add tokens and entry points for KHR_blend_equation_advanced (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/GrGLAssembleInterface.cpp
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index c91da9e6c732fc06c9453fb8174c69e4352196d5..55283599e952f3a6363970a74b1876b8b2c1deed 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -70,7 +70,10 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
}
GET_PROC(BeginQuery);
GET_PROC(BindTexture);
- GET_PROC(BlendFunc);
+
+ if (extensions.has("GL_KHR_blend_equation_advanced")) {
+ GET_PROC_SUFFIX(BlendBarrier, KHR);
+ }
if (glVer >= GR_GL_VER(1,4) ||
extensions.has("GL_ARB_imaging") ||
@@ -78,6 +81,13 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
GET_PROC(BlendColor);
}
+ if (glVer >= GR_GL_VER(1,4) ||
+ extensions.has("GL_ARB_imaging") ||
+ extensions.has("GL_EXT_blend_subtract")) {
+ GET_PROC(BlendEquation);
Mark Kilgard 2015/04/02 22:41:43 technically, EXT_blend_subtract (which requires EX
Chris Dalton 2015/04/17 07:53:42 Agreed. However, I did it this way to mimic how gl
+ }
+
+ GET_PROC(BlendFunc);
GET_PROC(BufferData);
GET_PROC(BufferSubData);
GET_PROC(Clear);
@@ -332,7 +342,13 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
GET_PROC(BindBuffer);
GET_PROC(BindTexture);
GET_PROC_SUFFIX(BindVertexArray, OES);
+
+ if (extensions.has("GL_KHR_blend_equation_advanced")) {
+ GET_PROC_SUFFIX(BlendBarrier, KHR);
+ }
+
GET_PROC(BlendColor);
+ GET_PROC(BlendEquation);
GET_PROC(BlendFunc);
GET_PROC(BufferData);
GET_PROC(BufferSubData);

Powered by Google App Engine
This is Rietveld 408576698