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

Side by Side 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: Disable fBlendEquation validation 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 unified diff | Download patch
« no previous file with comments | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrGLAssembleInterface.h" 10 #include "GrGLAssembleInterface.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 GET_PROC(ActiveTexture); 64 GET_PROC(ActiveTexture);
65 GET_PROC(AttachShader); 65 GET_PROC(AttachShader);
66 GET_PROC(BindAttribLocation); 66 GET_PROC(BindAttribLocation);
67 GET_PROC(BindBuffer); 67 GET_PROC(BindBuffer);
68 if (glVer >= GR_GL_VER(3,0)) { 68 if (glVer >= GR_GL_VER(3,0)) {
69 GET_PROC(BindFragDataLocation); 69 GET_PROC(BindFragDataLocation);
70 } 70 }
71 GET_PROC(BeginQuery); 71 GET_PROC(BeginQuery);
72 GET_PROC(BindTexture); 72 GET_PROC(BindTexture);
73 GET_PROC(BlendFunc); 73
74 if (extensions.has("GL_KHR_blend_equation_advanced")) {
75 GET_PROC_SUFFIX(BlendBarrier, KHR);
76 } else if (extensions.has("GL_NV_blend_equation_advanced")) {
77 GET_PROC_SUFFIX(BlendBarrier, NV);
78 }
74 79
75 if (glVer >= GR_GL_VER(1,4) || 80 if (glVer >= GR_GL_VER(1,4) ||
76 extensions.has("GL_ARB_imaging") || 81 extensions.has("GL_ARB_imaging")) {
77 extensions.has("GL_EXT_blend_color")) {
78 GET_PROC(BlendColor); 82 GET_PROC(BlendColor);
83 } else if (extensions.has("GL_EXT_blend_color")) {
84 GET_PROC_SUFFIX(BlendColor, EXT);
79 } 85 }
80 86
87 if (glVer >= GR_GL_VER(1,4) ||
88 extensions.has("GL_ARB_imaging")) {
89 GET_PROC(BlendEquation);
90 } else if (extensions.has("GL_EXT_blend_subtract")) {
91 GET_PROC_SUFFIX(BlendEquation, EXT);
92 }
93
94 GET_PROC(BlendFunc);
81 GET_PROC(BufferData); 95 GET_PROC(BufferData);
82 GET_PROC(BufferSubData); 96 GET_PROC(BufferSubData);
83 GET_PROC(Clear); 97 GET_PROC(Clear);
84 GET_PROC(ClearColor); 98 GET_PROC(ClearColor);
85 GET_PROC(ClearStencil); 99 GET_PROC(ClearStencil);
86 GET_PROC(ColorMask); 100 GET_PROC(ColorMask);
87 GET_PROC(CompileShader); 101 GET_PROC(CompileShader);
88 GET_PROC(CompressedTexImage2D); 102 GET_PROC(CompressedTexImage2D);
89 GET_PROC(CompressedTexSubImage2D); 103 GET_PROC(CompressedTexSubImage2D);
90 GET_PROC(CopyTexSubImage2D); 104 GET_PROC(CopyTexSubImage2D);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 348
335 GrGLInterface* interface = SkNEW(GrGLInterface); 349 GrGLInterface* interface = SkNEW(GrGLInterface);
336 GrGLInterface::Functions* functions = &interface->fFunctions; 350 GrGLInterface::Functions* functions = &interface->fFunctions;
337 351
338 GET_PROC(ActiveTexture); 352 GET_PROC(ActiveTexture);
339 GET_PROC(AttachShader); 353 GET_PROC(AttachShader);
340 GET_PROC(BindAttribLocation); 354 GET_PROC(BindAttribLocation);
341 GET_PROC(BindBuffer); 355 GET_PROC(BindBuffer);
342 GET_PROC(BindTexture); 356 GET_PROC(BindTexture);
343 GET_PROC_SUFFIX(BindVertexArray, OES); 357 GET_PROC_SUFFIX(BindVertexArray, OES);
358
359 if (extensions.has("GL_KHR_blend_equation_advanced")) {
360 GET_PROC_SUFFIX(BlendBarrier, KHR);
361 } else if (extensions.has("GL_NV_blend_equation_advanced")) {
362 GET_PROC_SUFFIX(BlendBarrier, NV);
363 }
364
344 GET_PROC(BlendColor); 365 GET_PROC(BlendColor);
366 GET_PROC(BlendEquation);
345 GET_PROC(BlendFunc); 367 GET_PROC(BlendFunc);
346 GET_PROC(BufferData); 368 GET_PROC(BufferData);
347 GET_PROC(BufferSubData); 369 GET_PROC(BufferSubData);
348 GET_PROC(Clear); 370 GET_PROC(Clear);
349 GET_PROC(ClearColor); 371 GET_PROC(ClearColor);
350 GET_PROC(ClearStencil); 372 GET_PROC(ClearStencil);
351 GET_PROC(ColorMask); 373 GET_PROC(ColorMask);
352 GET_PROC(CompileShader); 374 GET_PROC(CompileShader);
353 GET_PROC(CompressedTexImage2D); 375 GET_PROC(CompressedTexImage2D);
354 GET_PROC(CompressedTexSubImage2D); 376 GET_PROC(CompressedTexSubImage2D);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 556
535 if (extensions.has("GL_NV_framebuffer_mixed_samples")) { 557 if (extensions.has("GL_NV_framebuffer_mixed_samples")) {
536 GET_PROC_SUFFIX(CoverageModulation, NV); 558 GET_PROC_SUFFIX(CoverageModulation, NV);
537 } 559 }
538 560
539 interface->fStandard = kGLES_GrGLStandard; 561 interface->fStandard = kGLES_GrGLStandard;
540 interface->fExtensions.swap(&extensions); 562 interface->fExtensions.swap(&extensions);
541 563
542 return interface; 564 return interface;
543 } 565 }
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698