@shopify/react-native-skia 1.3.13 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (361) hide show
  1. package/android/CMakeLists.txt +9 -4
  2. package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +6 -0
  3. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +81 -0
  4. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.h +40 -0
  5. package/cpp/api/JsiSkApi.h +2 -0
  6. package/cpp/api/JsiSkPath.h +29 -19
  7. package/cpp/api/JsiSkRuntimeEffect.h +7 -0
  8. package/cpp/api/JsiSkiaContext.h +79 -0
  9. package/cpp/rnskia/RNSkPlatformContext.h +4 -0
  10. package/cpp/rnskia/SkiaContext.h +22 -0
  11. package/cpp/skia/include/android/GrAHardwareBufferUtils.h +2 -2
  12. package/cpp/skia/include/android/SkImageAndroid.h +1 -1
  13. package/cpp/skia/include/android/SkSurfaceAndroid.h +1 -1
  14. package/cpp/skia/include/codec/SkAndroidCodec.h +13 -9
  15. package/cpp/skia/include/codec/SkCodec.h +28 -5
  16. package/cpp/skia/include/core/SkArc.h +69 -0
  17. package/cpp/skia/include/core/SkBitmap.h +10 -0
  18. package/cpp/skia/include/core/SkBlender.h +2 -3
  19. package/cpp/skia/include/core/SkCanvas.h +86 -16
  20. package/cpp/skia/include/core/SkCapabilities.h +0 -4
  21. package/cpp/skia/include/core/SkColorFilter.h +4 -4
  22. package/cpp/skia/include/core/SkColorPriv.h +5 -7
  23. package/cpp/skia/include/core/SkColorType.h +2 -0
  24. package/cpp/skia/include/core/SkFlattenable.h +1 -1
  25. package/cpp/skia/include/core/SkFontArguments.h +3 -1
  26. package/cpp/skia/include/core/SkFontParameters.h +3 -2
  27. package/cpp/skia/include/core/SkFourByteTag.h +19 -0
  28. package/cpp/skia/include/core/SkImage.h +41 -1
  29. package/cpp/skia/include/core/SkImageGenerator.h +0 -5
  30. package/cpp/skia/include/core/SkImageInfo.h +20 -0
  31. package/cpp/skia/include/core/SkM44.h +1 -1
  32. package/cpp/skia/include/core/SkMatrix.h +2 -1
  33. package/cpp/skia/include/core/SkMilestone.h +1 -1
  34. package/cpp/skia/include/core/SkPaint.h +1 -1
  35. package/cpp/skia/include/core/SkPath.h +20 -6
  36. package/cpp/skia/include/core/SkPathMeasure.h +1 -0
  37. package/cpp/skia/include/core/SkPicture.h +5 -5
  38. package/cpp/skia/include/core/SkPoint3.h +2 -12
  39. package/cpp/skia/include/core/SkRRect.h +5 -0
  40. package/cpp/skia/include/core/SkRect.h +5 -16
  41. package/cpp/skia/include/core/SkRefCnt.h +2 -0
  42. package/cpp/skia/include/core/SkScalar.h +20 -32
  43. package/cpp/skia/include/core/SkShader.h +17 -0
  44. package/cpp/skia/include/core/SkSize.h +2 -1
  45. package/cpp/skia/include/core/SkStream.h +2 -3
  46. package/cpp/skia/include/core/SkStrokeRec.h +6 -1
  47. package/cpp/skia/include/core/SkSurface.h +13 -4
  48. package/cpp/skia/include/core/SkSurfaceProps.h +5 -0
  49. package/cpp/skia/include/core/SkSwizzle.h +3 -1
  50. package/cpp/skia/include/core/SkTypeface.h +1 -0
  51. package/cpp/skia/include/core/SkTypes.h +1 -19
  52. package/cpp/skia/include/core/SkUnPreMultiply.h +4 -5
  53. package/cpp/skia/include/core/SkVertices.h +4 -2
  54. package/cpp/skia/include/docs/SkPDFDocument.h +11 -14
  55. package/cpp/skia/include/effects/SkHighContrastFilter.h +6 -6
  56. package/cpp/skia/include/effects/SkImageFilters.h +49 -23
  57. package/cpp/skia/include/effects/SkRuntimeEffect.h +51 -70
  58. package/cpp/skia/include/effects/SkShaderMaskFilter.h +2 -0
  59. package/cpp/skia/include/effects/SkTableMaskFilter.h +2 -0
  60. package/cpp/skia/include/gpu/GrBackendSemaphore.h +2 -120
  61. package/cpp/skia/include/gpu/GrBackendSurface.h +2 -466
  62. package/cpp/skia/include/gpu/GrContextOptions.h +2 -368
  63. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +2 -179
  64. package/cpp/skia/include/gpu/GrDirectContext.h +2 -1011
  65. package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +2 -47
  66. package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +2 -41
  67. package/cpp/skia/include/gpu/GrRecordingContext.h +2 -279
  68. package/cpp/skia/include/gpu/GrTypes.h +2 -238
  69. package/cpp/skia/include/gpu/GrYUVABackendTextures.h +2 -118
  70. package/cpp/skia/include/gpu/d3d/GrD3DBackendContext.h +2 -29
  71. package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +2 -242
  72. package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +80 -0
  73. package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +412 -0
  74. package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +386 -0
  75. package/cpp/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h +175 -0
  76. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +993 -0
  77. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +53 -0
  78. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkaroundsAutogen.h +45 -0
  79. package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +1 -1
  80. package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +285 -0
  81. package/cpp/skia/include/gpu/ganesh/GrTypes.h +177 -0
  82. package/cpp/skia/include/gpu/ganesh/GrYUVABackendTextures.h +130 -0
  83. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +1 -1
  84. package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +1 -1
  85. package/cpp/skia/include/gpu/ganesh/d3d/GrD3DBackendContext.h +35 -0
  86. package/cpp/skia/include/gpu/ganesh/d3d/GrD3DTypes.h +248 -0
  87. package/cpp/skia/include/gpu/ganesh/gl/GrGLAssembleHelpers.h +17 -0
  88. package/cpp/skia/include/gpu/ganesh/gl/GrGLAssembleInterface.h +45 -0
  89. package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +1 -1
  90. package/cpp/skia/include/gpu/ganesh/gl/GrGLConfig.h +69 -0
  91. package/cpp/skia/include/gpu/ganesh/gl/GrGLExtensions.h +79 -0
  92. package/cpp/skia/include/gpu/ganesh/gl/GrGLFunctions.h +306 -0
  93. package/cpp/skia/include/gpu/ganesh/gl/GrGLInterface.h +338 -0
  94. package/cpp/skia/include/gpu/ganesh/gl/GrGLMakeWebGLInterface.h +19 -0
  95. package/cpp/skia/include/gpu/ganesh/gl/GrGLTypes.h +219 -0
  96. package/cpp/skia/include/gpu/{gl → ganesh/gl}/egl/GrGLMakeEGLInterface.h +2 -2
  97. package/cpp/skia/include/gpu/ganesh/gl/epoxy/GrGLMakeEpoxyEGLInterface.h +20 -0
  98. package/cpp/skia/include/gpu/ganesh/gl/ios/GrGLMakeIOSInterface.h +20 -0
  99. package/cpp/skia/include/gpu/ganesh/gl/mac/GrGLMakeMacInterface.h +20 -0
  100. package/cpp/skia/include/gpu/ganesh/gl/win/GrGLMakeWinInterface.h +20 -0
  101. package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +166 -0
  102. package/cpp/skia/include/gpu/{mtl → ganesh/mtl}/GrMtlBackendContext.h +2 -2
  103. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSemaphore.h +23 -0
  104. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSurface.h +44 -0
  105. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlDirectContext.h +30 -0
  106. package/cpp/skia/include/gpu/{mtl → ganesh/mtl}/GrMtlTypes.h +1 -3
  107. package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +2 -2
  108. package/cpp/skia/include/gpu/ganesh/vk/GrBackendDrawableInfo.h +2 -2
  109. package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSemaphore.h +1 -1
  110. package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +7 -3
  111. package/cpp/skia/include/gpu/ganesh/vk/GrVkDirectContext.h +6 -3
  112. package/cpp/skia/include/gpu/ganesh/vk/GrVkTypes.h +101 -0
  113. package/cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h +2 -9
  114. package/cpp/skia/include/gpu/gl/GrGLAssembleInterface.h +2 -38
  115. package/cpp/skia/include/gpu/gl/GrGLConfig.h +2 -73
  116. package/cpp/skia/include/gpu/gl/GrGLExtensions.h +2 -72
  117. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +2 -301
  118. package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -332
  119. package/cpp/skia/include/gpu/gl/GrGLTypes.h +2 -213
  120. package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +20 -41
  121. package/cpp/skia/include/gpu/graphite/BackendTexture.h +18 -118
  122. package/cpp/skia/include/gpu/graphite/Context.h +122 -44
  123. package/cpp/skia/include/gpu/graphite/ContextOptions.h +30 -3
  124. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +45 -17
  125. package/cpp/skia/include/gpu/graphite/Image.h +56 -54
  126. package/cpp/skia/include/gpu/graphite/Recorder.h +68 -14
  127. package/cpp/skia/include/gpu/graphite/Recording.h +3 -3
  128. package/cpp/skia/include/gpu/graphite/Surface.h +6 -2
  129. package/cpp/skia/include/gpu/graphite/TextureInfo.h +36 -117
  130. package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +108 -6
  131. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +4 -1
  132. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +41 -25
  133. package/cpp/skia/include/gpu/graphite/precompile/PaintOptions.h +197 -0
  134. package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +48 -0
  135. package/cpp/skia/include/gpu/graphite/precompile/PrecompileBase.h +84 -0
  136. package/cpp/skia/include/gpu/graphite/precompile/PrecompileBlender.h +56 -0
  137. package/cpp/skia/include/gpu/graphite/precompile/PrecompileColorFilter.h +85 -0
  138. package/cpp/skia/include/gpu/graphite/precompile/PrecompileImageFilter.h +119 -0
  139. package/cpp/skia/include/gpu/graphite/precompile/PrecompileMaskFilter.h +51 -0
  140. package/cpp/skia/include/gpu/graphite/precompile/PrecompileRuntimeEffect.h +47 -0
  141. package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +170 -0
  142. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +24 -2
  143. package/cpp/skia/include/gpu/mock/GrMockTypes.h +2 -157
  144. package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +2 -0
  145. package/cpp/skia/include/gpu/vk/GrVkTypes.h +2 -101
  146. package/cpp/skia/include/gpu/vk/VulkanBackendContext.h +13 -8
  147. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +9 -3
  148. package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +4 -1
  149. package/cpp/skia/include/gpu/vk/VulkanTypes.h +25 -8
  150. package/cpp/skia/include/ports/SkFontMgr_Fontations.h +20 -0
  151. package/cpp/skia/include/ports/SkFontMgr_android.h +7 -0
  152. package/cpp/skia/include/ports/SkImageGeneratorCG.h +3 -1
  153. package/cpp/skia/include/ports/SkTypeface_win.h +0 -17
  154. package/cpp/skia/include/private/SkEncodedInfo.h +8 -2
  155. package/cpp/skia/include/private/SkExif.h +28 -75
  156. package/cpp/skia/include/private/SkGainmapInfo.h +47 -7
  157. package/cpp/skia/include/private/SkJpegMetadataDecoder.h +12 -0
  158. package/cpp/skia/include/private/SkPathRef.h +52 -44
  159. package/cpp/skia/include/private/SkXmp.h +13 -4
  160. package/cpp/skia/include/private/base/SkASAN.h +56 -0
  161. package/cpp/skia/include/private/base/SkAlign.h +5 -0
  162. package/cpp/skia/include/private/base/SkContainers.h +10 -2
  163. package/cpp/skia/include/private/base/SkFeatures.h +22 -1
  164. package/cpp/skia/include/private/base/SkFloatingPoint.h +51 -65
  165. package/cpp/skia/include/private/base/SkMacros.h +67 -0
  166. package/cpp/skia/include/private/base/SkMalloc.h +8 -0
  167. package/cpp/skia/include/private/base/SkPoint_impl.h +2 -11
  168. package/cpp/skia/include/private/base/SkTArray.h +108 -23
  169. package/cpp/skia/include/private/base/SkTFitsIn.h +1 -12
  170. package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +1 -1
  171. package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +0 -39
  172. package/cpp/skia/include/private/chromium/GrPromiseImageTexture.h +1 -1
  173. package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +3 -3
  174. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -4
  175. package/cpp/skia/include/private/chromium/Slug.h +5 -11
  176. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
  177. package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +2 -2
  178. package/cpp/skia/include/private/gpu/ganesh/GrTextureGenerator.h +1 -1
  179. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +21 -93
  180. package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +2 -2
  181. package/cpp/skia/include/utils/SkCustomTypeface.h +1 -0
  182. package/cpp/skia/include/utils/SkNWayCanvas.h +1 -1
  183. package/cpp/skia/include/utils/SkParse.h +0 -1
  184. package/cpp/skia/modules/skcms/src/Transform_inl.h +59 -56
  185. package/cpp/skia/modules/skcms/src/skcms_Transform.h +3 -0
  186. package/cpp/skia/modules/skcms/src/skcms_internals.h +2 -0
  187. package/cpp/skia/modules/skcms/src/skcms_public.h +46 -14
  188. package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +15 -1
  189. package/cpp/skia/modules/skparagraph/include/TextStyle.h +2 -2
  190. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +2 -4
  191. package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
  192. package/cpp/skia/modules/skshaper/include/SkShaper.h +316 -0
  193. package/cpp/skia/modules/skshaper/include/SkShaper_coretext.h +19 -0
  194. package/cpp/skia/modules/skshaper/include/SkShaper_factory.h +41 -0
  195. package/cpp/skia/modules/skshaper/include/SkShaper_harfbuzz.h +39 -0
  196. package/cpp/skia/modules/skshaper/include/SkShaper_skunicode.h +28 -0
  197. package/cpp/skia/modules/skunicode/include/SkUnicode.h +6 -23
  198. package/cpp/skia/modules/svg/include/SkSVGAttribute.h +0 -3
  199. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +12 -2
  200. package/cpp/skia/modules/svg/include/SkSVGCircle.h +13 -0
  201. package/cpp/skia/modules/svg/include/SkSVGClipPath.h +6 -0
  202. package/cpp/skia/modules/svg/include/SkSVGContainer.h +17 -1
  203. package/cpp/skia/modules/svg/include/SkSVGDOM.h +25 -15
  204. package/cpp/skia/modules/svg/include/SkSVGEllipse.h +13 -2
  205. package/cpp/skia/modules/svg/include/SkSVGFe.h +11 -2
  206. package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +9 -0
  207. package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +9 -0
  208. package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +82 -0
  209. package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +10 -1
  210. package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +10 -0
  211. package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +10 -0
  212. package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +9 -0
  213. package/cpp/skia/modules/svg/include/SkSVGFeImage.h +9 -0
  214. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +5 -0
  215. package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +11 -0
  216. package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +63 -0
  217. package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +8 -0
  218. package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +9 -0
  219. package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +9 -0
  220. package/cpp/skia/modules/svg/include/SkSVGFilter.h +9 -0
  221. package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +3 -3
  222. package/cpp/skia/modules/svg/include/SkSVGGradient.h +10 -2
  223. package/cpp/skia/modules/svg/include/SkSVGImage.h +9 -0
  224. package/cpp/skia/modules/svg/include/SkSVGLine.h +11 -0
  225. package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +10 -0
  226. package/cpp/skia/modules/svg/include/SkSVGMask.h +6 -0
  227. package/cpp/skia/modules/svg/include/SkSVGNode.h +13 -2
  228. package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +5 -0
  229. package/cpp/skia/modules/svg/include/SkSVGPath.h +10 -0
  230. package/cpp/skia/modules/svg/include/SkSVGPattern.h +5 -0
  231. package/cpp/skia/modules/svg/include/SkSVGPoly.h +11 -0
  232. package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +11 -0
  233. package/cpp/skia/modules/svg/include/SkSVGRect.h +11 -0
  234. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +43 -7
  235. package/cpp/skia/modules/svg/include/SkSVGSVG.h +7 -0
  236. package/cpp/skia/modules/svg/include/SkSVGShape.h +8 -2
  237. package/cpp/skia/modules/svg/include/SkSVGStop.h +5 -3
  238. package/cpp/skia/modules/svg/include/SkSVGText.h +8 -2
  239. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +8 -0
  240. package/cpp/skia/modules/svg/include/SkSVGTypes.h +9 -0
  241. package/cpp/skia/modules/svg/include/SkSVGUse.h +7 -0
  242. package/cpp/skia/src/base/SkMathPriv.h +337 -0
  243. package/cpp/skia/src/base/SkTLazy.h +208 -0
  244. package/cpp/skia/src/core/SkTHash.h +58 -7
  245. package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +3 -0
  246. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +3 -0
  247. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +7 -0
  248. package/ios/RNSkia-iOS/SkiaCVPixelBufferUtils.mm +7 -2
  249. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h +78 -0
  250. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +20 -4
  251. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  252. package/lib/commonjs/skia/types/Paragraph/TextStyle.d.ts +2 -2
  253. package/lib/commonjs/skia/types/Paragraph/TextStyle.js.map +1 -1
  254. package/lib/commonjs/skia/types/Skia.d.ts +6 -1
  255. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  256. package/lib/commonjs/skia/web/JsiSkia.js +4 -1
  257. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  258. package/lib/commonjs/web/WithSkiaWeb.d.ts +11 -4
  259. package/lib/commonjs/web/WithSkiaWeb.js +3 -2
  260. package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
  261. package/lib/module/renderer/HostConfig.js.map +1 -1
  262. package/lib/module/skia/types/Paragraph/TextStyle.d.ts +2 -2
  263. package/lib/module/skia/types/Paragraph/TextStyle.js.map +1 -1
  264. package/lib/module/skia/types/Skia.d.ts +6 -1
  265. package/lib/module/skia/types/Skia.js.map +1 -1
  266. package/lib/module/skia/web/JsiSkia.js +4 -1
  267. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  268. package/lib/module/web/WithSkiaWeb.d.ts +11 -4
  269. package/lib/module/web/WithSkiaWeb.js +3 -2
  270. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  271. package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +1 -0
  272. package/lib/typescript/lib/commonjs/web/WithSkiaWeb.d.ts +2 -1
  273. package/lib/typescript/lib/module/skia/Skia.web.d.ts +1 -0
  274. package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +1 -0
  275. package/lib/typescript/lib/module/web/WithSkiaWeb.d.ts +2 -1
  276. package/lib/typescript/src/skia/types/Paragraph/TextStyle.d.ts +2 -2
  277. package/lib/typescript/src/skia/types/Skia.d.ts +6 -1
  278. package/lib/typescript/src/web/WithSkiaWeb.d.ts +11 -4
  279. package/libs/android/arm64-v8a/libskia.a +0 -0
  280. package/libs/android/arm64-v8a/libskottie.a +0 -0
  281. package/libs/android/arm64-v8a/libskparagraph.a +0 -0
  282. package/libs/android/arm64-v8a/libsksg.a +0 -0
  283. package/libs/android/arm64-v8a/libskshaper.a +0 -0
  284. package/libs/android/arm64-v8a/libskunicode_core.a +0 -0
  285. package/libs/android/arm64-v8a/libskunicode_icu.a +0 -0
  286. package/libs/android/arm64-v8a/libsvg.a +0 -0
  287. package/libs/android/armeabi-v7a/libskia.a +0 -0
  288. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  289. package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
  290. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  291. package/libs/android/armeabi-v7a/libskshaper.a +0 -0
  292. package/libs/android/armeabi-v7a/libskunicode_core.a +0 -0
  293. package/libs/android/armeabi-v7a/libskunicode_icu.a +0 -0
  294. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  295. package/libs/android/x86/libskia.a +0 -0
  296. package/libs/android/x86/libskottie.a +0 -0
  297. package/libs/android/x86/libskparagraph.a +0 -0
  298. package/libs/android/x86/libsksg.a +0 -0
  299. package/libs/android/x86/libskshaper.a +0 -0
  300. package/libs/android/x86/libskunicode_core.a +0 -0
  301. package/libs/android/x86/libskunicode_icu.a +0 -0
  302. package/libs/android/x86/libsvg.a +0 -0
  303. package/libs/android/x86_64/libskia.a +0 -0
  304. package/libs/android/x86_64/libskottie.a +0 -0
  305. package/libs/android/x86_64/libskparagraph.a +0 -0
  306. package/libs/android/x86_64/libsksg.a +0 -0
  307. package/libs/android/x86_64/libskshaper.a +0 -0
  308. package/libs/android/x86_64/libskunicode_core.a +0 -0
  309. package/libs/android/x86_64/libskunicode_icu.a +0 -0
  310. package/libs/android/x86_64/libsvg.a +0 -0
  311. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  312. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  313. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  314. package/libs/ios/libskottie.xcframework/Info.plist +5 -5
  315. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  316. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  317. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  318. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  319. package/libs/ios/libsksg.xcframework/Info.plist +5 -5
  320. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  321. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  322. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  323. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  324. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  325. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  326. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  327. package/package.json +3 -5
  328. package/react-native-skia.podspec +2 -1
  329. package/src/renderer/HostConfig.ts +5 -1
  330. package/src/renderer/__tests__/e2e/ImageFilters.spec.tsx +5 -2
  331. package/src/renderer/__tests__/e2e/Paths.spec.tsx +12 -5
  332. package/src/renderer/__tests__/e2e/SDF.spec.tsx +1 -1
  333. package/src/renderer/__tests__/e2e/Snapshot.spec.tsx +1 -1
  334. package/src/skia/types/Paragraph/TextStyle.ts +2 -2
  335. package/src/skia/types/Skia.ts +7 -1
  336. package/src/skia/web/JsiSkia.ts +3 -0
  337. package/src/web/WithSkiaWeb.tsx +17 -6
  338. package/cpp/skia/include/core/SkDrawLooper.h +0 -135
  339. package/cpp/skia/include/effects/SkBlurDrawLooper.h +0 -26
  340. package/cpp/skia/include/effects/SkLayerDrawLooper.h +0 -161
  341. package/cpp/skia/include/gpu/gl/GrGLConfig_chrome.h +0 -14
  342. package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +0 -84
  343. package/cpp/skia/include/gpu/vk/GrVkExtensions.h +0 -15
  344. package/cpp/skia/include/gpu/vk/GrVkMemoryAllocator.h +0 -15
  345. package/cpp/skia/include/ports/SkFontMgr_indirect.h +0 -102
  346. package/cpp/skia/include/ports/SkRemotableFontMgr.h +0 -139
  347. package/cpp/skia/include/private/base/SkFloatBits.h +0 -90
  348. package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +0 -69
  349. package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +0 -54
  350. package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +0 -95
  351. package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +0 -83
  352. package/cpp/skia/src/core/SkPathEnums.h +0 -25
  353. package/cpp/skia/src/core/SkPathPriv.h +0 -540
  354. package/libs/android/arm64-v8a/libskunicode.a +0 -0
  355. package/libs/android/armeabi-v7a/libskunicode.a +0 -0
  356. package/libs/android/x86/libskunicode.a +0 -0
  357. package/libs/android/x86_64/libskunicode.a +0 -0
  358. package/libs/ios/libskunicode.xcframework/Info.plist +0 -46
  359. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  360. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  361. /package/cpp/skia/include/gpu/{gl → ganesh/gl}/glx/GrGLMakeGLXInterface.h +0 -0
