aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLAssembleInterface.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2015-04-22 10:39:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-22 10:39:03 -0700
commitbae6f6c3ec927bc1f87cd4c13fec0b52e5677c23 (patch)
tree5f444c5882e7e615ffa2e143bcca630b71d4fb6e /src/gpu/gl/GrGLAssembleInterface.cpp
parent87cbcf3f86a58cacab2e576ebc0e29399a1d48b3 (diff)
Add tokens and entry points for KHR_blend_equation_advanced
Also adds glBlendEquation, which the extension interacts with, to the core of GrGLInterface. Validation of this function is temporarily disabled until Chrome hooks it up. BUG=skia: Review URL: https://codereview.chromium.org/1039693004
Diffstat (limited to 'src/gpu/gl/GrGLAssembleInterface.cpp')
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index b0f0430ffb..89b21fdec3 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -70,14 +70,28 @@ 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);
+ } else if (extensions.has("GL_NV_blend_equation_advanced")) {
+ GET_PROC_SUFFIX(BlendBarrier, NV);
+ }
if (glVer >= GR_GL_VER(1,4) ||
- extensions.has("GL_ARB_imaging") ||
- extensions.has("GL_EXT_blend_color")) {
+ extensions.has("GL_ARB_imaging")) {
GET_PROC(BlendColor);
+ } else if (extensions.has("GL_EXT_blend_color")) {
+ GET_PROC_SUFFIX(BlendColor, EXT);
+ }
+
+ if (glVer >= GR_GL_VER(1,4) ||
+ extensions.has("GL_ARB_imaging")) {
+ GET_PROC(BlendEquation);
+ } else if (extensions.has("GL_EXT_blend_subtract")) {
+ GET_PROC_SUFFIX(BlendEquation, EXT);
}
+ GET_PROC(BlendFunc);
GET_PROC(BufferData);
GET_PROC(BufferSubData);
GET_PROC(Clear);
@@ -341,7 +355,15 @@ 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);
+ } else if (extensions.has("GL_NV_blend_equation_advanced")) {
+ GET_PROC_SUFFIX(BlendBarrier, NV);
+ }
+
GET_PROC(BlendColor);
+ GET_PROC(BlendEquation);
GET_PROC(BlendFunc);
GET_PROC(BufferData);
GET_PROC(BufferSubData);