OLD | NEW |
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 Loading... |
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 |
74 if (extensions.has("GL_KHR_blend_equation_advanced")) { | 75 if (glVer >= GR_GL_VER(1,4) || |
75 GET_PROC_SUFFIX(BlendBarrier, KHR); | 76 extensions.has("GL_ARB_imaging") || |
76 } else if (extensions.has("GL_NV_blend_equation_advanced")) { | 77 extensions.has("GL_EXT_blend_color")) { |
77 GET_PROC_SUFFIX(BlendBarrier, NV); | 78 GET_PROC(BlendColor); |
78 } | 79 } |
79 | 80 |
80 if (glVer >= GR_GL_VER(1,4) || | |
81 extensions.has("GL_ARB_imaging")) { | |
82 GET_PROC(BlendColor); | |
83 } else if (extensions.has("GL_EXT_blend_color")) { | |
84 GET_PROC_SUFFIX(BlendColor, EXT); | |
85 } | |
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); | |
95 GET_PROC(BufferData); | 81 GET_PROC(BufferData); |
96 GET_PROC(BufferSubData); | 82 GET_PROC(BufferSubData); |
97 GET_PROC(Clear); | 83 GET_PROC(Clear); |
98 GET_PROC(ClearColor); | 84 GET_PROC(ClearColor); |
99 GET_PROC(ClearStencil); | 85 GET_PROC(ClearStencil); |
100 GET_PROC(ColorMask); | 86 GET_PROC(ColorMask); |
101 GET_PROC(CompileShader); | 87 GET_PROC(CompileShader); |
102 GET_PROC(CompressedTexImage2D); | 88 GET_PROC(CompressedTexImage2D); |
103 GET_PROC(CompressedTexSubImage2D); | 89 GET_PROC(CompressedTexSubImage2D); |
104 GET_PROC(CopyTexSubImage2D); | 90 GET_PROC(CopyTexSubImage2D); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 334 |
349 GrGLInterface* interface = SkNEW(GrGLInterface); | 335 GrGLInterface* interface = SkNEW(GrGLInterface); |
350 GrGLInterface::Functions* functions = &interface->fFunctions; | 336 GrGLInterface::Functions* functions = &interface->fFunctions; |
351 | 337 |
352 GET_PROC(ActiveTexture); | 338 GET_PROC(ActiveTexture); |
353 GET_PROC(AttachShader); | 339 GET_PROC(AttachShader); |
354 GET_PROC(BindAttribLocation); | 340 GET_PROC(BindAttribLocation); |
355 GET_PROC(BindBuffer); | 341 GET_PROC(BindBuffer); |
356 GET_PROC(BindTexture); | 342 GET_PROC(BindTexture); |
357 GET_PROC_SUFFIX(BindVertexArray, OES); | 343 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 | |
365 GET_PROC(BlendColor); | 344 GET_PROC(BlendColor); |
366 GET_PROC(BlendEquation); | |
367 GET_PROC(BlendFunc); | 345 GET_PROC(BlendFunc); |
368 GET_PROC(BufferData); | 346 GET_PROC(BufferData); |
369 GET_PROC(BufferSubData); | 347 GET_PROC(BufferSubData); |
370 GET_PROC(Clear); | 348 GET_PROC(Clear); |
371 GET_PROC(ClearColor); | 349 GET_PROC(ClearColor); |
372 GET_PROC(ClearStencil); | 350 GET_PROC(ClearStencil); |
373 GET_PROC(ColorMask); | 351 GET_PROC(ColorMask); |
374 GET_PROC(CompileShader); | 352 GET_PROC(CompileShader); |
375 GET_PROC(CompressedTexImage2D); | 353 GET_PROC(CompressedTexImage2D); |
376 GET_PROC(CompressedTexSubImage2D); | 354 GET_PROC(CompressedTexSubImage2D); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 534 |
557 if (extensions.has("GL_NV_framebuffer_mixed_samples")) { | 535 if (extensions.has("GL_NV_framebuffer_mixed_samples")) { |
558 GET_PROC_SUFFIX(CoverageModulation, NV); | 536 GET_PROC_SUFFIX(CoverageModulation, NV); |
559 } | 537 } |
560 | 538 |
561 interface->fStandard = kGLES_GrGLStandard; | 539 interface->fStandard = kGLES_GrGLStandard; |
562 interface->fExtensions.swap(&extensions); | 540 interface->fExtensions.swap(&extensions); |
563 | 541 |
564 return interface; | 542 return interface; |
565 } | 543 } |
OLD | NEW |