@@ -1,307 +1,8 @@
1
-
2
1
  /*
3
2
  * Copyright 2012 Google Inc.
4
3
  *
5
4
  * Use of this source code is governed by a BSD-style license that can be
6
5
  * found in the LICENSE file.
7
6
  */
8
-
9
- #ifndef GrGLFunctions_DEFINED
10
- #define GrGLFunctions_DEFINED
11
-
12
- #include <cstring>
13
- #include "include/gpu/gl/GrGLTypes.h"
14
- #include "include/private/base/SkTLogic.h"
15
-
16
-
17
- extern "C" {
18
-
19
- ///////////////////////////////////////////////////////////////////////////////
20
-
21
- using GrGLActiveTextureFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum texture);
22
- using GrGLAttachShaderFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint shader);
23
- using GrGLBeginQueryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint id);
24
- using GrGLBindAttribLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint index, const char* name);
25
- using GrGLBindBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint buffer);
26
- using GrGLBindFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint framebuffer);
27
- using GrGLBindRenderbufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint renderbuffer);
28
- using GrGLBindTextureFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLuint texture);
29
- using GrGLBindFragDataLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint colorNumber, const GrGLchar* name);
30
- using GrGLBindFragDataLocationIndexedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLuint colorNumber, GrGLuint index, const GrGLchar* name);
31
- using GrGLBindSamplerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint unit, GrGLuint sampler);
32
- using GrGLBindVertexArrayFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint array);
33
- using GrGLBlendBarrierFn = GrGLvoid GR_GL_FUNCTION_TYPE();
34
- using GrGLBlendColorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
35
- using GrGLBlendEquationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
36
- using GrGLBlendFuncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum sfactor, GrGLenum dfactor);
37
- using GrGLBlitFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint srcX0, GrGLint srcY0, GrGLint srcX1, GrGLint srcY1, GrGLint dstX0, GrGLint dstY0, GrGLint dstX1, GrGLint dstY1, GrGLbitfield mask, GrGLenum filter);
38
- using GrGLBufferDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizeiptr size, const GrGLvoid* data, GrGLenum usage);
39
- using GrGLBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLintptr offset, GrGLsizeiptr size, const GrGLvoid* data);
40
- using GrGLCheckFramebufferStatusFn = GrGLenum GR_GL_FUNCTION_TYPE(GrGLenum target);
41
- using GrGLClearFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLbitfield mask);
42
- using GrGLClearColorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
43
- using GrGLClearStencilFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint s);
44
- using GrGLClearTexImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level, GrGLenum format, GrGLenum type, const GrGLvoid* data);
45
- using GrGLClearTexSubImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth, GrGLenum format, GrGLenum type, const GrGLvoid* data);
46
- using GrGLColorMaskFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLboolean red, GrGLboolean green, GrGLboolean blue, GrGLboolean alpha);
47
- using GrGLCompileShaderFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader);
48
- using GrGLCompressedTexImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLenum internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLsizei imageSize, const GrGLvoid* data);
49
- using GrGLCompressedTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLsizei imageSize, const GrGLvoid* data);
50
- using GrGLCopyBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum readTargt, GrGLenum writeTarget, GrGLintptr readOffset, GrGLintptr writeOffset, GrGLsizeiptr size);
51
- using GrGLCopyTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
52
- using GrGLCreateProgramFn = GrGLuint GR_GL_FUNCTION_TYPE();
53
- using GrGLCreateShaderFn = GrGLuint GR_GL_FUNCTION_TYPE(GrGLenum type);
54
- using GrGLCullFaceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
55
- using GrGLDeleteBuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* buffers);
56
- using GrGLDeleteFencesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* fences);
57
- using GrGLDeleteFramebuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* framebuffers);
58
- using GrGLDeleteProgramFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program);
59
- using GrGLDeleteQueriesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* ids);
60
- using GrGLDeleteRenderbuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* renderbuffers);
61
- using GrGLDeleteSamplersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei count, const GrGLuint* samplers);
62
- using GrGLDeleteShaderFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader);
63
- using GrGLDeleteTexturesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* textures);
64
- using GrGLDeleteVertexArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLuint* arrays);
65
- using GrGLDepthMaskFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLboolean flag);
66
- using GrGLDisableFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum cap);
67
- using GrGLDisableVertexAttribArrayFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint index);
68
- using GrGLDrawArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLint first, GrGLsizei count);
69
- using GrGLDrawArraysInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLint first, GrGLsizei count, GrGLsizei primcount);
70
- using GrGLDrawArraysIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, const GrGLvoid* indirect);
71
- using GrGLDrawBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
72
- using GrGLDrawBuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, const GrGLenum* bufs);
73
- using GrGLDrawElementsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
74
- using GrGLDrawElementsInstancedFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices, GrGLsizei primcount);
75
- using GrGLDrawElementsIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLenum type, const GrGLvoid* indirect);
76
- using GrGLDrawRangeElementsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLuint start, GrGLuint end, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
77
- using GrGLEnableFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum cap);
78
- using GrGLEnableVertexAttribArrayFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint index);
79
- using GrGLEndQueryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target);
80
- using GrGLFinishFn = GrGLvoid GR_GL_FUNCTION_TYPE();
81
- using GrGLFinishFenceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint fence);
82
- using GrGLFlushFn = GrGLvoid GR_GL_FUNCTION_TYPE();
83
- using GrGLFlushMappedBufferRangeFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length);
84
- using GrGLFramebufferRenderbufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum renderbuffertarget, GrGLuint renderbuffer);
85
- using GrGLFramebufferTexture2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level);
86
- using GrGLFramebufferTexture2DMultisampleFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level, GrGLsizei samples);
87
- using GrGLFrontFaceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode);
88
- using GrGLGenBuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* buffers);
89
- using GrGLGenFencesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* fences);
90
- using GrGLGenFramebuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* framebuffers);
91
- using GrGLGenerateMipmapFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target);
92
- using GrGLGenQueriesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* ids);
93
- using GrGLGenRenderbuffersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* renderbuffers);
94
- using GrGLGenSamplersFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei count, GrGLuint* samplers);
95
- using GrGLGenTexturesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* textures);
96
- using GrGLGenVertexArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint* arrays);
97
- using GrGLGetBufferParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint* params);
98
- using GrGLGetErrorFn = GrGLenum GR_GL_FUNCTION_TYPE();
99
- using GrGLGetFramebufferAttachmentParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum pname, GrGLint* params);
100
- using GrGLGetFloatvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLfloat* params);
101
- using GrGLGetIntegervFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint* params);
102
- using GrGLGetMultisamplefvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLuint index, GrGLfloat* val);
103
- using GrGLGetProgramBinaryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, GrGLenum* binaryFormat, void* binary);
104
- using GrGLGetProgramInfoLogFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
105
- using GrGLGetProgramivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum pname, GrGLint* params);
106
- using GrGLGetQueryivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum GLtarget, GrGLenum pname, GrGLint* params);
107
- using GrGLGetQueryObjecti64vFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLint64* params);
108
- using GrGLGetQueryObjectivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLint* params);
109
- using GrGLGetQueryObjectui64vFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLuint64* params);
110
- using GrGLGetQueryObjectuivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum pname, GrGLuint* params);
111
- using GrGLGetRenderbufferParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint* params);
112
- using GrGLGetShaderInfoLogFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
113
- using GrGLGetShaderivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLenum pname, GrGLint* params);
114
- using GrGLGetShaderPrecisionFormatFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum shadertype, GrGLenum precisiontype, GrGLint* range, GrGLint* precision);
115
- using GrGLGetStringFn = const GrGLubyte* GR_GL_FUNCTION_TYPE(GrGLenum name);
116
- using GrGLGetStringiFn = const GrGLubyte* GR_GL_FUNCTION_TYPE(GrGLenum name, GrGLuint index);
117
- using GrGLGetTexLevelParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLenum pname, GrGLint* params);
118
- using GrGLGetUniformLocationFn = GrGLint GR_GL_FUNCTION_TYPE(GrGLuint program, const char* name);
119
- using GrGLInsertEventMarkerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei length, const char* marker);
120
- using GrGLInvalidateBufferDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint buffer);
121
- using GrGLInvalidateBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr length);
122
- using GrGLInvalidateFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments);
123
- using GrGLInvalidateSubFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments, GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
124
- using GrGLInvalidateTexImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level);
125
- using GrGLInvalidateTexSubImageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth);
126
- using GrGLIsTextureFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLuint texture);
127
- using GrGLLineWidthFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLfloat width);
128
- using GrGLLinkProgramFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program);
129
- using GrGLMapBufferFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum access);
130
- using GrGLMapBufferRangeFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length, GrGLbitfield access);
131
- using GrGLMapBufferSubDataFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLuint target, GrGLintptr offset, GrGLsizeiptr size, GrGLenum access);
132
- using GrGLMapTexSubImage2DFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLenum access);
133
- using GrGLMemoryBarrierFn = GrGLvoid* GR_GL_FUNCTION_TYPE(GrGLbitfield barriers);
134
- using GrGLPatchParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint value);
135
- using GrGLPixelStoreiFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint param);
136
- using GrGLPolygonModeFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLenum mode);
137
- using GrGLPopGroupMarkerFn = GrGLvoid GR_GL_FUNCTION_TYPE();
138
- using GrGLProgramBinaryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum binaryFormat, void* binary, GrGLsizei length);
139
- using GrGLProgramParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLenum pname, GrGLint value);
140
- using GrGLPushGroupMarkerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei length, const char* marker);
141
- using GrGLQueryCounterFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint id, GrGLenum target);
142
- using GrGLReadBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum src);
143
- using GrGLReadPixelsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLvoid* pixels);
144
- using GrGLRenderbufferStorageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
145
- using GrGLRenderbufferStorageMultisampleFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei samples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
146
- using GrGLResolveMultisampleFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE();
147
- using GrGLSamplerParameterfFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, GrGLfloat param);
148
- using GrGLSamplerParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, GrGLint param);
149
- using GrGLSamplerParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, const GrGLint* params);
150
- using GrGLScissorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
151
- // GL_CHROMIUM_bind_uniform_location
152
- using GrGLBindUniformLocationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLint location, const char* name);
153
- using GrGLSetFenceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint fence, GrGLenum condition);
154
- using GrGLShaderSourceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint shader, GrGLsizei count, const char* const* str, const GrGLint* length);
155
- using GrGLStencilFuncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum func, GrGLint ref, GrGLuint mask);
156
- using GrGLStencilFuncSeparateFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLenum func, GrGLint ref, GrGLuint mask);
157
- using GrGLStencilMaskFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint mask);
158
- using GrGLStencilMaskSeparateFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLuint mask);
159
- using GrGLStencilOpFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
160
- using GrGLStencilOpSeparateFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum face, GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
161
- using GrGLTexBufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLuint buffer);
162
- using GrGLTexBufferRangeFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr size);
163
- using GrGLTexImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
164
- using GrGLTexParameterfFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLfloat param);
165
- using GrGLTexParameterfvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, const GrGLfloat* params);
166
- using GrGLTexParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint param);
167
- using GrGLTexParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, const GrGLint* params);
168
- using GrGLTexStorage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei levels, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
169
- using GrGLDiscardFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei numAttachments, const GrGLenum* attachments);
170
- using GrGLTestFenceFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLuint fence);
171
- using GrGLTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
172
- using GrGLTextureBarrierFn = GrGLvoid GR_GL_FUNCTION_TYPE();
173
- using GrGLUniform1fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0);
174
- using GrGLUniform1iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0);
175
- using GrGLUniform1fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
176
- using GrGLUniform1ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
177
- using GrGLUniform2fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0, GrGLfloat v1);
178
- using GrGLUniform2iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0, GrGLint v1);
179
- using GrGLUniform2fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
180
- using GrGLUniform2ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
181
- using GrGLUniform3fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2);
182
- using GrGLUniform3iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0, GrGLint v1, GrGLint v2);
183
- using GrGLUniform3fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
184
- using GrGLUniform3ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
185
- using GrGLUniform4fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2, GrGLfloat v3);
186
- using GrGLUniform4iFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLint v0, GrGLint v1, GrGLint v2, GrGLint v3);
187
- using GrGLUniform4fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLfloat* v);
188
- using GrGLUniform4ivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, const GrGLint* v);
189
- using GrGLUniformMatrix2fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
190
- using GrGLUniformMatrix3fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
191
- using GrGLUniformMatrix4fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
192
- using GrGLUnmapBufferFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLenum target);
193
- using GrGLUnmapBufferSubDataFn = GrGLvoid GR_GL_FUNCTION_TYPE(const GrGLvoid* mem);
194
- using GrGLUnmapTexSubImage2DFn = GrGLvoid GR_GL_FUNCTION_TYPE(const GrGLvoid* mem);
195
- using GrGLUseProgramFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program);
196
- using GrGLVertexAttrib1fFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat value);
197
- using GrGLVertexAttrib2fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat* values);
198
- using GrGLVertexAttrib3fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat* values);
199
- using GrGLVertexAttrib4fvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, const GrGLfloat* values);
200
- using GrGLVertexAttribDivisorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint index, GrGLuint divisor);
201
- using GrGLVertexAttribIPointerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* ptr);
202
- using GrGLVertexAttribPointerFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint indx, GrGLint size, GrGLenum type, GrGLboolean normalized, GrGLsizei stride, const GrGLvoid* ptr);
203
- using GrGLViewportFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
204
-
205
- /* GL_NV_framebuffer_mixed_samples */
206
- using GrGLCoverageModulationFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum components);
207
-
208
- /* EXT_base_instance */
209
- using GrGLDrawArraysInstancedBaseInstanceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLint first, GrGLsizei count, GrGLsizei instancecount, GrGLuint baseinstance);
210
- using GrGLDrawElementsInstancedBaseVertexBaseInstanceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, GrGLenum type, const void *indices, GrGLsizei instancecount, GrGLint basevertex, GrGLuint baseinstance);
211
-
212
- /* EXT_multi_draw_indirect */
213
- using GrGLMultiDrawArraysIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, const GrGLvoid* indirect, GrGLsizei drawcount, GrGLsizei stride);
214
- using GrGLMultiDrawElementsIndirectFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLenum type, const GrGLvoid* indirect, GrGLsizei drawcount, GrGLsizei stride);
215
-
216
- /* ANGLE_base_vertex_base_instance */
217
- using GrGLMultiDrawArraysInstancedBaseInstanceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, const GrGLint* firsts, const GrGLsizei* counts, const GrGLsizei* instanceCounts, const GrGLuint* baseInstances, const GrGLsizei drawcount);
218
- using GrGLMultiDrawElementsInstancedBaseVertexBaseInstanceFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, const GrGLint* counts, GrGLenum type, const GrGLvoid* const* indices, const GrGLsizei* instanceCounts, const GrGLint* baseVertices, const GrGLuint* baseInstances, const GrGLsizei drawcount);
219
-
220
- /* ARB_sync */
221
- using GrGLFenceSyncFn = GrGLsync GR_GL_FUNCTION_TYPE(GrGLenum condition, GrGLbitfield flags);
222
- using GrGLIsSyncFn = GrGLboolean GR_GL_FUNCTION_TYPE(GrGLsync sync);
223
- using GrGLClientWaitSyncFn = GrGLenum GR_GL_FUNCTION_TYPE(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout);
224
- using GrGLWaitSyncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout);
225
- using GrGLDeleteSyncFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsync sync);
226
-
227
- /* ARB_internalformat_query */
228
- using GrGLGetInternalformativFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLenum pname, GrGLsizei bufSize, GrGLint* params);
229
-
230
- /* KHR_debug */
231
- using GrGLDebugMessageControlFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum source, GrGLenum type, GrGLenum severity, GrGLsizei count, const GrGLuint* ids, GrGLboolean enabled);
232
- using GrGLDebugMessageInsertFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum source, GrGLenum type, GrGLuint id, GrGLenum severity, GrGLsizei length, const GrGLchar* buf);
233
- using GrGLDebugMessageCallbackFn = GrGLvoid GR_GL_FUNCTION_TYPE(GRGLDEBUGPROC callback, const GrGLvoid* userParam);
234
- using GrGLGetDebugMessageLogFn = GrGLuint GR_GL_FUNCTION_TYPE(GrGLuint count, GrGLsizei bufSize, GrGLenum* sources, GrGLenum* types, GrGLuint* ids, GrGLenum* severities, GrGLsizei* lengths, GrGLchar* messageLog);
235
- using GrGLPushDebugGroupFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum source, GrGLuint id, GrGLsizei length, const GrGLchar* message);
236
- using GrGLPopDebugGroupFn = GrGLvoid GR_GL_FUNCTION_TYPE();
237
- using GrGLObjectLabelFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum identifier, GrGLuint name, GrGLsizei length, const GrGLchar* label);
238
-
239
- /** EXT_window_rectangles */
240
- using GrGLWindowRectanglesFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum mode, GrGLsizei count, const GrGLint box[]);
241
-
242
- /** GL_QCOM_tiled_rendering */
243
- using GrGLStartTilingFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint x, GrGLuint y, GrGLuint width, GrGLuint height, GrGLbitfield preserveMask);
244
- using GrGLEndTilingFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLbitfield preserveMask);
245
-
246
- /** EGL functions */
247
- using GrEGLQueryStringFn = const char* GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLint name);
248
- using GrEGLGetCurrentDisplayFn = GrEGLDisplay GR_GL_FUNCTION_TYPE();
249
- using GrEGLCreateImageFn = GrEGLImage GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint* attrib_list);
250
- using GrEGLDestroyImageFn = GrEGLBoolean GR_GL_FUNCTION_TYPE(GrEGLDisplay dpy, GrEGLImage image);
251
- } // extern "C"
252
-
253
- // This is a lighter-weight std::function, trying to reduce code size and compile time
254
- // by only supporting the exact use cases we require.
255
- template <typename T> class GrGLFunction;
256
-
257
- template <typename R, typename... Args>
258
- class GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> {
259
- public:
260
- using Fn = R GR_GL_FUNCTION_TYPE(Args...);
261
- // Construct empty.
262
- GrGLFunction() = default;
263
- GrGLFunction(std::nullptr_t) {}
264
-
265
- // Construct from a simple function pointer.
266
- GrGLFunction(Fn* fn_ptr) {
267
- static_assert(sizeof(fn_ptr) <= sizeof(fBuf), "fBuf is too small");
268
- if (fn_ptr) {
269
- memcpy(fBuf, &fn_ptr, sizeof(fn_ptr));
270
- fCall = [](const void* buf, Args... args) {
271
- return (*(Fn* const *)buf)(std::forward<Args>(args)...);
272
- };
273
- }
274
- }
275
-
276
- // Construct from a small closure.
277
- template <typename Closure>
278
- GrGLFunction(Closure closure) : GrGLFunction() {
279
- static_assert(sizeof(Closure) <= sizeof(fBuf), "fBuf is too small");
280
- #if defined(__APPLE__) // I am having serious trouble getting these to work with all STLs...
281
- static_assert(std::is_trivially_copyable<Closure>::value, "");
282
- static_assert(std::is_trivially_destructible<Closure>::value, "");
283
- #endif
284
-
285
- memcpy(fBuf, &closure, sizeof(closure));
286
- fCall = [](const void* buf, Args... args) {
287
- auto closure = (const Closure*)buf;
288
- return (*closure)(args...);
289
- };
290
- }
291
-
292
- R operator()(Args... args) const {
293
- SkASSERT(fCall);
294
- return fCall(fBuf, std::forward<Args>(args)...);
295
- }
296
-
297
- explicit operator bool() const { return fCall != nullptr; }
298
-
299
- void reset() { fCall = nullptr; }
300
-
301
- private:
302
- using Call = R(const void* buf, Args...);
303
- Call* fCall = nullptr;
304
- size_t fBuf[4];
305
- };
306
-
307
- #endif
7
+ // TODO(kjlubick, egdaniel) Delete this after migrating clients.
8
+ #include "include/gpu/ganesh/gl/GrGLFunctions.h"
@@ -4,335 +4,5 @@
4
4
  * Use of this source code is governed by a BSD-style license that can be
