OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 fExtensions.has("GL_ARB_sample_shading")) { | 779 fExtensions.has("GL_ARB_sample_shading")) { |
780 if (nullptr == fFunctions.fMinSampleShading) { | 780 if (nullptr == fFunctions.fMinSampleShading) { |
781 RETURN_FALSE_INTERFACE | 781 RETURN_FALSE_INTERFACE |
782 } | 782 } |
783 } else if (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_OES_sample
_shading")) { | 783 } else if (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_OES_sample
_shading")) { |
784 if (nullptr == fFunctions.fMinSampleShading) { | 784 if (nullptr == fFunctions.fMinSampleShading) { |
785 RETURN_FALSE_INTERFACE | 785 RETURN_FALSE_INTERFACE |
786 } | 786 } |
787 } | 787 } |
788 | 788 |
| 789 if (kGL_GrGLStandard == fStandard) { |
| 790 if (glVer >= GR_GL_VER(3, 2) || fExtensions.has("GL_ARB_sync")) { |
| 791 if (nullptr == fFunctions.fFenceSync || |
| 792 nullptr == fFunctions.fClientWaitSync || |
| 793 nullptr == fFunctions.fDeleteSync) { |
| 794 RETURN_FALSE_INTERFACE |
| 795 } |
| 796 } |
| 797 } else if (kGLES_GrGLStandard == fStandard) { |
| 798 if (glVer >= GR_GL_VER(3, 0)) { |
| 799 if (nullptr == fFunctions.fFenceSync || |
| 800 nullptr == fFunctions.fClientWaitSync || |
| 801 nullptr == fFunctions.fDeleteSync) { |
| 802 RETURN_FALSE_INTERFACE |
| 803 } |
| 804 } |
| 805 } |
| 806 |
789 if (fExtensions.has("EGL_KHR_image") || fExtensions.has("EGL_KHR_image_base"
)) { | 807 if (fExtensions.has("EGL_KHR_image") || fExtensions.has("EGL_KHR_image_base"
)) { |
790 if (nullptr == fFunctions.fEGLCreateImage || | 808 if (nullptr == fFunctions.fEGLCreateImage || |
791 nullptr == fFunctions.fEGLDestroyImage) { | 809 nullptr == fFunctions.fEGLDestroyImage) { |
792 RETURN_FALSE_INTERFACE | 810 RETURN_FALSE_INTERFACE |
793 } | 811 } |
794 } | 812 } |
795 | 813 |
796 if (kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(2,0)) { | 814 if (kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(2,0)) { |
797 if (nullptr == fFunctions.fDrawRangeElements) { | 815 if (nullptr == fFunctions.fDrawRangeElements) { |
798 RETURN_FALSE_INTERFACE; | 816 RETURN_FALSE_INTERFACE; |
799 } | 817 } |
800 } else if (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) { | 818 } else if (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) { |
801 if (nullptr == fFunctions.fDrawRangeElements) { | 819 if (nullptr == fFunctions.fDrawRangeElements) { |
802 RETURN_FALSE_INTERFACE; | 820 RETURN_FALSE_INTERFACE; |
803 } | 821 } |
804 } | 822 } |
805 | 823 |
806 return true; | 824 return true; |
807 } | 825 } |
OLD | NEW |