5
5
  * found in the LICENSE file.
6
6
  */
7
-
8
- #ifndef GrGLInterface_DEFINED
9
- #define GrGLInterface_DEFINED
10
-
11
- #include "include/core/SkRefCnt.h"
12
- #include "include/gpu/gl/GrGLExtensions.h"
13
- #include "include/gpu/gl/GrGLFunctions.h"
14
-
15
- ////////////////////////////////////////////////////////////////////////////////
16
-
17
- typedef void(*GrGLFuncPtr)();
18
- struct GrGLInterface;
19
-
20
-
21
- #if !defined(SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE)
22
- /**
23
- * Rather than depend on platform-specific GL headers and libraries, we require
24
- * the client to provide a struct of GL function pointers. This struct can be
25
- * specified per-GrContext as a parameter to GrContext::MakeGL. If no interface is
26
- * passed to MakeGL then a default GL interface is created using GrGLMakeNativeInterface().
27
- * If this returns nullptr then GrContext::MakeGL() will fail.
28
- *
29
- * The implementation of GrGLMakeNativeInterface is platform-specific. Several
30
- * implementations have been provided (for GLX, WGL, EGL, etc), along with an
31
- * implementation that simply returns nullptr. Clients should select the most
32
- * appropriate one to build.
33
- */
34
- SK_API sk_sp<const GrGLInterface> GrGLMakeNativeInterface();
35
- #endif
36
-
37
- /**
38
- * GrContext uses the following interface to make all calls into OpenGL. When a
39
- * GrContext is created it is given a GrGLInterface. The interface's function
40
- * pointers must be valid for the OpenGL context associated with the GrContext.
41
- * On some platforms, such as Windows, function pointers for OpenGL extensions
42
- * may vary between OpenGL contexts. So the caller must be careful to use a
43
- * GrGLInterface initialized for the correct context. All functions that should
44
- * be available based on the OpenGL's version and extension string must be
45
- * non-NULL or GrContext creation will fail. This can be tested with the
46
- * validate() method when the OpenGL context has been made current.
47
- */
48
- struct SK_API GrGLInterface : public SkRefCnt {
49
- private:
50
- using INHERITED = SkRefCnt;
51
-
52
- #if GR_GL_CHECK_ERROR
53
- // This is here to avoid having our debug code that checks for a GL error after most GL calls
54
- // accidentally swallow an OOM that should be reported.
55
- mutable bool fOOMed = false;
56
- bool fSuppressErrorLogging = false;
57
- #endif
58
-
59
- public:
60
- GrGLInterface();
61
-
62
- // Validates that the GrGLInterface supports its advertised standard. This means the necessary
63
- // function pointers have been initialized for both the GL version and any advertised
64
- // extensions.
65
- bool validate() const;
66
-
67
- #if GR_GL_CHECK_ERROR
68
- GrGLenum checkError(const char* location, const char* call) const;
69
- bool checkAndResetOOMed() const;
70
- void suppressErrorLogging();
71
- #endif
72
-
73
- #if defined(GR_TEST_UTILS)
74
- GrGLInterface(const GrGLInterface& that)
75
- : fStandard(that.fStandard)
76
- , fExtensions(that.fExtensions)
77
- , fFunctions(that.fFunctions) {}
78
- #endif
79
-
80
- // Indicates the type of GL implementation
81
- GrGLStandard fStandard;
82
- GrGLExtensions fExtensions;
83
-
84
- bool hasExtension(const char ext[]) const { return fExtensions.has(ext); }
85
-
86
- /**
87
- * The function pointers are in a struct so that we can have a compiler generated assignment
88
- * operator.
89
- */
90
- struct Functions {
91
- GrGLFunction<GrGLActiveTextureFn> fActiveTexture;
92
- GrGLFunction<GrGLAttachShaderFn> fAttachShader;
93
- GrGLFunction<GrGLBeginQueryFn> fBeginQuery;
94
- GrGLFunction<GrGLBindAttribLocationFn> fBindAttribLocation;
95
- GrGLFunction<GrGLBindBufferFn> fBindBuffer;
96
- GrGLFunction<GrGLBindFragDataLocationFn> fBindFragDataLocation;
97
- GrGLFunction<GrGLBindFragDataLocationIndexedFn> fBindFragDataLocationIndexed;
98
- GrGLFunction<GrGLBindFramebufferFn> fBindFramebuffer;
99
- GrGLFunction<GrGLBindRenderbufferFn> fBindRenderbuffer;
100
- GrGLFunction<GrGLBindSamplerFn> fBindSampler;
101
- GrGLFunction<GrGLBindTextureFn> fBindTexture;
102
- GrGLFunction<GrGLBindVertexArrayFn> fBindVertexArray;
103
- GrGLFunction<GrGLBlendBarrierFn> fBlendBarrier;
104
- GrGLFunction<GrGLBlendColorFn> fBlendColor;
105
- GrGLFunction<GrGLBlendEquationFn> fBlendEquation;
106
- GrGLFunction<GrGLBlendFuncFn> fBlendFunc;
107
- GrGLFunction<GrGLBlitFramebufferFn> fBlitFramebuffer;
108
- GrGLFunction<GrGLBufferDataFn> fBufferData;
109
- GrGLFunction<GrGLBufferSubDataFn> fBufferSubData;
110
- GrGLFunction<GrGLCheckFramebufferStatusFn> fCheckFramebufferStatus;
111
- GrGLFunction<GrGLClearFn> fClear;
112
- GrGLFunction<GrGLClearColorFn> fClearColor;
113
- GrGLFunction<GrGLClearStencilFn> fClearStencil;
114
- GrGLFunction<GrGLClearTexImageFn> fClearTexImage;
115
- GrGLFunction<GrGLClearTexSubImageFn> fClearTexSubImage;
116
- GrGLFunction<GrGLColorMaskFn> fColorMask;
117
- GrGLFunction<GrGLCompileShaderFn> fCompileShader;
118
- GrGLFunction<GrGLCompressedTexImage2DFn> fCompressedTexImage2D;
119
- GrGLFunction<GrGLCompressedTexSubImage2DFn> fCompressedTexSubImage2D;
120
- GrGLFunction<GrGLCopyBufferSubDataFn> fCopyBufferSubData;
121
- GrGLFunction<GrGLCopyTexSubImage2DFn> fCopyTexSubImage2D;
122
- GrGLFunction<GrGLCreateProgramFn> fCreateProgram;
123
- GrGLFunction<GrGLCreateShaderFn> fCreateShader;
124
- GrGLFunction<GrGLCullFaceFn> fCullFace;
125
- GrGLFunction<GrGLDeleteBuffersFn> fDeleteBuffers;
126
- GrGLFunction<GrGLDeleteFencesFn> fDeleteFences;
127
- GrGLFunction<GrGLDeleteFramebuffersFn> fDeleteFramebuffers;
128
- GrGLFunction<GrGLDeleteProgramFn> fDeleteProgram;
129
- GrGLFunction<GrGLDeleteQueriesFn> fDeleteQueries;
130
- GrGLFunction<GrGLDeleteRenderbuffersFn> fDeleteRenderbuffers;
131
- GrGLFunction<GrGLDeleteSamplersFn> fDeleteSamplers;
132
- GrGLFunction<GrGLDeleteShaderFn> fDeleteShader;
133
- GrGLFunction<GrGLDeleteTexturesFn> fDeleteTextures;
134
- GrGLFunction<GrGLDeleteVertexArraysFn> fDeleteVertexArrays;
135
- GrGLFunction<GrGLDepthMaskFn> fDepthMask;
136
- GrGLFunction<GrGLDisableFn> fDisable;
137
- GrGLFunction<GrGLDisableVertexAttribArrayFn> fDisableVertexAttribArray;
138
- GrGLFunction<GrGLDrawArraysFn> fDrawArrays;
139
- GrGLFunction<GrGLDrawArraysIndirectFn> fDrawArraysIndirect;
140
- GrGLFunction<GrGLDrawArraysInstancedFn> fDrawArraysInstanced;
141
- GrGLFunction<GrGLDrawBufferFn> fDrawBuffer;
142
- GrGLFunction<GrGLDrawBuffersFn> fDrawBuffers;
143
- GrGLFunction<GrGLDrawElementsFn> fDrawElements;
144
- GrGLFunction<GrGLDrawElementsIndirectFn> fDrawElementsIndirect;
145
- GrGLFunction<GrGLDrawElementsInstancedFn> fDrawElementsInstanced;
146
- GrGLFunction<GrGLDrawRangeElementsFn> fDrawRangeElements;
147
- GrGLFunction<GrGLEnableFn> fEnable;
148
- GrGLFunction<GrGLEnableVertexAttribArrayFn> fEnableVertexAttribArray;
149
- GrGLFunction<GrGLEndQueryFn> fEndQuery;
150
- GrGLFunction<GrGLFinishFn> fFinish;
151
- GrGLFunction<GrGLFinishFenceFn> fFinishFence;
152
- GrGLFunction<GrGLFlushFn> fFlush;
153
- GrGLFunction<GrGLFlushMappedBufferRangeFn> fFlushMappedBufferRange;
154
- GrGLFunction<GrGLFramebufferRenderbufferFn> fFramebufferRenderbuffer;
155
- GrGLFunction<GrGLFramebufferTexture2DFn> fFramebufferTexture2D;
156
- GrGLFunction<GrGLFramebufferTexture2DMultisampleFn> fFramebufferTexture2DMultisample;
157
- GrGLFunction<GrGLFrontFaceFn> fFrontFace;
158
- GrGLFunction<GrGLGenBuffersFn> fGenBuffers;
159
- GrGLFunction<GrGLGenFencesFn> fGenFences;
160
- GrGLFunction<GrGLGenFramebuffersFn> fGenFramebuffers;
161
- GrGLFunction<GrGLGenerateMipmapFn> fGenerateMipmap;
162
- GrGLFunction<GrGLGenQueriesFn> fGenQueries;
163
- GrGLFunction<GrGLGenRenderbuffersFn> fGenRenderbuffers;
164
- GrGLFunction<GrGLGenSamplersFn> fGenSamplers;
165
- GrGLFunction<GrGLGenTexturesFn> fGenTextures;
166
- GrGLFunction<GrGLGenVertexArraysFn> fGenVertexArrays;
167
- GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv;
168
- GrGLFunction<GrGLGetErrorFn> fGetError;
169
- GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv;
170
- GrGLFunction<GrGLGetFloatvFn> fGetFloatv;
171
- GrGLFunction<GrGLGetIntegervFn> fGetIntegerv;
172
- GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv;
173
- GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary;
174
- GrGLFunction<GrGLGetProgramInfoLogFn> fGetProgramInfoLog;
175
- GrGLFunction<GrGLGetProgramivFn> fGetProgramiv;
176
- GrGLFunction<GrGLGetQueryObjecti64vFn> fGetQueryObjecti64v;
177
- GrGLFunction<GrGLGetQueryObjectivFn> fGetQueryObjectiv;
178
- GrGLFunction<GrGLGetQueryObjectui64vFn> fGetQueryObjectui64v;
179
- GrGLFunction<GrGLGetQueryObjectuivFn> fGetQueryObjectuiv;
180
- GrGLFunction<GrGLGetQueryivFn> fGetQueryiv;
181
- GrGLFunction<GrGLGetRenderbufferParameterivFn> fGetRenderbufferParameteriv;
182
- GrGLFunction<GrGLGetShaderInfoLogFn> fGetShaderInfoLog;
183
- GrGLFunction<GrGLGetShaderivFn> fGetShaderiv;
184
- GrGLFunction<GrGLGetShaderPrecisionFormatFn> fGetShaderPrecisionFormat;
185
- GrGLFunction<GrGLGetStringFn> fGetString;
186
- GrGLFunction<GrGLGetStringiFn> fGetStringi;
187
- GrGLFunction<GrGLGetTexLevelParameterivFn> fGetTexLevelParameteriv;
188
- GrGLFunction<GrGLGetUniformLocationFn> fGetUniformLocation;
189
- GrGLFunction<GrGLInsertEventMarkerFn> fInsertEventMarker;
190
- GrGLFunction<GrGLInvalidateBufferDataFn> fInvalidateBufferData;
191
- GrGLFunction<GrGLInvalidateBufferSubDataFn> fInvalidateBufferSubData;
192
- GrGLFunction<GrGLInvalidateFramebufferFn> fInvalidateFramebuffer;
193
- GrGLFunction<GrGLInvalidateSubFramebufferFn> fInvalidateSubFramebuffer;
194
- GrGLFunction<GrGLInvalidateTexImageFn> fInvalidateTexImage;
195
- GrGLFunction<GrGLInvalidateTexSubImageFn> fInvalidateTexSubImage;
196
- GrGLFunction<GrGLIsTextureFn> fIsTexture;
197
- GrGLFunction<GrGLLineWidthFn> fLineWidth;
198
- GrGLFunction<GrGLLinkProgramFn> fLinkProgram;
199
- GrGLFunction<GrGLProgramBinaryFn> fProgramBinary;
200
- GrGLFunction<GrGLProgramParameteriFn> fProgramParameteri;
201
- GrGLFunction<GrGLMapBufferFn> fMapBuffer;
202
- GrGLFunction<GrGLMapBufferRangeFn> fMapBufferRange;
203
- GrGLFunction<GrGLMapBufferSubDataFn> fMapBufferSubData;
204
- GrGLFunction<GrGLMapTexSubImage2DFn> fMapTexSubImage2D;
205
- GrGLFunction<GrGLMemoryBarrierFn> fMemoryBarrier;
206
- GrGLFunction<GrGLDrawArraysInstancedBaseInstanceFn> fDrawArraysInstancedBaseInstance;
207
- GrGLFunction<GrGLDrawElementsInstancedBaseVertexBaseInstanceFn> fDrawElementsInstancedBaseVertexBaseInstance;
208
- GrGLFunction<GrGLMultiDrawArraysIndirectFn> fMultiDrawArraysIndirect;
209
- GrGLFunction<GrGLMultiDrawElementsIndirectFn> fMultiDrawElementsIndirect;
210
- GrGLFunction<GrGLMultiDrawArraysInstancedBaseInstanceFn> fMultiDrawArraysInstancedBaseInstance;
211
- GrGLFunction<GrGLMultiDrawElementsInstancedBaseVertexBaseInstanceFn> fMultiDrawElementsInstancedBaseVertexBaseInstance;
212
- GrGLFunction<GrGLPatchParameteriFn> fPatchParameteri;
213
- GrGLFunction<GrGLPixelStoreiFn> fPixelStorei;
214
- GrGLFunction<GrGLPolygonModeFn> fPolygonMode;
215
- GrGLFunction<GrGLPopGroupMarkerFn> fPopGroupMarker;
216
- GrGLFunction<GrGLPushGroupMarkerFn> fPushGroupMarker;
217
- GrGLFunction<GrGLQueryCounterFn> fQueryCounter;
218
- GrGLFunction<GrGLReadBufferFn> fReadBuffer;
219
- GrGLFunction<GrGLReadPixelsFn> fReadPixels;
220
- GrGLFunction<GrGLRenderbufferStorageFn> fRenderbufferStorage;
221
-
222
- // On OpenGL ES there are multiple incompatible extensions that add support for MSAA
223
- // and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
224
- // older extensions for performance reasons or due to ES3 driver bugs. We want the function
225
- // that creates the GrGLInterface to provide all available functions and internally
226
- // we will select among them. They all have a method called glRenderbufferStorageMultisample*.
227
- // So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture,
228
- // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample
229
- // variations.
230
- //
231
- // If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will
232
- // assume the function pointers for the standard (or equivalent GL_ARB) version have
233
- // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced
234
- // functionality.
235
-
236
- // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
237
- GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2EXT;
238
- // GL_APPLE_framebuffer_multisample
239
- GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2APPLE;
240
-
241
- // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
242
- // the standard function in ES3+ or GL 3.0+.
243
- GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisample;
244
-
245
- // Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
246
- GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation;
247
-
248
- GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer;
249
- GrGLFunction<GrGLSamplerParameterfFn> fSamplerParameterf;
250
- GrGLFunction<GrGLSamplerParameteriFn> fSamplerParameteri;
251
- GrGLFunction<GrGLSamplerParameterivFn> fSamplerParameteriv;
252
- GrGLFunction<GrGLScissorFn> fScissor;
253
- GrGLFunction<GrGLSetFenceFn> fSetFence;
254
- GrGLFunction<GrGLShaderSourceFn> fShaderSource;
255
- GrGLFunction<GrGLStencilFuncFn> fStencilFunc;
256
- GrGLFunction<GrGLStencilFuncSeparateFn> fStencilFuncSeparate;
257
- GrGLFunction<GrGLStencilMaskFn> fStencilMask;
258
- GrGLFunction<GrGLStencilMaskSeparateFn> fStencilMaskSeparate;
259
- GrGLFunction<GrGLStencilOpFn> fStencilOp;
260
- GrGLFunction<GrGLStencilOpSeparateFn> fStencilOpSeparate;
261
- GrGLFunction<GrGLTestFenceFn> fTestFence;
262
- GrGLFunction<GrGLTexBufferFn> fTexBuffer;
263
- GrGLFunction<GrGLTexBufferRangeFn> fTexBufferRange;
264
- GrGLFunction<GrGLTexImage2DFn> fTexImage2D;
265
- GrGLFunction<GrGLTexParameterfFn> fTexParameterf;
266
- GrGLFunction<GrGLTexParameterfvFn> fTexParameterfv;
267
- GrGLFunction<GrGLTexParameteriFn> fTexParameteri;
268
- GrGLFunction<GrGLTexParameterivFn> fTexParameteriv;
269
- GrGLFunction<GrGLTexSubImage2DFn> fTexSubImage2D;
270
- GrGLFunction<GrGLTexStorage2DFn> fTexStorage2D;
271
- GrGLFunction<GrGLTextureBarrierFn> fTextureBarrier;
272
- GrGLFunction<GrGLDiscardFramebufferFn> fDiscardFramebuffer;
273
- GrGLFunction<GrGLUniform1fFn> fUniform1f;
274
- GrGLFunction<GrGLUniform1iFn> fUniform1i;
275
- GrGLFunction<GrGLUniform1fvFn> fUniform1fv;
276
- GrGLFunction<GrGLUniform1ivFn> fUniform1iv;
277
- GrGLFunction<GrGLUniform2fFn> fUniform2f;
278
- GrGLFunction<GrGLUniform2iFn> fUniform2i;
279
- GrGLFunction<GrGLUniform2fvFn> fUniform2fv;
280
- GrGLFunction<GrGLUniform2ivFn> fUniform2iv;
281
- GrGLFunction<GrGLUniform3fFn> fUniform3f;
282
- GrGLFunction<GrGLUniform3iFn> fUniform3i;
283
- GrGLFunction<GrGLUniform3fvFn> fUniform3fv;
284
- GrGLFunction<GrGLUniform3ivFn> fUniform3iv;
285
- GrGLFunction<GrGLUniform4fFn> fUniform4f;
286
- GrGLFunction<GrGLUniform4iFn> fUniform4i;
287
- GrGLFunction<GrGLUniform4fvFn> fUniform4fv;
288
- GrGLFunction<GrGLUniform4ivFn> fUniform4iv;
289
- GrGLFunction<GrGLUniformMatrix2fvFn> fUniformMatrix2fv;
290
- GrGLFunction<GrGLUniformMatrix3fvFn> fUniformMatrix3fv;
291
- GrGLFunction<GrGLUniformMatrix4fvFn> fUniformMatrix4fv;
292
- GrGLFunction<GrGLUnmapBufferFn> fUnmapBuffer;
293
- GrGLFunction<GrGLUnmapBufferSubDataFn> fUnmapBufferSubData;
294
- GrGLFunction<GrGLUnmapTexSubImage2DFn> fUnmapTexSubImage2D;
295
- GrGLFunction<GrGLUseProgramFn> fUseProgram;
296
- GrGLFunction<GrGLVertexAttrib1fFn> fVertexAttrib1f;
297
- GrGLFunction<GrGLVertexAttrib2fvFn> fVertexAttrib2fv;
298
- GrGLFunction<GrGLVertexAttrib3fvFn> fVertexAttrib3fv;
299
- GrGLFunction<GrGLVertexAttrib4fvFn> fVertexAttrib4fv;
300
- GrGLFunction<GrGLVertexAttribDivisorFn> fVertexAttribDivisor;
301
- GrGLFunction<GrGLVertexAttribIPointerFn> fVertexAttribIPointer;
302
- GrGLFunction<GrGLVertexAttribPointerFn> fVertexAttribPointer;
303
- GrGLFunction<GrGLViewportFn> fViewport;
304
-
305
- /* ARB_sync */
306
- GrGLFunction<GrGLFenceSyncFn> fFenceSync;
307
- GrGLFunction<GrGLIsSyncFn> fIsSync;
308
- GrGLFunction<GrGLClientWaitSyncFn> fClientWaitSync;
309
- GrGLFunction<GrGLWaitSyncFn> fWaitSync;
310
- GrGLFunction<GrGLDeleteSyncFn> fDeleteSync;
311
-
312
- /* ARB_internalforamt_query */
313
- GrGLFunction<GrGLGetInternalformativFn> fGetInternalformativ;
314
-
315
- /* KHR_debug */
316
- GrGLFunction<GrGLDebugMessageControlFn> fDebugMessageControl;
317
- GrGLFunction<GrGLDebugMessageInsertFn> fDebugMessageInsert;
318
- GrGLFunction<GrGLDebugMessageCallbackFn> fDebugMessageCallback;
319
- GrGLFunction<GrGLGetDebugMessageLogFn> fGetDebugMessageLog;
320
- GrGLFunction<GrGLPushDebugGroupFn> fPushDebugGroup;
321
- GrGLFunction<GrGLPopDebugGroupFn> fPopDebugGroup;
322
- GrGLFunction<GrGLObjectLabelFn> fObjectLabel;
323
-
324
- /* EXT_window_rectangles */
325
- GrGLFunction<GrGLWindowRectanglesFn> fWindowRectangles;
326
-
327
- /* GL_QCOM_tiled_rendering */
328
- GrGLFunction<GrGLStartTilingFn> fStartTiling;
329
- GrGLFunction<GrGLEndTilingFn> fEndTiling;
330
- } fFunctions;
331
-
332
- #if defined(GR_TEST_UTILS)
333
- // This exists for internal testing.
334
- virtual void abandon() const;
335
- #endif
336
- };
337
-
338
- #endif
7
+ // TODO(kjlubick, egdaniel) Delete this after migrating clients.
8
+ #include "include/gpu/ganesh/gl/GrGLInterface.h"