react-native-tgfx 0.0.0 → 0.0.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +141 -0
- package/NitroTgfx.podspec +69 -0
- package/README.md +147 -2
- package/android/CMakeLists.txt +122 -0
- package/android/build.gradle +172 -0
- package/android/consumer-rules.pro +7 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/TgfxAndroid.cpp +347 -0
- package/android/src/main/cpp/cpp-adapter.cpp +11 -0
- package/android/src/main/java/com/margelo/nitro/tgfx/HybridTgfxView.kt +139 -0
- package/android/src/main/java/com/margelo/nitro/tgfx/NitroTgfxPackage.kt +24 -0
- package/android/src/main/java/com/margelo/nitro/tgfx/TgfxNative.kt +49 -0
- package/android/src/main/java/com/margelo/nitro/tgfx/TgfxRenderTarget.kt +158 -0
- package/android/src/main/java/com/margelo/nitro/tgfx/TgfxSurfaceView.kt +43 -0
- package/android/src/main/java/com/margelo/nitro/tgfx/TgfxTextureView.kt +37 -0
- package/cpp/Base64.hpp +49 -0
- package/cpp/FontRegistry.cpp +379 -0
- package/cpp/FontRegistry.hpp +80 -0
- package/cpp/HybridTgfxFonts.cpp +135 -0
- package/cpp/HybridTgfxFonts.hpp +29 -0
- package/cpp/HybridTgfxImage.hpp +54 -0
- package/cpp/HybridTgfxImageFactory.cpp +126 -0
- package/cpp/HybridTgfxImageFactory.hpp +27 -0
- package/cpp/HybridTgfxSlotsFactory.hpp +37 -0
- package/cpp/IdleGate.hpp +46 -0
- package/cpp/ImageRegistry.cpp +306 -0
- package/cpp/ImageRegistry.hpp +120 -0
- package/cpp/Log.hpp +18 -0
- package/cpp/SceneHash.hpp +55 -0
- package/cpp/SceneStrings.hpp +45 -0
- package/cpp/Snapshot.hpp +110 -0
- package/cpp/SvgPath.cpp +315 -0
- package/cpp/SvgPath.hpp +13 -0
- package/cpp/TextLayout.cpp +568 -0
- package/cpp/TextLayout.hpp +102 -0
- package/cpp/TgfxFrameSink.cpp +46 -0
- package/cpp/TgfxFrameSink.hpp +29 -0
- package/cpp/TgfxRenderer.cpp +439 -0
- package/cpp/TgfxRenderer.hpp +125 -0
- package/cpp/TgfxScene.cpp +1119 -0
- package/cpp/TgfxScene.hpp +207 -0
- package/cpp/Trace.hpp +26 -0
- package/cpp/third_party/tgfx/CMakeLists.txt +909 -0
- package/cpp/third_party/tgfx/DEPS +123 -0
- package/cpp/third_party/tgfx/LICENSE.txt +825 -0
- package/cpp/third_party/tgfx/README.md +488 -0
- package/cpp/third_party/tgfx/android/.idea/fileTemplates/includes/TGFX File Header.h +17 -0
- package/cpp/third_party/tgfx/android/.idea/misc.xml +14 -0
- package/cpp/third_party/tgfx/android/app/CMakeLists.txt +25 -0
- package/cpp/third_party/tgfx/android/app/build.gradle.kts +84 -0
- package/cpp/third_party/tgfx/android/app/proguard-rules.pro +21 -0
- package/cpp/third_party/tgfx/android/app/src/androidTest/java/org/tgfx/hello/ExampleInstrumentedTest.kt +24 -0
- package/cpp/third_party/tgfx/android/app/src/main/AndroidManifest.xml +24 -0
- package/cpp/third_party/tgfx/android/app/src/main/cpp/JNIHelper.cpp +29 -0
- package/cpp/third_party/tgfx/android/app/src/main/cpp/JTGFXView.cpp +251 -0
- package/cpp/third_party/tgfx/android/app/src/main/cpp/JTGFXView.h +66 -0
- package/cpp/third_party/tgfx/android/app/src/main/ic_launcher-playstore.png +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/java/org/tgfx/hello2d/MainActivity.kt +100 -0
- package/cpp/third_party/tgfx/android/app/src/main/java/org/tgfx/hello2d/TGFXView.kt +176 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/drawable/ic_launcher_background.xml +74 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/values/colors.xml +10 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/values/strings.xml +3 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/values/themes.xml +5 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/xml/backup_rules.xml +13 -0
- package/cpp/third_party/tgfx/android/app/src/main/res/xml/data_extraction_rules.xml +19 -0
- package/cpp/third_party/tgfx/android/app/src/test/java/io/pag/tgfxdemo/ExampleUnitTest.kt +17 -0
- package/cpp/third_party/tgfx/android/build.gradle.kts +5 -0
- package/cpp/third_party/tgfx/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/cpp/third_party/tgfx/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/cpp/third_party/tgfx/android/gradle.properties +24 -0
- package/cpp/third_party/tgfx/android/gradlew +252 -0
- package/cpp/third_party/tgfx/android/gradlew.bat +94 -0
- package/cpp/third_party/tgfx/android/settings.gradle.kts +17 -0
- package/cpp/third_party/tgfx/include/tgfx/core/AlphaType.h +43 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Bitmap.h +249 -0
- package/cpp/third_party/tgfx/include/tgfx/core/BlendMode.h +148 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Brush.h +92 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Buffer.h +144 -0
- package/cpp/third_party/tgfx/include/tgfx/core/BytesKey.h +117 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Canvas.h +557 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Clock.h +72 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Color.h +232 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ColorFilter.h +137 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ColorSpace.h +491 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ColorType.h +72 -0
- package/cpp/third_party/tgfx/include/tgfx/core/CustomTypeface.h +174 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Data.h +118 -0
- package/cpp/third_party/tgfx/include/tgfx/core/DataView.h +260 -0
- package/cpp/third_party/tgfx/include/tgfx/core/EncodedFormat.h +28 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Font.h +176 -0
- package/cpp/third_party/tgfx/include/tgfx/core/FontMetrics.h +69 -0
- package/cpp/third_party/tgfx/include/tgfx/core/FontStyle.h +125 -0
- package/cpp/third_party/tgfx/include/tgfx/core/GlyphRun.h +91 -0
- package/cpp/third_party/tgfx/include/tgfx/core/GradientType.h +52 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Image.h +387 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ImageBuffer.h +129 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ImageCodec.h +136 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ImageFilter.h +196 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ImageGenerator.h +100 -0
- package/cpp/third_party/tgfx/include/tgfx/core/ImageInfo.h +215 -0
- package/cpp/third_party/tgfx/include/tgfx/core/MapDirection.h +39 -0
- package/cpp/third_party/tgfx/include/tgfx/core/MaskFilter.h +67 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Matrix.h +1025 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Matrix3D.h +395 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Mesh.h +93 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Orientation.h +74 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Paint.h +266 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Path.h +500 -0
- package/cpp/third_party/tgfx/include/tgfx/core/PathEffect.h +79 -0
- package/cpp/third_party/tgfx/include/tgfx/core/PathMeasure.h +70 -0
- package/cpp/third_party/tgfx/include/tgfx/core/PathProvider.h +57 -0
- package/cpp/third_party/tgfx/include/tgfx/core/PathTypes.h +124 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Picture.h +115 -0
- package/cpp/third_party/tgfx/include/tgfx/core/PictureRecorder.h +59 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Pixmap.h +226 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Point.h +199 -0
- package/cpp/third_party/tgfx/include/tgfx/core/RRect.h +182 -0
- package/cpp/third_party/tgfx/include/tgfx/core/RSXform.h +118 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Rect.h +504 -0
- package/cpp/third_party/tgfx/include/tgfx/core/RenderFlags.h +41 -0
- package/cpp/third_party/tgfx/include/tgfx/core/SamplingOptions.h +50 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Shader.h +272 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Shape.h +210 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Size.h +204 -0
- package/cpp/third_party/tgfx/include/tgfx/core/SrcRectConstraint.h +37 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Stream.h +109 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Stroke.h +118 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Surface.h +227 -0
- package/cpp/third_party/tgfx/include/tgfx/core/SurfaceReadback.h +93 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Task.h +152 -0
- package/cpp/third_party/tgfx/include/tgfx/core/TextBlob.h +162 -0
- package/cpp/third_party/tgfx/include/tgfx/core/TextBlobBuilder.h +141 -0
- package/cpp/third_party/tgfx/include/tgfx/core/TileMode.h +47 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Typeface.h +203 -0
- package/cpp/third_party/tgfx/include/tgfx/core/UTF.h +52 -0
- package/cpp/third_party/tgfx/include/tgfx/core/Vec.h +525 -0
- package/cpp/third_party/tgfx/include/tgfx/core/WriteStream.h +146 -0
- package/cpp/third_party/tgfx/include/tgfx/core/YUVColorSpace.h +62 -0
- package/cpp/third_party/tgfx/include/tgfx/core/YUVData.h +92 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Attribute.h +90 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Backend.h +352 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/BlendFactor.h +101 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/BlendOperation.h +57 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/ColorWriteMask.h +54 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/CommandBuffer.h +31 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/CommandEncoder.h +100 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/CommandQueue.h +105 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/CompareFunction.h +67 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Context.h +222 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Device.h +79 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/FilterMode.h +36 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/GPU.h +162 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/GPUBuffer.h +122 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/GPUFeatures.h +51 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/GPUInfo.h +56 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/GPULimits.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/ImageOrigin.h +41 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/MipmapMode.h +39 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/PixelFormat.h +61 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Recording.h +44 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/RenderPass.h +363 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/RenderPipeline.h +440 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/RuntimeEffect.h +74 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Sampler.h +108 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Semaphore.h +37 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/ShaderModule.h +50 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/ShaderStage.h +36 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/ShaderVisibility.h +46 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/StencilOperation.h +74 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Texture.h +183 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/Window.h +75 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/metal/MetalDevice.h +56 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/metal/MetalTypes.h +53 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/metal/MetalWindow.h +66 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/GLDevice.h +78 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/GLTypes.h +64 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/cgl/CGLDevice.h +57 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/cgl/CGLWindow.h +45 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/eagl/EAGLDevice.h +63 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/eagl/EAGLWindow.h +47 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/egl/EGLDevice.h +89 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/egl/EGLGlobals.h +53 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/egl/EGLWindow.h +59 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/qt/QGLDevice.h +88 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/qt/QGLWindow.h +92 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/webgl/WebGLDevice.h +54 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/webgl/WebGLWindow.h +42 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/wgl/WGLDevice.h +62 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/opengl/wgl/WGLWindow.h +43 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/vulkan/VulkanDevice.h +62 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/vulkan/VulkanTypes.h +69 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/vulkan/VulkanWindow.h +103 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/webgpu/WebGPUDevice.h +60 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/webgpu/WebGPUTypes.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/gpu/webgpu/WebGPUWindow.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/DisplayList.h +407 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/ImageLayer.h +74 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/Layer.h +789 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/LayerMaskType.h +39 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/LayerPaint.h +119 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/LayerProperty.h +66 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/LayerRecorder.h +143 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/LayerType.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/MeshLayer.h +95 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/ShapeLayer.h +265 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/ShapeStyle.h +92 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/SolidLayer.h +114 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/StrokeAlign.h +39 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/TextAlign.h +47 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/TextLayer.h +166 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/VectorLayer.h +72 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/BlendFilter.h +76 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/BlurFilter.h +90 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/ColorMatrixFilter.h +79 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/DropShadowFilter.h +132 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/InnerShadowFilter.h +133 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/LayerFilter.h +101 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/LayerImageFilter.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/filters/NoiseFilter.h +285 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/BackgroundBlurStyle.h +106 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/DropShadowStyle.h +165 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/GlassStyle.h +168 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/InnerShadowStyle.h +149 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/LayerStyle.h +166 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/LayerStyleInput.h +139 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/NoiseStyle.h +241 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/layerstyles/StyledShape.h +84 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/ColorSource.h +64 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/Ellipse.h +91 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/FillStyle.h +135 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/Gradient.h +418 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/ImagePattern.h +160 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/MergePath.h +87 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/Polystar.h +182 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/Rectangle.h +118 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/Repeater.h +184 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/RoundCorner.h +65 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/ScaleMode.h +54 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/ShapePath.h +91 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/SolidColor.h +71 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/StrokeStyle.h +216 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/Text.h +97 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/TextModifier.h +215 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/TextPath.h +165 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/TextSelector.h +289 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/TrimPath.h +117 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/VectorElement.h +81 -0
- package/cpp/third_party/tgfx/include/tgfx/layers/vectors/VectorGroup.h +171 -0
- package/cpp/third_party/tgfx/include/tgfx/pdf/PDFDocument.h +75 -0
- package/cpp/third_party/tgfx/include/tgfx/pdf/PDFMetadata.h +252 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/HardwareBuffer.h +158 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/ImageReader.h +92 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/NativeImage.h +53 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/Print.h +31 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/android/AndroidBitmap.h +56 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/android/Global.h +82 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/android/HardwareBufferJNI.h +37 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/android/JNIEnvironment.h +67 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/android/SurfaceTextureReader.h +58 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/apple/CTTypeface.h +43 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/ohos/OHOSPixelMap.h +42 -0
- package/cpp/third_party/tgfx/include/tgfx/platform/web/VideoElementReader.h +40 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGAttribute.h +122 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGCustomParser.h +42 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGCustomWriter.h +59 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGDOM.h +108 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGExporter.h +150 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGLengthContext.h +109 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGPathParser.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGTypes.h +939 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/SVGValue.h +95 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/TextShaper.h +53 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGCircle.h +65 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGClipPath.h +51 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGContainer.h +61 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGDefs.h +39 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGEllipse.h +63 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFe.h +104 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeBlend.h +64 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeColorMatrix.h +67 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeComponentTransfer.h +95 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeComposite.h +61 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeDisplacementMap.h +70 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeFlood.h +56 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeGaussianBlur.h +62 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeImage.h +58 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeLightSource.h +105 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeLighting.h +100 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeMerge.h +71 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeMorphology.h +65 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeOffset.h +58 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFeTurbulence.h +59 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGFilter.h +64 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGGradient.h +61 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGGroup.h +37 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGHiddenContainer.h +37 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGImage.h +75 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGLine.h +63 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGLinearGradient.h +53 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGMask.h +60 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGNode.h +302 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGPath.h +56 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGPattern.h +68 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGPoly.h +64 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGRadialGradient.h +55 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGRect.h +67 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGRoot.h +69 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGShape.h +54 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGStop.h +47 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGText.h +158 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGTransformableNode.h +58 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/node/SVGUse.h +61 -0
- package/cpp/third_party/tgfx/include/tgfx/svg/xml/XMLDOM.h +115 -0
- package/cpp/third_party/tgfx/ios/gen_ios +18 -0
- package/cpp/third_party/tgfx/ios/gen_simulator +18 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/AppDelegate.h +23 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/AppDelegate.m +52 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/tgfx.png +0 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Assets.xcassets/Contents.json +6 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Base.lproj/LaunchScreen.storyboard +25 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Base.lproj/Main.storyboard +48 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/Info.plist +25 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/SceneDelegate.h +25 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/SceneDelegate.m +66 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/TGFXView.h +31 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/TGFXView.mm +187 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/ViewController.h +23 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/ViewController.mm +165 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D/main.m +29 -0
- package/cpp/third_party/tgfx/ios/metal/Hello2D.xcodeproj/project.pbxproj +441 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/AppDelegate.h +23 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/AppDelegate.m +52 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/tgfx.png +0 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Assets.xcassets/Contents.json +6 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Base.lproj/LaunchScreen.storyboard +25 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Base.lproj/Main.storyboard +48 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/Info.plist +25 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/SceneDelegate.h +25 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/SceneDelegate.m +66 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/TGFXView.h +31 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/TGFXView.mm +181 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/ViewController.h +23 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/ViewController.mm +165 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D/main.m +29 -0
- package/cpp/third_party/tgfx/ios/opengl/Hello2D.xcodeproj/project.pbxproj +442 -0
- package/cpp/third_party/tgfx/mac/gen_mac +18 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/AppDelegate.h +23 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/AppDelegate.m +35 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/1024.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/128.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/16.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/256.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/32.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/512.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/64.png +0 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Assets.xcassets/Contents.json +6 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Base.lproj/Main.storyboard +718 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Hello2D.entitlements +10 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/Info.plist +36 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/TGFXView.h +37 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/TGFXView.mm +251 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/ViewController.h +23 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/ViewController.mm +60 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/WindowController.h +27 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/WindowController.mm +35 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D/main.m +26 -0
- package/cpp/third_party/tgfx/mac/metal/Hello2D.xcodeproj/project.pbxproj +405 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/AppDelegate.h +23 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/AppDelegate.m +35 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/1024.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/128.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/16.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/256.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/32.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/512.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/64.png +0 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Assets.xcassets/Contents.json +6 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Base.lproj/Main.storyboard +718 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Hello2D.entitlements +10 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/Info.plist +36 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/TGFXView.h +39 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/TGFXView.mm +316 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/ViewController.h +23 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/ViewController.mm +61 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/WindowController.h +27 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/WindowController.mm +35 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D/main.m +26 -0
- package/cpp/third_party/tgfx/mac/opengl/Hello2D.xcodeproj/project.pbxproj +402 -0
- package/cpp/third_party/tgfx/src/core/AdaptiveDashEffect.cpp +245 -0
- package/cpp/third_party/tgfx/src/core/AdaptiveDashEffect.h +37 -0
- package/cpp/third_party/tgfx/src/core/AdvancedTypefaceInfo.h +86 -0
- package/cpp/third_party/tgfx/src/core/Atlas.cpp +262 -0
- package/cpp/third_party/tgfx/src/core/Atlas.h +95 -0
- package/cpp/third_party/tgfx/src/core/AtlasManager.cpp +99 -0
- package/cpp/third_party/tgfx/src/core/AtlasManager.h +60 -0
- package/cpp/third_party/tgfx/src/core/AtlasStrikeCache.cpp +108 -0
- package/cpp/third_party/tgfx/src/core/AtlasStrikeCache.h +99 -0
- package/cpp/third_party/tgfx/src/core/AtlasTypes.cpp +82 -0
- package/cpp/third_party/tgfx/src/core/AtlasTypes.h +279 -0
- package/cpp/third_party/tgfx/src/core/Bitmap.cpp +131 -0
- package/cpp/third_party/tgfx/src/core/BoxFilterDownsample.cpp +449 -0
- package/cpp/third_party/tgfx/src/core/BoxFilterDownsample.h +49 -0
- package/cpp/third_party/tgfx/src/core/BoxFilterDownsampleSIMD.cpp +416 -0
- package/cpp/third_party/tgfx/src/core/BoxFilterDownsampleSIMD.h +40 -0
- package/cpp/third_party/tgfx/src/core/Brush.cpp +76 -0
- package/cpp/third_party/tgfx/src/core/Canvas.cpp +781 -0
- package/cpp/third_party/tgfx/src/core/CanvasState.cpp +30 -0
- package/cpp/third_party/tgfx/src/core/CanvasState.h +46 -0
- package/cpp/third_party/tgfx/src/core/Checksum.cpp +127 -0
- package/cpp/third_party/tgfx/src/core/Checksum.h +35 -0
- package/cpp/third_party/tgfx/src/core/ClipStack.cpp +720 -0
- package/cpp/third_party/tgfx/src/core/ClipStack.h +252 -0
- package/cpp/third_party/tgfx/src/core/Color.cpp +54 -0
- package/cpp/third_party/tgfx/src/core/ColorSpace.cpp +836 -0
- package/cpp/third_party/tgfx/src/core/ColorSpaceXformSteps.cpp +286 -0
- package/cpp/third_party/tgfx/src/core/ColorSpaceXformSteps.h +91 -0
- package/cpp/third_party/tgfx/src/core/CustomTypeface.cpp +104 -0
- package/cpp/third_party/tgfx/src/core/Data.cpp +95 -0
- package/cpp/third_party/tgfx/src/core/DataSource.h +140 -0
- package/cpp/third_party/tgfx/src/core/DrawContext.h +114 -0
- package/cpp/third_party/tgfx/src/core/Font.cpp +144 -0
- package/cpp/third_party/tgfx/src/core/GeometryShape.cpp +202 -0
- package/cpp/third_party/tgfx/src/core/GeometryShape.h +136 -0
- package/cpp/third_party/tgfx/src/core/GlyphRasterizer.cpp +58 -0
- package/cpp/third_party/tgfx/src/core/GlyphRasterizer.h +63 -0
- package/cpp/third_party/tgfx/src/core/GlyphTransform.cpp +110 -0
- package/cpp/third_party/tgfx/src/core/GlyphTransform.h +57 -0
- package/cpp/third_party/tgfx/src/core/GradientGenerator.cpp +78 -0
- package/cpp/third_party/tgfx/src/core/GradientGenerator.h +42 -0
- package/cpp/third_party/tgfx/src/core/HairlineTriangulator.cpp +569 -0
- package/cpp/third_party/tgfx/src/core/HairlineTriangulator.h +52 -0
- package/cpp/third_party/tgfx/src/core/ImageBuffer.cpp +95 -0
- package/cpp/third_party/tgfx/src/core/ImageCodec.cpp +221 -0
- package/cpp/third_party/tgfx/src/core/ImageFilter.cpp +116 -0
- package/cpp/third_party/tgfx/src/core/ImageInfo.cpp +118 -0
- package/cpp/third_party/tgfx/src/core/ImageSource.cpp +43 -0
- package/cpp/third_party/tgfx/src/core/ImageSource.h +48 -0
- package/cpp/third_party/tgfx/src/core/ImageUserTypeface.cpp +144 -0
- package/cpp/third_party/tgfx/src/core/ImageUserTypeface.h +54 -0
- package/cpp/third_party/tgfx/src/core/LayerUnrollContext.cpp +103 -0
- package/cpp/third_party/tgfx/src/core/LayerUnrollContext.h +80 -0
- package/cpp/third_party/tgfx/src/core/Matrix.cpp +610 -0
- package/cpp/third_party/tgfx/src/core/Matrix3D.cpp +469 -0
- package/cpp/third_party/tgfx/src/core/Matrix3DUtils.cpp +67 -0
- package/cpp/third_party/tgfx/src/core/Matrix3DUtils.h +89 -0
- package/cpp/third_party/tgfx/src/core/MatrixSIMD.cpp +350 -0
- package/cpp/third_party/tgfx/src/core/MatrixUtils.cpp +45 -0
- package/cpp/third_party/tgfx/src/core/MatrixUtils.h +33 -0
- package/cpp/third_party/tgfx/src/core/MeasureContext.cpp +131 -0
- package/cpp/third_party/tgfx/src/core/MeasureContext.h +72 -0
- package/cpp/third_party/tgfx/src/core/Mesh.cpp +44 -0
- package/cpp/third_party/tgfx/src/core/MeshBase.h +66 -0
- package/cpp/third_party/tgfx/src/core/NoConicsPathIterator.cpp +153 -0
- package/cpp/third_party/tgfx/src/core/NoConicsPathIterator.h +91 -0
- package/cpp/third_party/tgfx/src/core/Orientation.cpp +49 -0
- package/cpp/third_party/tgfx/src/core/Paint.cpp +40 -0
- package/cpp/third_party/tgfx/src/core/Path.cpp +716 -0
- package/cpp/third_party/tgfx/src/core/PathEffect.cpp +63 -0
- package/cpp/third_party/tgfx/src/core/PathMeasure.cpp +76 -0
- package/cpp/third_party/tgfx/src/core/PathProvider.cpp +43 -0
- package/cpp/third_party/tgfx/src/core/PathRasterizer.cpp +49 -0
- package/cpp/third_party/tgfx/src/core/PathRasterizer.h +61 -0
- package/cpp/third_party/tgfx/src/core/PathRef.cpp +58 -0
- package/cpp/third_party/tgfx/src/core/PathRef.h +59 -0
- package/cpp/third_party/tgfx/src/core/PathTriangulator.cpp +89 -0
- package/cpp/third_party/tgfx/src/core/PathTriangulator.h +60 -0
- package/cpp/third_party/tgfx/src/core/PathUserTypeface.cpp +217 -0
- package/cpp/third_party/tgfx/src/core/PathUserTypeface.h +53 -0
- package/cpp/third_party/tgfx/src/core/Picture.cpp +260 -0
- package/cpp/third_party/tgfx/src/core/PictureContext.cpp +263 -0
- package/cpp/third_party/tgfx/src/core/PictureContext.h +92 -0
- package/cpp/third_party/tgfx/src/core/PictureRecorder.cpp +51 -0
- package/cpp/third_party/tgfx/src/core/PictureRecords.h +419 -0
- package/cpp/third_party/tgfx/src/core/PixelBuffer.cpp +158 -0
- package/cpp/third_party/tgfx/src/core/PixelBuffer.h +113 -0
- package/cpp/third_party/tgfx/src/core/PixelBufferCodec.cpp +46 -0
- package/cpp/third_party/tgfx/src/core/PixelBufferCodec.h +43 -0
- package/cpp/third_party/tgfx/src/core/PixelRef.cpp +68 -0
- package/cpp/third_party/tgfx/src/core/PixelRef.h +111 -0
- package/cpp/third_party/tgfx/src/core/Pixmap.cpp +186 -0
- package/cpp/third_party/tgfx/src/core/PlaybackContext.cpp +117 -0
- package/cpp/third_party/tgfx/src/core/PlaybackContext.h +78 -0
- package/cpp/third_party/tgfx/src/core/Point.cpp +28 -0
- package/cpp/third_party/tgfx/src/core/RRect.cpp +154 -0
- package/cpp/third_party/tgfx/src/core/RRectUtils.cpp +334 -0
- package/cpp/third_party/tgfx/src/core/RRectUtils.h +79 -0
- package/cpp/third_party/tgfx/src/core/RSXform.cpp +31 -0
- package/cpp/third_party/tgfx/src/core/RawPixelCodec.cpp +89 -0
- package/cpp/third_party/tgfx/src/core/RawPixelCodec.h +49 -0
- package/cpp/third_party/tgfx/src/core/Rect.cpp +68 -0
- package/cpp/third_party/tgfx/src/core/RectPackSkyline.cpp +104 -0
- package/cpp/third_party/tgfx/src/core/RectPackSkyline.h +67 -0
- package/cpp/third_party/tgfx/src/core/RectSIMD.cpp +91 -0
- package/cpp/third_party/tgfx/src/core/RunRecord.cpp +76 -0
- package/cpp/third_party/tgfx/src/core/RunRecord.h +61 -0
- package/cpp/third_party/tgfx/src/core/ScaledImageGenerator.cpp +47 -0
- package/cpp/third_party/tgfx/src/core/ScaledImageGenerator.h +46 -0
- package/cpp/third_party/tgfx/src/core/ScalerContext.cpp +81 -0
- package/cpp/third_party/tgfx/src/core/ScalerContext.h +98 -0
- package/cpp/third_party/tgfx/src/core/Shader.cpp +38 -0
- package/cpp/third_party/tgfx/src/core/ShapeMesh.cpp +48 -0
- package/cpp/third_party/tgfx/src/core/ShapeMesh.h +62 -0
- package/cpp/third_party/tgfx/src/core/ShapeRasterizer.cpp +83 -0
- package/cpp/third_party/tgfx/src/core/ShapeRasterizer.h +71 -0
- package/cpp/third_party/tgfx/src/core/ShapeVertexSource.cpp +57 -0
- package/cpp/third_party/tgfx/src/core/ShapeVertexSource.h +42 -0
- package/cpp/third_party/tgfx/src/core/StencilCoverPathTessellator.cpp +258 -0
- package/cpp/third_party/tgfx/src/core/StencilCoverPathTessellator.h +100 -0
- package/cpp/third_party/tgfx/src/core/Stroke.cpp +65 -0
- package/cpp/third_party/tgfx/src/core/Surface.cpp +292 -0
- package/cpp/third_party/tgfx/src/core/SurfaceReadback.cpp +143 -0
- package/cpp/third_party/tgfx/src/core/TextBlob.cpp +330 -0
- package/cpp/third_party/tgfx/src/core/TextBlobBuilder.cpp +215 -0
- package/cpp/third_party/tgfx/src/core/TrimPathEffect.cpp +188 -0
- package/cpp/third_party/tgfx/src/core/TrimPathEffect.h +35 -0
- package/cpp/third_party/tgfx/src/core/Typeface.cpp +170 -0
- package/cpp/third_party/tgfx/src/core/UserScalerContext.h +66 -0
- package/cpp/third_party/tgfx/src/core/UserTypeface.h +95 -0
- package/cpp/third_party/tgfx/src/core/Vec.cpp +53 -0
- package/cpp/third_party/tgfx/src/core/VecSIMD.cpp +325 -0
- package/cpp/third_party/tgfx/src/core/VertexMesh.cpp +111 -0
- package/cpp/third_party/tgfx/src/core/VertexMesh.h +107 -0
- package/cpp/third_party/tgfx/src/core/YUVColorSpace.cpp +33 -0
- package/cpp/third_party/tgfx/src/core/YUVData.cpp +81 -0
- package/cpp/third_party/tgfx/src/core/YUVHardwareBuffer.cpp +98 -0
- package/cpp/third_party/tgfx/src/core/YUVHardwareBuffer.h +63 -0
- package/cpp/third_party/tgfx/src/core/codecs/jpeg/JpegCodec.cpp +445 -0
- package/cpp/third_party/tgfx/src/core/codecs/jpeg/JpegCodec.h +61 -0
- package/cpp/third_party/tgfx/src/core/codecs/png/PngCodec.cpp +457 -0
- package/cpp/third_party/tgfx/src/core/codecs/png/PngCodec.h +57 -0
- package/cpp/third_party/tgfx/src/core/codecs/webp/WebpCodec.cpp +253 -0
- package/cpp/third_party/tgfx/src/core/codecs/webp/WebpCodec.h +56 -0
- package/cpp/third_party/tgfx/src/core/codecs/webp/WebpUtility.cpp +376 -0
- package/cpp/third_party/tgfx/src/core/codecs/webp/WebpUtility.h +41 -0
- package/cpp/third_party/tgfx/src/core/filters/AlphaThresholdColorFilter.cpp +44 -0
- package/cpp/third_party/tgfx/src/core/filters/AlphaThresholdColorFilter.h +46 -0
- package/cpp/third_party/tgfx/src/core/filters/BlendImageFilter.cpp +72 -0
- package/cpp/third_party/tgfx/src/core/filters/BlendImageFilter.h +45 -0
- package/cpp/third_party/tgfx/src/core/filters/ColorImageFilter.cpp +59 -0
- package/cpp/third_party/tgfx/src/core/filters/ColorImageFilter.h +41 -0
- package/cpp/third_party/tgfx/src/core/filters/ComposeColorFilter.cpp +70 -0
- package/cpp/third_party/tgfx/src/core/filters/ComposeColorFilter.h +47 -0
- package/cpp/third_party/tgfx/src/core/filters/ComposeImageFilter.cpp +98 -0
- package/cpp/third_party/tgfx/src/core/filters/ComposeImageFilter.h +45 -0
- package/cpp/third_party/tgfx/src/core/filters/DropShadowImageFilter.cpp +128 -0
- package/cpp/third_party/tgfx/src/core/filters/DropShadowImageFilter.h +60 -0
- package/cpp/third_party/tgfx/src/core/filters/GaussianBlurImageFilter.cpp +226 -0
- package/cpp/third_party/tgfx/src/core/filters/GaussianBlurImageFilter.h +62 -0
- package/cpp/third_party/tgfx/src/core/filters/InnerShadowImageFilter.cpp +104 -0
- package/cpp/third_party/tgfx/src/core/filters/InnerShadowImageFilter.h +58 -0
- package/cpp/third_party/tgfx/src/core/filters/LumaColorFilter.cpp +33 -0
- package/cpp/third_party/tgfx/src/core/filters/LumaColorFilter.h +42 -0
- package/cpp/third_party/tgfx/src/core/filters/MatrixColorFilter.cpp +60 -0
- package/cpp/third_party/tgfx/src/core/filters/MatrixColorFilter.h +48 -0
- package/cpp/third_party/tgfx/src/core/filters/ModeColorFilter.cpp +101 -0
- package/cpp/third_party/tgfx/src/core/filters/ModeColorFilter.h +50 -0
- package/cpp/third_party/tgfx/src/core/filters/RuntimeImageFilter.cpp +82 -0
- package/cpp/third_party/tgfx/src/core/filters/RuntimeImageFilter.h +48 -0
- package/cpp/third_party/tgfx/src/core/filters/ShaderMaskFilter.cpp +55 -0
- package/cpp/third_party/tgfx/src/core/filters/ShaderMaskFilter.h +56 -0
- package/cpp/third_party/tgfx/src/core/images/BufferImage.cpp +80 -0
- package/cpp/third_party/tgfx/src/core/images/BufferImage.h +62 -0
- package/cpp/third_party/tgfx/src/core/images/CodecImage.cpp +67 -0
- package/cpp/third_party/tgfx/src/core/images/CodecImage.h +65 -0
- package/cpp/third_party/tgfx/src/core/images/DecodedImage.cpp +62 -0
- package/cpp/third_party/tgfx/src/core/images/DecodedImage.h +69 -0
- package/cpp/third_party/tgfx/src/core/images/FilterImage.cpp +158 -0
- package/cpp/third_party/tgfx/src/core/images/FilterImage.h +80 -0
- package/cpp/third_party/tgfx/src/core/images/GeneratorImage.cpp +44 -0
- package/cpp/third_party/tgfx/src/core/images/GeneratorImage.h +64 -0
- package/cpp/third_party/tgfx/src/core/images/Image.cpp +249 -0
- package/cpp/third_party/tgfx/src/core/images/OrientImage.cpp +170 -0
- package/cpp/third_party/tgfx/src/core/images/OrientImage.h +59 -0
- package/cpp/third_party/tgfx/src/core/images/PictureImage.cpp +180 -0
- package/cpp/third_party/tgfx/src/core/images/PictureImage.h +84 -0
- package/cpp/third_party/tgfx/src/core/images/PixelImage.cpp +43 -0
- package/cpp/third_party/tgfx/src/core/images/PixelImage.h +42 -0
- package/cpp/third_party/tgfx/src/core/images/RGBAAAImage.cpp +140 -0
- package/cpp/third_party/tgfx/src/core/images/RGBAAAImage.h +56 -0
- package/cpp/third_party/tgfx/src/core/images/RasterizedImage.cpp +132 -0
- package/cpp/third_party/tgfx/src/core/images/RasterizedImage.h +84 -0
- package/cpp/third_party/tgfx/src/core/images/ScaledImage.cpp +102 -0
- package/cpp/third_party/tgfx/src/core/images/ScaledImage.h +70 -0
- package/cpp/third_party/tgfx/src/core/images/SubsetImage.cpp +131 -0
- package/cpp/third_party/tgfx/src/core/images/SubsetImage.h +65 -0
- package/cpp/third_party/tgfx/src/core/images/TextureImage.cpp +92 -0
- package/cpp/third_party/tgfx/src/core/images/TextureImage.h +96 -0
- package/cpp/third_party/tgfx/src/core/images/TransformImage.cpp +77 -0
- package/cpp/third_party/tgfx/src/core/images/TransformImage.h +64 -0
- package/cpp/third_party/tgfx/src/core/shaders/BlendShader.cpp +74 -0
- package/cpp/third_party/tgfx/src/core/shaders/BlendShader.h +47 -0
- package/cpp/third_party/tgfx/src/core/shaders/ColorFilterShader.cpp +65 -0
- package/cpp/third_party/tgfx/src/core/shaders/ColorFilterShader.h +54 -0
- package/cpp/third_party/tgfx/src/core/shaders/ColorShader.cpp +56 -0
- package/cpp/third_party/tgfx/src/core/shaders/ColorShader.h +50 -0
- package/cpp/third_party/tgfx/src/core/shaders/GradientShader.cpp +411 -0
- package/cpp/third_party/tgfx/src/core/shaders/GradientShader.h +126 -0
- package/cpp/third_party/tgfx/src/core/shaders/ImageShader.cpp +64 -0
- package/cpp/third_party/tgfx/src/core/shaders/ImageShader.h +56 -0
- package/cpp/third_party/tgfx/src/core/shaders/MatrixShader.cpp +73 -0
- package/cpp/third_party/tgfx/src/core/shaders/MatrixShader.h +59 -0
- package/cpp/third_party/tgfx/src/core/shaders/PerlinNoiseShader.cpp +216 -0
- package/cpp/third_party/tgfx/src/core/shaders/PerlinNoiseShader.h +91 -0
- package/cpp/third_party/tgfx/src/core/shaders/RuntimeShader.cpp +51 -0
- package/cpp/third_party/tgfx/src/core/shaders/RuntimeShader.h +31 -0
- package/cpp/third_party/tgfx/src/core/shapes/AppendShape.cpp +83 -0
- package/cpp/third_party/tgfx/src/core/shapes/AppendShape.h +53 -0
- package/cpp/third_party/tgfx/src/core/shapes/EffectShape.cpp +45 -0
- package/cpp/third_party/tgfx/src/core/shapes/EffectShape.h +51 -0
- package/cpp/third_party/tgfx/src/core/shapes/FillTypeShape.cpp +53 -0
- package/cpp/third_party/tgfx/src/core/shapes/FillTypeShape.h +51 -0
- package/cpp/third_party/tgfx/src/core/shapes/GlyphShape.cpp +79 -0
- package/cpp/third_party/tgfx/src/core/shapes/GlyphShape.h +50 -0
- package/cpp/third_party/tgfx/src/core/shapes/Matrix3DShape.cpp +93 -0
- package/cpp/third_party/tgfx/src/core/shapes/Matrix3DShape.h +58 -0
- package/cpp/third_party/tgfx/src/core/shapes/MatrixShape.cpp +94 -0
- package/cpp/third_party/tgfx/src/core/shapes/MatrixShape.h +55 -0
- package/cpp/third_party/tgfx/src/core/shapes/MergeShape.cpp +90 -0
- package/cpp/third_party/tgfx/src/core/shapes/MergeShape.h +49 -0
- package/cpp/third_party/tgfx/src/core/shapes/PathShape.cpp +34 -0
- package/cpp/third_party/tgfx/src/core/shapes/PathShape.h +58 -0
- package/cpp/third_party/tgfx/src/core/shapes/ProviderShape.cpp +36 -0
- package/cpp/third_party/tgfx/src/core/shapes/ProviderShape.h +48 -0
- package/cpp/third_party/tgfx/src/core/shapes/ReverseShape.cpp +47 -0
- package/cpp/third_party/tgfx/src/core/shapes/ReverseShape.h +49 -0
- package/cpp/third_party/tgfx/src/core/shapes/Shape.cpp +51 -0
- package/cpp/third_party/tgfx/src/core/shapes/StrokeShape.cpp +110 -0
- package/cpp/third_party/tgfx/src/core/shapes/StrokeShape.h +58 -0
- package/cpp/third_party/tgfx/src/core/shapes/TextShape.cpp +77 -0
- package/cpp/third_party/tgfx/src/core/shapes/TextShape.h +49 -0
- package/cpp/third_party/tgfx/src/core/shapes/UniqueKeyShape.h +34 -0
- package/cpp/third_party/tgfx/src/core/utils/AddressOf.h +35 -0
- package/cpp/third_party/tgfx/src/core/utils/AtomicCache.h +52 -0
- package/cpp/third_party/tgfx/src/core/utils/BlockAllocator.cpp +167 -0
- package/cpp/third_party/tgfx/src/core/utils/BlockAllocator.h +211 -0
- package/cpp/third_party/tgfx/src/core/utils/Buffer.cpp +121 -0
- package/cpp/third_party/tgfx/src/core/utils/BytesKey.cpp +71 -0
- package/cpp/third_party/tgfx/src/core/utils/ClearPixels.cpp +33 -0
- package/cpp/third_party/tgfx/src/core/utils/ClearPixels.h +28 -0
- package/cpp/third_party/tgfx/src/core/utils/Clock.cpp +80 -0
- package/cpp/third_party/tgfx/src/core/utils/ColorHelper.cpp +65 -0
- package/cpp/third_party/tgfx/src/core/utils/ColorHelper.h +28 -0
- package/cpp/third_party/tgfx/src/core/utils/ColorSpaceHelper.cpp +207 -0
- package/cpp/third_party/tgfx/src/core/utils/ColorSpaceHelper.h +44 -0
- package/cpp/third_party/tgfx/src/core/utils/CopyPixels.cpp +110 -0
- package/cpp/third_party/tgfx/src/core/utils/CopyPixels.h +30 -0
- package/cpp/third_party/tgfx/src/core/utils/DataView.cpp +290 -0
- package/cpp/third_party/tgfx/src/core/utils/DecomposeRects.cpp +89 -0
- package/cpp/third_party/tgfx/src/core/utils/DecomposeRects.h +31 -0
- package/cpp/third_party/tgfx/src/core/utils/EnumHasher.h +32 -0
- package/cpp/third_party/tgfx/src/core/utils/FauxBoldScale.cpp +70 -0
- package/cpp/third_party/tgfx/src/core/utils/FauxBoldScale.h +25 -0
- package/cpp/third_party/tgfx/src/core/utils/FontTableTag.h +34 -0
- package/cpp/third_party/tgfx/src/core/utils/GammaCorrection.cpp +44 -0
- package/cpp/third_party/tgfx/src/core/utils/GammaCorrection.h +29 -0
- package/cpp/third_party/tgfx/src/core/utils/GeometryExtra.h +58 -0
- package/cpp/third_party/tgfx/src/core/utils/GlyphConverter.cpp +51 -0
- package/cpp/third_party/tgfx/src/core/utils/GlyphConverter.h +46 -0
- package/cpp/third_party/tgfx/src/core/utils/HardwareBufferUtil.cpp +63 -0
- package/cpp/third_party/tgfx/src/core/utils/HardwareBufferUtil.h +38 -0
- package/cpp/third_party/tgfx/src/core/utils/HashRange.cpp +29 -0
- package/cpp/third_party/tgfx/src/core/utils/HashRange.h +28 -0
- package/cpp/third_party/tgfx/src/core/utils/Log.h +63 -0
- package/cpp/third_party/tgfx/src/core/utils/MD5.cpp +199 -0
- package/cpp/third_party/tgfx/src/core/utils/MD5.h +33 -0
- package/cpp/third_party/tgfx/src/core/utils/MathExtra.cpp +118 -0
- package/cpp/third_party/tgfx/src/core/utils/MathExtra.h +177 -0
- package/cpp/third_party/tgfx/src/core/utils/NextCacheScaleLevel.cpp +47 -0
- package/cpp/third_party/tgfx/src/core/utils/NextCacheScaleLevel.h +25 -0
- package/cpp/third_party/tgfx/src/core/utils/OrientationHelper.h +100 -0
- package/cpp/third_party/tgfx/src/core/utils/PathUtils.cpp +479 -0
- package/cpp/third_party/tgfx/src/core/utils/PathUtils.h +120 -0
- package/cpp/third_party/tgfx/src/core/utils/PixelFormatUtil.cpp +80 -0
- package/cpp/third_party/tgfx/src/core/utils/PixelFormatUtil.h +35 -0
- package/cpp/third_party/tgfx/src/core/utils/PlacementArray.h +252 -0
- package/cpp/third_party/tgfx/src/core/utils/PlacementPtr.h +183 -0
- package/cpp/third_party/tgfx/src/core/utils/PointUtils.cpp +58 -0
- package/cpp/third_party/tgfx/src/core/utils/PointUtils.h +55 -0
- package/cpp/third_party/tgfx/src/core/utils/RectToRectMatrix.cpp +34 -0
- package/cpp/third_party/tgfx/src/core/utils/RectToRectMatrix.h +30 -0
- package/cpp/third_party/tgfx/src/core/utils/ReturnQueue.cpp +51 -0
- package/cpp/third_party/tgfx/src/core/utils/ReturnQueue.h +77 -0
- package/cpp/third_party/tgfx/src/core/utils/ShapeUtils.cpp +73 -0
- package/cpp/third_party/tgfx/src/core/utils/ShapeUtils.h +61 -0
- package/cpp/third_party/tgfx/src/core/utils/SingleOwner.h +64 -0
- package/cpp/third_party/tgfx/src/core/utils/SlidingWindowTracker.cpp +54 -0
- package/cpp/third_party/tgfx/src/core/utils/SlidingWindowTracker.h +51 -0
- package/cpp/third_party/tgfx/src/core/utils/Stream.cpp +177 -0
- package/cpp/third_party/tgfx/src/core/utils/StrokeUtils.cpp +140 -0
- package/cpp/third_party/tgfx/src/core/utils/StrokeUtils.h +73 -0
- package/cpp/third_party/tgfx/src/core/utils/Task.cpp +114 -0
- package/cpp/third_party/tgfx/src/core/utils/TaskGroup.cpp +187 -0
- package/cpp/third_party/tgfx/src/core/utils/TaskGroup.h +56 -0
- package/cpp/third_party/tgfx/src/core/utils/TileSortCompareFunc.h +38 -0
- package/cpp/third_party/tgfx/src/core/utils/TileSortCompareFuncSIMD.cpp +67 -0
- package/cpp/third_party/tgfx/src/core/utils/Types.h +88 -0
- package/cpp/third_party/tgfx/src/core/utils/USE.h +46 -0
- package/cpp/third_party/tgfx/src/core/utils/UTF.cpp +151 -0
- package/cpp/third_party/tgfx/src/core/utils/UniqueID.cpp +32 -0
- package/cpp/third_party/tgfx/src/core/utils/UniqueID.h +28 -0
- package/cpp/third_party/tgfx/src/core/utils/VecUtils.h +97 -0
- package/cpp/third_party/tgfx/src/core/utils/WeakMap.h +61 -0
- package/cpp/third_party/tgfx/src/core/utils/WriteStream.cpp +160 -0
- package/cpp/third_party/tgfx/src/core/vectors/coregraphics/CGPathRasterizer.cpp +205 -0
- package/cpp/third_party/tgfx/src/core/vectors/coregraphics/CGPathRasterizer.h +35 -0
- package/cpp/third_party/tgfx/src/core/vectors/coregraphics/CGScalerContext.cpp +381 -0
- package/cpp/third_party/tgfx/src/core/vectors/coregraphics/CGScalerContext.h +56 -0
- package/cpp/third_party/tgfx/src/core/vectors/coregraphics/CGTypeface.cpp +448 -0
- package/cpp/third_party/tgfx/src/core/vectors/coregraphics/CGTypeface.h +88 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTFontData.h +36 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTLibrary.cpp +36 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTLibrary.h +45 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTPath.cpp +118 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTPath.h +58 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTPathRasterizer.cpp +135 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTPathRasterizer.h +35 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTRasterTarget.cpp +54 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTRasterTarget.h +33 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTScalerContext.cpp +970 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTScalerContext.h +99 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTTypeface.cpp +310 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTTypeface.h +99 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/FTUtil.h +45 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/SystemFont.cpp +279 -0
- package/cpp/third_party/tgfx/src/core/vectors/freetype/SystemFont.h +31 -0
- package/cpp/third_party/tgfx/src/gpu/AAType.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/AlignTo.cpp +28 -0
- package/cpp/third_party/tgfx/src/gpu/AlignTo.h +24 -0
- package/cpp/third_party/tgfx/src/gpu/Attribute.cpp +59 -0
- package/cpp/third_party/tgfx/src/gpu/Backend.cpp +275 -0
- package/cpp/third_party/tgfx/src/gpu/BackingFit.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/BlendFormula.cpp +162 -0
- package/cpp/third_party/tgfx/src/gpu/BlendFormula.h +121 -0
- package/cpp/third_party/tgfx/src/gpu/ColorSpaceXformHelper.cpp +89 -0
- package/cpp/third_party/tgfx/src/gpu/ColorSpaceXformHelper.h +103 -0
- package/cpp/third_party/tgfx/src/gpu/CommandEncoder.cpp +43 -0
- package/cpp/third_party/tgfx/src/gpu/Context.cpp +204 -0
- package/cpp/third_party/tgfx/src/gpu/CoordTransform.cpp +39 -0
- package/cpp/third_party/tgfx/src/gpu/CoordTransform.h +40 -0
- package/cpp/third_party/tgfx/src/gpu/Device.cpp +70 -0
- package/cpp/third_party/tgfx/src/gpu/DrawingBuffer.cpp +85 -0
- package/cpp/third_party/tgfx/src/gpu/DrawingBuffer.h +89 -0
- package/cpp/third_party/tgfx/src/gpu/DrawingManager.cpp +211 -0
- package/cpp/third_party/tgfx/src/gpu/DrawingManager.h +111 -0
- package/cpp/third_party/tgfx/src/gpu/FragmentShaderBuilder.cpp +61 -0
- package/cpp/third_party/tgfx/src/gpu/FragmentShaderBuilder.h +61 -0
- package/cpp/third_party/tgfx/src/gpu/GlobalCache.cpp +705 -0
- package/cpp/third_party/tgfx/src/gpu/GlobalCache.h +156 -0
- package/cpp/third_party/tgfx/src/gpu/InstanceProvider.cpp +75 -0
- package/cpp/third_party/tgfx/src/gpu/InstanceProvider.h +78 -0
- package/cpp/third_party/tgfx/src/gpu/OpsCompositor.cpp +1198 -0
- package/cpp/third_party/tgfx/src/gpu/OpsCompositor.h +229 -0
- package/cpp/third_party/tgfx/src/gpu/Program.cpp +38 -0
- package/cpp/third_party/tgfx/src/gpu/Program.h +47 -0
- package/cpp/third_party/tgfx/src/gpu/ProgramBuilder.cpp +208 -0
- package/cpp/third_party/tgfx/src/gpu/ProgramBuilder.h +105 -0
- package/cpp/third_party/tgfx/src/gpu/ProgramInfo.cpp +339 -0
- package/cpp/third_party/tgfx/src/gpu/ProgramInfo.h +173 -0
- package/cpp/third_party/tgfx/src/gpu/ProxyProvider.cpp +711 -0
- package/cpp/third_party/tgfx/src/gpu/ProxyProvider.h +223 -0
- package/cpp/third_party/tgfx/src/gpu/Quad.cpp +65 -0
- package/cpp/third_party/tgfx/src/gpu/Quad.h +73 -0
- package/cpp/third_party/tgfx/src/gpu/QuadRecord.h +71 -0
- package/cpp/third_party/tgfx/src/gpu/QuadsVertexProvider.cpp +603 -0
- package/cpp/third_party/tgfx/src/gpu/QuadsVertexProvider.h +109 -0
- package/cpp/third_party/tgfx/src/gpu/RRectsVertexProvider.cpp +722 -0
- package/cpp/third_party/tgfx/src/gpu/RRectsVertexProvider.h +108 -0
- package/cpp/third_party/tgfx/src/gpu/RectsVertexProvider.cpp +928 -0
- package/cpp/third_party/tgfx/src/gpu/RectsVertexProvider.h +153 -0
- package/cpp/third_party/tgfx/src/gpu/RenderContext.cpp +773 -0
- package/cpp/third_party/tgfx/src/gpu/RenderContext.h +113 -0
- package/cpp/third_party/tgfx/src/gpu/RenderPipeline.cpp +31 -0
- package/cpp/third_party/tgfx/src/gpu/ResourceCache.cpp +288 -0
- package/cpp/third_party/tgfx/src/gpu/ResourceCache.h +170 -0
- package/cpp/third_party/tgfx/src/gpu/SLType.h +48 -0
- package/cpp/third_party/tgfx/src/gpu/SamplerHandle.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/SamplerState.h +57 -0
- package/cpp/third_party/tgfx/src/gpu/SamplingArgs.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderBuilder.cpp +354 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderBuilder.h +133 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderCaps.cpp +104 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderCaps.h +101 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderCompiler.cpp +171 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderCompiler.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderVar.cpp +103 -0
- package/cpp/third_party/tgfx/src/gpu/ShaderVar.h +59 -0
- package/cpp/third_party/tgfx/src/gpu/Swizzle.cpp +77 -0
- package/cpp/third_party/tgfx/src/gpu/Swizzle.h +116 -0
- package/cpp/third_party/tgfx/src/gpu/TPArgs.h +64 -0
- package/cpp/third_party/tgfx/src/gpu/Texture.cpp +33 -0
- package/cpp/third_party/tgfx/src/gpu/Uniform.cpp +52 -0
- package/cpp/third_party/tgfx/src/gpu/Uniform.h +90 -0
- package/cpp/third_party/tgfx/src/gpu/UniformData.cpp +160 -0
- package/cpp/third_party/tgfx/src/gpu/UniformData.h +158 -0
- package/cpp/third_party/tgfx/src/gpu/UniformHandler.cpp +96 -0
- package/cpp/third_party/tgfx/src/gpu/UniformHandler.h +83 -0
- package/cpp/third_party/tgfx/src/gpu/UniqueDomain.cpp +49 -0
- package/cpp/third_party/tgfx/src/gpu/UniqueDomain.h +55 -0
- package/cpp/third_party/tgfx/src/gpu/VaryingHandler.cpp +79 -0
- package/cpp/third_party/tgfx/src/gpu/VaryingHandler.h +87 -0
- package/cpp/third_party/tgfx/src/gpu/VertexProvider.cpp +45 -0
- package/cpp/third_party/tgfx/src/gpu/VertexProvider.h +83 -0
- package/cpp/third_party/tgfx/src/gpu/VertexShaderBuilder.h +48 -0
- package/cpp/third_party/tgfx/src/gpu/Window.cpp +38 -0
- package/cpp/third_party/tgfx/src/gpu/YUVFormat.h +39 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLBlend.cpp +551 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLBlend.h +31 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLFragmentShaderBuilder.cpp +67 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLFragmentShaderBuilder.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLProgramBuilder.cpp +240 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLProgramBuilder.h +70 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLVertexShaderBuilder.cpp +51 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/GLSLVertexShaderBuilder.h +33 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLAlphaThresholdFragmentProcessor.cpp +49 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLAlphaThresholdFragmentProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLAtlasTextGeometryProcessor.cpp +99 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLAtlasTextGeometryProcessor.h +38 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLClampedGradientEffect.cpp +90 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLClampedGradientEffect.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLColorMatrixFragmentProcessor.cpp +66 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLColorMatrixFragmentProcessor.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLComplexEllipseGeometryProcessor.cpp +163 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLComplexEllipseGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLComplexNonAARRectGeometryProcessor.cpp +161 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLComplexNonAARRectGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLComposeFragmentProcessor.cpp +48 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLComposeFragmentProcessor.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLConicGradientLayout.cpp +50 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLConicGradientLayout.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLConstColorProcessor.cpp +52 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLConstColorProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDefaultGeometryProcessor.cpp +77 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDefaultGeometryProcessor.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDeviceSpaceTextureEffect.cpp +66 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDeviceSpaceTextureEffect.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDiamondGradientLayout.cpp +39 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDiamondGradientLayout.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDualIntervalGradientColorizer.cpp +84 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLDualIntervalGradientColorizer.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLEllipseGeometryProcessor.cpp +109 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLEllipseGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLEmptyXferProcessor.cpp +31 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLEmptyXferProcessor.h +28 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLGaussianBlur1DFragmentProcessor.cpp +94 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLGaussianBlur1DFragmentProcessor.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLHairlineLineGeometryProcessor.cpp +92 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLHairlineLineGeometryProcessor.h +38 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLHairlineQuadGeometryProcessor.cpp +109 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLHairlineQuadGeometryProcessor.h +38 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLLinearGradientLayout.cpp +36 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLLinearGradientLayout.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLLumaFragmentProcessor.cpp +45 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLLumaFragmentProcessor.h +33 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLMeshGeometryProcessor.cpp +105 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLMeshGeometryProcessor.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLNonAARRectGeometryProcessor.cpp +131 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLNonAARRectGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLPerlinNoiseFragmentProcessor.cpp +240 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLPerlinNoiseFragmentProcessor.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLPorterDuffXferProcessor.cpp +102 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLPorterDuffXferProcessor.h +32 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLQuadPerEdgeAAGeometryProcessor.cpp +116 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLQuadPerEdgeAAGeometryProcessor.h +47 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRRectEffect.cpp +158 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRRectEffect.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRadialGradientLayout.cpp +36 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRadialGradientLayout.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRectEffect.cpp +105 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRectEffect.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRoundStrokeRectGeometryProcessor.cpp +101 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRoundStrokeRectGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRuntimeShaderProcessor.cpp +210 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLRuntimeShaderProcessor.h +21 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLShapeInstancedGeometryProcessor.cpp +98 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLShapeInstancedGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLSingleIntervalGradientColorizer.cpp +47 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLSingleIntervalGradientColorizer.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLStencilCoverCoverPassGeometryProcessor.cpp +71 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLStencilCoverCoverPassGeometryProcessor.h +33 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLStencilCoverStencilPassGeometryProcessor.cpp +85 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLStencilCoverStencilPassGeometryProcessor.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLTextureEffect.cpp +295 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLTextureEffect.h +41 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLTextureGradientColorizer.cpp +41 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLTextureGradientColorizer.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLTiledTextureEffect.cpp +480 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLTiledTextureEffect.h +65 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLUnrolledBinaryGradientColorizer.cpp +291 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLUnrolledBinaryGradientColorizer.h +49 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLXfermodeFragmentProcessor.cpp +74 -0
- package/cpp/third_party/tgfx/src/gpu/glsl/processors/GLSLXfermodeFragmentProcessor.h +31 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalBuffer.h +64 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalBuffer.mm +112 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCaps.h +117 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCaps.mm +177 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCommandBuffer.h +45 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCommandBuffer.mm +31 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCommandEncoder.h +71 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCommandEncoder.mm +173 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCommandQueue.h +86 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalCommandQueue.mm +208 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalDefines.h +54 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalDevice.h +30 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalDevice.mm +72 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalDrawableProxy.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalDrawableProxy.mm +94 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalExternalTexture.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalGPU.h +159 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalGPU.mm +267 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalHardwareTexture.h +60 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalHardwareTexture.mm +146 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalRenderPass.h +110 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalRenderPass.mm +386 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalRenderPipeline.h +91 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalRenderPipeline.mm +310 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalResource.h +47 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalResource.mm +21 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalSampler.h +55 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalSampler.mm +73 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalSemaphore.h +81 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalSemaphore.mm +66 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalShaderModule.h +106 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalShaderModule.mm +244 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalTexture.h +67 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalTexture.mm +157 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalUtil.h +66 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalUtil.mm +337 -0
- package/cpp/third_party/tgfx/src/gpu/metal/MetalWindow.mm +122 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLBuffer.cpp +117 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLBuffer.h +64 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCaps.cpp +325 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCaps.h +118 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCommandEncoder.cpp +178 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCommandEncoder.h +50 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCommandQueue.cpp +122 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCommandQueue.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLCoreFunctions.h +112 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLDefines.h +925 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLDepthStencilTexture.cpp +66 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLDepthStencilTexture.h +44 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLDevice.cpp +104 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLExternalTexture.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLFunctions.h +293 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLGPU.cpp +336 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLGPU.h +119 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLInterface.cpp +276 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLInterface.h +48 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLMultisampleTexture.cpp +98 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLMultisampleTexture.h +46 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLProcGetter.h +32 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLRenderPass.cpp +293 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLRenderPass.h +96 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLRenderPipeline.cpp +336 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLRenderPipeline.h +106 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLResource.h +45 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLSampler.h +53 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLSemaphore.cpp +41 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLSemaphore.h +47 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLShaderModule.cpp +33 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLShaderModule.h +40 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLStandard.h +23 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLState.cpp +261 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLState.h +125 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLTexture.cpp +173 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLTexture.h +95 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLUtil.cpp +217 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/GLUtil.h +68 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLDevice.mm +136 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLGPU.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLGPU.mm +52 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLHardwareTexture.h +50 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLHardwareTexture.mm +90 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLProcGetter.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLProcGetter.mm +42 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/cgl/CGLWindow.mm +91 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLDevice.mm +308 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLGPU.h +46 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLGPU.mm +61 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLHardwareTexture.h +47 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLHardwareTexture.mm +127 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLLayerTexture.h +55 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLLayerTexture.mm +85 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLProcGetter.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLProcGetter.mm +41 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/eagl/EAGLWindow.mm +79 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLDevice.cpp +384 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLDisplayWrapper.cpp +111 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLDisplayWrapper.h +31 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLGPU.cpp +82 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLGPU.h +40 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLGlobals.cpp +100 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLHardwareTexture.cpp +163 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLHardwareTexture.h +57 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLProcGetter.cpp +53 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLProcGetter.h +28 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/egl/EGLWindow.cpp +126 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLDevice.cpp +171 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLDrawableProxy.cpp +94 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLDrawableProxy.h +61 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLGPU.cpp +76 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLGPU.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLProcGetter.cpp +33 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLProcGetter.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/qt/QGLWindow.cpp +293 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLBuffer.cpp +93 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLBuffer.h +45 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLDevice.cpp +161 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLGPU.cpp +30 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLGPU.h +32 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLProcGetter.cpp +50 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLProcGetter.h +28 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/webgl/WebGLWindow.cpp +59 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLDefines.h +113 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLDevice.cpp +335 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLGPU.cpp +297 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLGPU.h +78 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLHardwareTexture.cpp +289 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLHardwareTexture.h +53 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLInterface.cpp +155 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLInterface.h +75 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLProcGetter.cpp +47 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLProcGetter.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/opengl/wgl/WGLWindow.cpp +71 -0
- package/cpp/third_party/tgfx/src/gpu/ops/AtlasTextOp.cpp +99 -0
- package/cpp/third_party/tgfx/src/gpu/ops/AtlasTextOp.h +62 -0
- package/cpp/third_party/tgfx/src/gpu/ops/DrawOp.cpp +41 -0
- package/cpp/third_party/tgfx/src/gpu/ops/DrawOp.h +125 -0
- package/cpp/third_party/tgfx/src/gpu/ops/HairlineLineOp.cpp +91 -0
- package/cpp/third_party/tgfx/src/gpu/ops/HairlineLineOp.h +66 -0
- package/cpp/third_party/tgfx/src/gpu/ops/HairlineQuadOp.cpp +91 -0
- package/cpp/third_party/tgfx/src/gpu/ops/HairlineQuadOp.h +66 -0
- package/cpp/third_party/tgfx/src/gpu/ops/MeshDrawOp.cpp +75 -0
- package/cpp/third_party/tgfx/src/gpu/ops/MeshDrawOp.h +53 -0
- package/cpp/third_party/tgfx/src/gpu/ops/Quads3DDrawOp.cpp +98 -0
- package/cpp/third_party/tgfx/src/gpu/ops/Quads3DDrawOp.h +64 -0
- package/cpp/third_party/tgfx/src/gpu/ops/RRectDrawOp.cpp +101 -0
- package/cpp/third_party/tgfx/src/gpu/ops/RRectDrawOp.h +88 -0
- package/cpp/third_party/tgfx/src/gpu/ops/RectDrawOp.cpp +116 -0
- package/cpp/third_party/tgfx/src/gpu/ops/RectDrawOp.h +103 -0
- package/cpp/third_party/tgfx/src/gpu/ops/ShapeDrawOp.cpp +104 -0
- package/cpp/third_party/tgfx/src/gpu/ops/ShapeDrawOp.h +53 -0
- package/cpp/third_party/tgfx/src/gpu/ops/ShapeInstancedDrawOp.cpp +136 -0
- package/cpp/third_party/tgfx/src/gpu/ops/ShapeInstancedDrawOp.h +69 -0
- package/cpp/third_party/tgfx/src/gpu/ops/StandardDrawOp.cpp +61 -0
- package/cpp/third_party/tgfx/src/gpu/ops/StandardDrawOp.h +94 -0
- package/cpp/third_party/tgfx/src/gpu/ops/StencilCoverPathDrawOp.cpp +302 -0
- package/cpp/third_party/tgfx/src/gpu/ops/StencilCoverPathDrawOp.h +149 -0
- package/cpp/third_party/tgfx/src/gpu/processors/AlphaThresholdFragmentProcessor.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/processors/AtlasTextGeometryProcessor.cpp +46 -0
- package/cpp/third_party/tgfx/src/gpu/processors/AtlasTextGeometryProcessor.h +65 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ClampedGradientEffect.cpp +30 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ClampedGradientEffect.h +49 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ColorMatrixFragmentProcessor.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ColorSpaceXFormEffect.cpp +58 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ColorSpaceXFormEffect.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ComplexEllipseGeometryProcessor.cpp +44 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ComplexEllipseGeometryProcessor.h +66 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ComplexNonAARRectGeometryProcessor.cpp +45 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ComplexNonAARRectGeometryProcessor.h +62 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ComposeFragmentProcessor.cpp +58 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ComposeFragmentProcessor.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ConicGradientLayout.cpp +31 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ConicGradientLayout.h +44 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ConstColorProcessor.cpp +25 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ConstColorProcessor.h +48 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DefaultGeometryProcessor.cpp +37 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DefaultGeometryProcessor.h +58 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DeviceSpaceTextureEffect.cpp +35 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DeviceSpaceTextureEffect.h +46 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DiamondGradientLayout.cpp +31 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DiamondGradientLayout.h +41 -0
- package/cpp/third_party/tgfx/src/gpu/processors/DualIntervalGradientColorizer.h +50 -0
- package/cpp/third_party/tgfx/src/gpu/processors/EllipseGeometryProcessor.cpp +40 -0
- package/cpp/third_party/tgfx/src/gpu/processors/EllipseGeometryProcessor.h +60 -0
- package/cpp/third_party/tgfx/src/gpu/processors/EmptyXferProcessor.cpp +25 -0
- package/cpp/third_party/tgfx/src/gpu/processors/EmptyXferProcessor.h +44 -0
- package/cpp/third_party/tgfx/src/gpu/processors/FragmentProcessor.cpp +213 -0
- package/cpp/third_party/tgfx/src/gpu/processors/FragmentProcessor.h +339 -0
- package/cpp/third_party/tgfx/src/gpu/processors/GaussianBlur1DFragmentProcessor.cpp +35 -0
- package/cpp/third_party/tgfx/src/gpu/processors/GaussianBlur1DFragmentProcessor.h +51 -0
- package/cpp/third_party/tgfx/src/gpu/processors/GeometryProcessor.cpp +109 -0
- package/cpp/third_party/tgfx/src/gpu/processors/GeometryProcessor.h +165 -0
- package/cpp/third_party/tgfx/src/gpu/processors/HairlineLineGeometryProcessor.cpp +40 -0
- package/cpp/third_party/tgfx/src/gpu/processors/HairlineLineGeometryProcessor.h +65 -0
- package/cpp/third_party/tgfx/src/gpu/processors/HairlineQuadGeometryProcessor.cpp +40 -0
- package/cpp/third_party/tgfx/src/gpu/processors/HairlineQuadGeometryProcessor.h +65 -0
- package/cpp/third_party/tgfx/src/gpu/processors/LinearGradientLayout.cpp +31 -0
- package/cpp/third_party/tgfx/src/gpu/processors/LinearGradientLayout.h +41 -0
- package/cpp/third_party/tgfx/src/gpu/processors/LumaFragmentProcessor.cpp +55 -0
- package/cpp/third_party/tgfx/src/gpu/processors/LumaFragmentProcessor.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/processors/MeshGeometryProcessor.cpp +54 -0
- package/cpp/third_party/tgfx/src/gpu/processors/MeshGeometryProcessor.h +59 -0
- package/cpp/third_party/tgfx/src/gpu/processors/NonAARRectGeometryProcessor.cpp +44 -0
- package/cpp/third_party/tgfx/src/gpu/processors/NonAARRectGeometryProcessor.h +61 -0
- package/cpp/third_party/tgfx/src/gpu/processors/PerlinNoiseFragmentProcessor.cpp +62 -0
- package/cpp/third_party/tgfx/src/gpu/processors/PerlinNoiseFragmentProcessor.h +67 -0
- package/cpp/third_party/tgfx/src/gpu/processors/PorterDuffXferProcessor.cpp +33 -0
- package/cpp/third_party/tgfx/src/gpu/processors/PorterDuffXferProcessor.h +49 -0
- package/cpp/third_party/tgfx/src/gpu/processors/Processor.h +54 -0
- package/cpp/third_party/tgfx/src/gpu/processors/QuadPerEdgeAAGeometryProcessor.cpp +53 -0
- package/cpp/third_party/tgfx/src/gpu/processors/QuadPerEdgeAAGeometryProcessor.h +63 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RRectEffect.cpp +32 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RRectEffect.h +82 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RadialGradientLayout.cpp +31 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RadialGradientLayout.h +41 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RectEffect.cpp +32 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RectEffect.h +76 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RoundStrokeRectGeometryProcessor.cpp +49 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RoundStrokeRectGeometryProcessor.h +58 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RuntimeShaderProcessor.cpp +35 -0
- package/cpp/third_party/tgfx/src/gpu/processors/RuntimeShaderProcessor.h +40 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ShapeInstancedGeometryProcessor.cpp +47 -0
- package/cpp/third_party/tgfx/src/gpu/processors/ShapeInstancedGeometryProcessor.h +56 -0
- package/cpp/third_party/tgfx/src/gpu/processors/SingleIntervalGradientColorizer.h +44 -0
- package/cpp/third_party/tgfx/src/gpu/processors/StencilCoverCoverPassGeometryProcessor.cpp +28 -0
- package/cpp/third_party/tgfx/src/gpu/processors/StencilCoverCoverPassGeometryProcessor.h +61 -0
- package/cpp/third_party/tgfx/src/gpu/processors/StencilCoverStencilPassGeometryProcessor.cpp +35 -0
- package/cpp/third_party/tgfx/src/gpu/processors/StencilCoverStencilPassGeometryProcessor.h +62 -0
- package/cpp/third_party/tgfx/src/gpu/processors/TextureEffect.cpp +117 -0
- package/cpp/third_party/tgfx/src/gpu/processors/TextureEffect.h +76 -0
- package/cpp/third_party/tgfx/src/gpu/processors/TextureGradientColorizer.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/processors/TiledTextureEffect.cpp +190 -0
- package/cpp/third_party/tgfx/src/gpu/processors/TiledTextureEffect.h +85 -0
- package/cpp/third_party/tgfx/src/gpu/processors/UnrolledBinaryGradientColorizer.cpp +25 -0
- package/cpp/third_party/tgfx/src/gpu/processors/UnrolledBinaryGradientColorizer.h +72 -0
- package/cpp/third_party/tgfx/src/gpu/processors/XferProcessor.h +64 -0
- package/cpp/third_party/tgfx/src/gpu/processors/XfermodeFragmentProcessor.cpp +65 -0
- package/cpp/third_party/tgfx/src/gpu/processors/XfermodeFragmentProcessor.h +68 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/DefaultTextureProxy.cpp +42 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/DefaultTextureProxy.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/ExternalRenderTargetProxy.h +71 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/ExternalTextureRenderTargetProxy.cpp +40 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/ExternalTextureRenderTargetProxy.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/GPUBufferProxy.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/GPUHairlineProxy.h +61 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/GPUMeshProxy.cpp +102 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/GPUMeshProxy.h +97 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/GPUShapeProxy.h +58 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/HardwareRenderTargetProxy.cpp +43 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/HardwareRenderTargetProxy.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/HardwareTextureProxy.cpp +41 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/HardwareTextureProxy.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/RenderTargetProxy.cpp +91 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/RenderTargetProxy.h +179 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/ResourceProxy.h +63 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/StencilCoverPathProxy.h +60 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/TextureProxy.h +124 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/TextureRenderTargetProxy.cpp +46 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/TextureRenderTargetProxy.h +87 -0
- package/cpp/third_party/tgfx/src/gpu/proxies/VertexBufferView.h +60 -0
- package/cpp/third_party/tgfx/src/gpu/resources/BufferResource.cpp +45 -0
- package/cpp/third_party/tgfx/src/gpu/resources/BufferResource.h +76 -0
- package/cpp/third_party/tgfx/src/gpu/resources/DefaultTextureView.cpp +36 -0
- package/cpp/third_party/tgfx/src/gpu/resources/DefaultTextureView.h +42 -0
- package/cpp/third_party/tgfx/src/gpu/resources/ExternalRenderTarget.cpp +37 -0
- package/cpp/third_party/tgfx/src/gpu/resources/ExternalRenderTarget.h +61 -0
- package/cpp/third_party/tgfx/src/gpu/resources/RenderTarget.h +142 -0
- package/cpp/third_party/tgfx/src/gpu/resources/Resource.cpp +37 -0
- package/cpp/third_party/tgfx/src/gpu/resources/Resource.h +103 -0
- package/cpp/third_party/tgfx/src/gpu/resources/ResourceKey.cpp +210 -0
- package/cpp/third_party/tgfx/src/gpu/resources/ResourceKey.h +222 -0
- package/cpp/third_party/tgfx/src/gpu/resources/TextureRenderTarget.cpp +131 -0
- package/cpp/third_party/tgfx/src/gpu/resources/TextureRenderTarget.h +73 -0
- package/cpp/third_party/tgfx/src/gpu/resources/TextureView.cpp +154 -0
- package/cpp/third_party/tgfx/src/gpu/resources/TextureView.h +235 -0
- package/cpp/third_party/tgfx/src/gpu/resources/YUVTextureView.cpp +132 -0
- package/cpp/third_party/tgfx/src/gpu/resources/YUVTextureView.h +92 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/AtlasUploadTask.cpp +154 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/AtlasUploadTask.h +62 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/GPUBufferUploadTask.cpp +50 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/GPUBufferUploadTask.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/GenerateMipmapsTask.cpp +36 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/GenerateMipmapsTask.h +34 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/HairlineBufferUploadTask.cpp +93 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/HairlineBufferUploadTask.h +49 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/MeshBufferUploadTask.cpp +148 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/MeshBufferUploadTask.h +78 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/OpsRenderTask.cpp +81 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/OpsRenderTask.h +41 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/ReadbackBufferCreateTask.cpp +38 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/ReadbackBufferCreateTask.h +35 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/RenderTargetCopyTask.cpp +48 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/RenderTargetCopyTask.h +38 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/RenderTask.h +37 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/ResourceTask.cpp +40 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/ResourceTask.h +48 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/RuntimeDrawTask.cpp +150 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/RuntimeDrawTask.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/ShapeBufferUploadTask.cpp +63 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/ShapeBufferUploadTask.h +39 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/StencilCoverPathUploadTask.cpp +55 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/StencilCoverPathUploadTask.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/TextureUploadTask.cpp +47 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/TextureUploadTask.h +36 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/TransferPixelsTask.cpp +42 -0
- package/cpp/third_party/tgfx/src/gpu/tasks/TransferPixelsTask.h +38 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanAPI.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanBuffer.cpp +137 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanBuffer.h +66 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCaps.cpp +172 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCaps.h +116 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCommandBuffer.cpp +34 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCommandBuffer.h +68 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCommandEncoder.cpp +361 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCommandEncoder.h +95 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCommandQueue.cpp +393 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanCommandQueue.h +102 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanDefines.h +56 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanDevice.cpp +55 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanDevice.h +24 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanExtensions.cpp +224 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanExtensions.h +93 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanFrameSession.h +96 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanGPU.cpp +970 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanGPU.h +293 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanHardwareTexture.cpp +306 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanHardwareTexture.h +62 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanRenderPass.cpp +551 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanRenderPass.h +115 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanRenderPipeline.cpp +596 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanRenderPipeline.h +108 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanResource.cpp +21 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanResource.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanSampler.cpp +108 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanSampler.h +52 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanSemaphore.cpp +82 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanSemaphore.h +71 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanShaderModule.cpp +65 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanShaderModule.h +54 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanSwapchainProxy.cpp +110 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanSwapchainProxy.h +84 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanTexture.cpp +208 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanTexture.h +90 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanUtil.cpp +236 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanUtil.h +73 -0
- package/cpp/third_party/tgfx/src/gpu/vulkan/VulkanWindow.cpp +764 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUBuffer.cpp +171 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUBuffer.h +72 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCaps.cpp +109 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCaps.h +78 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCommandBuffer.h +45 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCommandEncoder.cpp +223 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCommandEncoder.h +60 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCommandQueue.cpp +104 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUCommandQueue.h +63 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUDefines.h +58 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUDevice.cpp +98 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUDevice.h +24 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUDrawableProxy.cpp +117 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUDrawableProxy.h +58 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUGPU.cpp +294 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUGPU.h +136 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPURenderPass.cpp +305 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPURenderPass.h +97 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPURenderPipeline.cpp +305 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPURenderPipeline.h +72 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUResource.cpp +21 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUResource.h +43 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUSampler.cpp +57 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUSampler.h +47 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUSemaphore.cpp +28 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUSemaphore.h +33 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUShaderModule.cpp +275 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUShaderModule.h +57 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUTexture.cpp +144 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUTexture.h +73 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUUtil.cpp +364 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUUtil.h +72 -0
- package/cpp/third_party/tgfx/src/gpu/webgpu/WebGPUWindow.cpp +156 -0
- package/cpp/third_party/tgfx/src/layers/BackgroundHandler.cpp +363 -0
- package/cpp/third_party/tgfx/src/layers/BackgroundHandler.h +217 -0
- package/cpp/third_party/tgfx/src/layers/BackgroundSnapshotMap.h +102 -0
- package/cpp/third_party/tgfx/src/layers/BackgroundSource.cpp +285 -0
- package/cpp/third_party/tgfx/src/layers/BackgroundSource.h +104 -0
- package/cpp/third_party/tgfx/src/layers/DashEffect.cpp +41 -0
- package/cpp/third_party/tgfx/src/layers/DashEffect.h +33 -0
- package/cpp/third_party/tgfx/src/layers/DisplayList.cpp +1250 -0
- package/cpp/third_party/tgfx/src/layers/DrawArgs.h +76 -0
- package/cpp/third_party/tgfx/src/layers/ImageLayer.cpp +50 -0
- package/cpp/third_party/tgfx/src/layers/Layer.cpp +2257 -0
- package/cpp/third_party/tgfx/src/layers/LayerProperty.cpp +62 -0
- package/cpp/third_party/tgfx/src/layers/LayerRecorder.cpp +405 -0
- package/cpp/third_party/tgfx/src/layers/LayerStyleSource.h +102 -0
- package/cpp/third_party/tgfx/src/layers/MaskContext.cpp +225 -0
- package/cpp/third_party/tgfx/src/layers/MaskContext.h +104 -0
- package/cpp/third_party/tgfx/src/layers/MeshLayer.cpp +88 -0
- package/cpp/third_party/tgfx/src/layers/NoiseDensityUtils.cpp +88 -0
- package/cpp/third_party/tgfx/src/layers/NoiseDensityUtils.h +47 -0
- package/cpp/third_party/tgfx/src/layers/OffscreenRenderer.cpp +265 -0
- package/cpp/third_party/tgfx/src/layers/OffscreenRenderer.h +78 -0
- package/cpp/third_party/tgfx/src/layers/OpaqueContext.cpp +477 -0
- package/cpp/third_party/tgfx/src/layers/OpaqueContext.h +176 -0
- package/cpp/third_party/tgfx/src/layers/OpaqueThreshold.h +23 -0
- package/cpp/third_party/tgfx/src/layers/RegionTransformer.cpp +234 -0
- package/cpp/third_party/tgfx/src/layers/RegionTransformer.h +109 -0
- package/cpp/third_party/tgfx/src/layers/RootLayer.cpp +117 -0
- package/cpp/third_party/tgfx/src/layers/RootLayer.h +91 -0
- package/cpp/third_party/tgfx/src/layers/ShapeLayer.cpp +275 -0
- package/cpp/third_party/tgfx/src/layers/ShapeStyle.cpp +37 -0
- package/cpp/third_party/tgfx/src/layers/SolidLayer.cpp +95 -0
- package/cpp/third_party/tgfx/src/layers/SpreadUtils.cpp +233 -0
- package/cpp/third_party/tgfx/src/layers/SpreadUtils.h +71 -0
- package/cpp/third_party/tgfx/src/layers/SubtreeCache.cpp +90 -0
- package/cpp/third_party/tgfx/src/layers/SubtreeCache.h +62 -0
- package/cpp/third_party/tgfx/src/layers/TextLayer.cpp +498 -0
- package/cpp/third_party/tgfx/src/layers/TileCache.cpp +120 -0
- package/cpp/third_party/tgfx/src/layers/TileCache.h +124 -0
- package/cpp/third_party/tgfx/src/layers/VectorLayer.cpp +159 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/BspTree.cpp +89 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/BspTree.h +112 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Context3DCompositor.cpp +287 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Context3DCompositor.h +121 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/DrawPolygon3D.cpp +269 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/DrawPolygon3D.h +158 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Layer3DContext.cpp +85 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Layer3DContext.h +110 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Opaque3DContext.cpp +114 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Opaque3DContext.h +55 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Render3DContext.cpp +277 -0
- package/cpp/third_party/tgfx/src/layers/compositing3d/Render3DContext.h +87 -0
- package/cpp/third_party/tgfx/src/layers/contents/ComposeContent.cpp +109 -0
- package/cpp/third_party/tgfx/src/layers/contents/ComposeContent.h +57 -0
- package/cpp/third_party/tgfx/src/layers/contents/DrawContent.cpp +127 -0
- package/cpp/third_party/tgfx/src/layers/contents/DrawContent.h +70 -0
- package/cpp/third_party/tgfx/src/layers/contents/GeometryContent.h +44 -0
- package/cpp/third_party/tgfx/src/layers/contents/LayerContent.h +107 -0
- package/cpp/third_party/tgfx/src/layers/contents/MatrixContent.cpp +86 -0
- package/cpp/third_party/tgfx/src/layers/contents/MatrixContent.h +53 -0
- package/cpp/third_party/tgfx/src/layers/contents/MeshContent.cpp +48 -0
- package/cpp/third_party/tgfx/src/layers/contents/MeshContent.h +45 -0
- package/cpp/third_party/tgfx/src/layers/contents/PathContent.cpp +76 -0
- package/cpp/third_party/tgfx/src/layers/contents/PathContent.h +49 -0
- package/cpp/third_party/tgfx/src/layers/contents/RRectContent.cpp +66 -0
- package/cpp/third_party/tgfx/src/layers/contents/RRectContent.h +48 -0
- package/cpp/third_party/tgfx/src/layers/contents/RRectsContent.cpp +97 -0
- package/cpp/third_party/tgfx/src/layers/contents/RRectsContent.h +49 -0
- package/cpp/third_party/tgfx/src/layers/contents/RectContent.cpp +67 -0
- package/cpp/third_party/tgfx/src/layers/contents/RectContent.h +48 -0
- package/cpp/third_party/tgfx/src/layers/contents/RectsContent.cpp +94 -0
- package/cpp/third_party/tgfx/src/layers/contents/RectsContent.h +48 -0
- package/cpp/third_party/tgfx/src/layers/contents/ShapeContent.cpp +193 -0
- package/cpp/third_party/tgfx/src/layers/contents/ShapeContent.h +81 -0
- package/cpp/third_party/tgfx/src/layers/contents/TextContent.cpp +56 -0
- package/cpp/third_party/tgfx/src/layers/contents/TextContent.h +46 -0
- package/cpp/third_party/tgfx/src/layers/filters/BlendFilter.cpp +51 -0
- package/cpp/third_party/tgfx/src/layers/filters/BlurFilter.cpp +60 -0
- package/cpp/third_party/tgfx/src/layers/filters/ColorMatrixFilter.cpp +43 -0
- package/cpp/third_party/tgfx/src/layers/filters/DropShadowFilter.cpp +92 -0
- package/cpp/third_party/tgfx/src/layers/filters/InnerShadowFilter.cpp +93 -0
- package/cpp/third_party/tgfx/src/layers/filters/LayerFilter.cpp +43 -0
- package/cpp/third_party/tgfx/src/layers/filters/LayerImageFilter.cpp +56 -0
- package/cpp/third_party/tgfx/src/layers/filters/NoiseFilter.cpp +356 -0
- package/cpp/third_party/tgfx/src/layers/imagefilters/GlassRefractionImageFilter.cpp +81 -0
- package/cpp/third_party/tgfx/src/layers/imagefilters/GlassRefractionImageFilter.h +48 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/BackgroundBlurStyle.cpp +103 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/DropShadowStyle.cpp +180 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/GlassStyle.cpp +413 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/InnerShadowStyle.cpp +219 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/LayerStyle.cpp +42 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/NoiseStyle.cpp +280 -0
- package/cpp/third_party/tgfx/src/layers/layerstyles/StyledShape.cpp +51 -0
- package/cpp/third_party/tgfx/src/layers/processors/GLSLGlassRefractionFragmentProcessor.cpp +282 -0
- package/cpp/third_party/tgfx/src/layers/processors/GLSLGlassRefractionFragmentProcessor.h +39 -0
- package/cpp/third_party/tgfx/src/layers/processors/GLSLTentBlur1DFragmentProcessor.cpp +134 -0
- package/cpp/third_party/tgfx/src/layers/processors/GLSLTentBlur1DFragmentProcessor.h +37 -0
- package/cpp/third_party/tgfx/src/layers/processors/GlassRefractionFragmentProcessor.cpp +78 -0
- package/cpp/third_party/tgfx/src/layers/processors/GlassRefractionFragmentProcessor.h +94 -0
- package/cpp/third_party/tgfx/src/layers/processors/TentBlur1DFragmentProcessor.cpp +37 -0
- package/cpp/third_party/tgfx/src/layers/processors/TentBlur1DFragmentProcessor.h +54 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Ellipse.cpp +81 -0
- package/cpp/third_party/tgfx/src/layers/vectors/FillStyle.cpp +173 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Geometry.cpp +304 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Geometry.h +142 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Gradient.cpp +196 -0
- package/cpp/third_party/tgfx/src/layers/vectors/ImagePattern.cpp +147 -0
- package/cpp/third_party/tgfx/src/layers/vectors/MergePath.cpp +78 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Painter.cpp +112 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Painter.h +158 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Polystar.cpp +285 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Rectangle.cpp +101 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Repeater.cpp +174 -0
- package/cpp/third_party/tgfx/src/layers/vectors/RoundCorner.cpp +56 -0
- package/cpp/third_party/tgfx/src/layers/vectors/ShapePath.cpp +68 -0
- package/cpp/third_party/tgfx/src/layers/vectors/SolidColor.cpp +37 -0
- package/cpp/third_party/tgfx/src/layers/vectors/StrokeStyle.cpp +260 -0
- package/cpp/third_party/tgfx/src/layers/vectors/Text.cpp +77 -0
- package/cpp/third_party/tgfx/src/layers/vectors/TextModifier.cpp +256 -0
- package/cpp/third_party/tgfx/src/layers/vectors/TextPath.cpp +258 -0
- package/cpp/third_party/tgfx/src/layers/vectors/TextSelector.cpp +493 -0
- package/cpp/third_party/tgfx/src/layers/vectors/TrimPath.cpp +194 -0
- package/cpp/third_party/tgfx/src/layers/vectors/VectorContext.cpp +80 -0
- package/cpp/third_party/tgfx/src/layers/vectors/VectorContext.h +73 -0
- package/cpp/third_party/tgfx/src/layers/vectors/VectorElement.cpp +31 -0
- package/cpp/third_party/tgfx/src/layers/vectors/VectorGroup.cpp +188 -0
- package/cpp/third_party/tgfx/src/pdf/DeflateStream.cpp +133 -0
- package/cpp/third_party/tgfx/src/pdf/DeflateStream.h +42 -0
- package/cpp/third_party/tgfx/src/pdf/PDFBitmap.cpp +414 -0
- package/cpp/third_party/tgfx/src/pdf/PDFBitmap.h +39 -0
- package/cpp/third_party/tgfx/src/pdf/PDFDocumentImpl.cpp +517 -0
- package/cpp/third_party/tgfx/src/pdf/PDFDocumentImpl.h +208 -0
- package/cpp/third_party/tgfx/src/pdf/PDFExportContext.cpp +1490 -0
- package/cpp/third_party/tgfx/src/pdf/PDFExportContext.h +188 -0
- package/cpp/third_party/tgfx/src/pdf/PDFFont.cpp +582 -0
- package/cpp/third_party/tgfx/src/pdf/PDFFont.h +183 -0
- package/cpp/third_party/tgfx/src/pdf/PDFFormXObject.cpp +54 -0
- package/cpp/third_party/tgfx/src/pdf/PDFFormXObject.h +33 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGlyphUse.h +89 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGradientShader.cpp +1009 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGradientShader.h +44 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGraphicStackState.cpp +175 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGraphicStackState.h +65 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGraphicState.cpp +91 -0
- package/cpp/third_party/tgfx/src/pdf/PDFGraphicState.h +75 -0
- package/cpp/third_party/tgfx/src/pdf/PDFMetadata.cpp +109 -0
- package/cpp/third_party/tgfx/src/pdf/PDFMetadataUtils.cpp +334 -0
- package/cpp/third_party/tgfx/src/pdf/PDFMetadataUtils.h +39 -0
- package/cpp/third_party/tgfx/src/pdf/PDFResourceDictionary.cpp +83 -0
- package/cpp/third_party/tgfx/src/pdf/PDFResourceDictionary.h +42 -0
- package/cpp/third_party/tgfx/src/pdf/PDFShader.cpp +392 -0
- package/cpp/third_party/tgfx/src/pdf/PDFShader.h +46 -0
- package/cpp/third_party/tgfx/src/pdf/PDFTag.cpp +441 -0
- package/cpp/third_party/tgfx/src/pdf/PDFTag.h +158 -0
- package/cpp/third_party/tgfx/src/pdf/PDFTypes.cpp +351 -0
- package/cpp/third_party/tgfx/src/pdf/PDFTypes.h +174 -0
- package/cpp/third_party/tgfx/src/pdf/PDFUnion.cpp +324 -0
- package/cpp/third_party/tgfx/src/pdf/PDFUnion.h +104 -0
- package/cpp/third_party/tgfx/src/pdf/PDFUtils.cpp +437 -0
- package/cpp/third_party/tgfx/src/pdf/PDFUtils.h +100 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFMakeCIDGlyphWidthsArray.cpp +203 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFMakeCIDGlyphWidthsArray.h +36 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFMakeToUnicodeCmap.cpp +221 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFMakeToUnicodeCmap.h +32 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFSubsetFont.cpp +128 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFSubsetFont.h +30 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFType1Font.cpp +339 -0
- package/cpp/third_party/tgfx/src/pdf/fontSubset/PDFType1Font.h +28 -0
- package/cpp/third_party/tgfx/src/platform/ImageReader.cpp +124 -0
- package/cpp/third_party/tgfx/src/platform/ImageStream.h +78 -0
- package/cpp/third_party/tgfx/src/platform/Print.cpp +43 -0
- package/cpp/third_party/tgfx/src/platform/android/AHardwareBufferFunctions.cpp +55 -0
- package/cpp/third_party/tgfx/src/platform/android/AHardwareBufferFunctions.h +53 -0
- package/cpp/third_party/tgfx/src/platform/android/AndroidBitmap.cpp +133 -0
- package/cpp/third_party/tgfx/src/platform/android/GlyphRenderer.cpp +437 -0
- package/cpp/third_party/tgfx/src/platform/android/GlyphRenderer.h +92 -0
- package/cpp/third_party/tgfx/src/platform/android/HandlerThread.cpp +69 -0
- package/cpp/third_party/tgfx/src/platform/android/HandlerThread.h +43 -0
- package/cpp/third_party/tgfx/src/platform/android/HardwareBuffer.cpp +127 -0
- package/cpp/third_party/tgfx/src/platform/android/JNIEnvironment.cpp +94 -0
- package/cpp/third_party/tgfx/src/platform/android/JNIInit.cpp +49 -0
- package/cpp/third_party/tgfx/src/platform/android/JNIInit.h +26 -0
- package/cpp/third_party/tgfx/src/platform/android/JNIUtil.cpp +38 -0
- package/cpp/third_party/tgfx/src/platform/android/JNIUtil.h +32 -0
- package/cpp/third_party/tgfx/src/platform/android/NativeCodec.cpp +415 -0
- package/cpp/third_party/tgfx/src/platform/android/NativeCodec.h +52 -0
- package/cpp/third_party/tgfx/src/platform/android/NativeImageBuffer.cpp +70 -0
- package/cpp/third_party/tgfx/src/platform/android/NativeImageBuffer.h +59 -0
- package/cpp/third_party/tgfx/src/platform/android/Print.cpp +38 -0
- package/cpp/third_party/tgfx/src/platform/android/SurfaceTexture.cpp +309 -0
- package/cpp/third_party/tgfx/src/platform/android/SurfaceTexture.h +84 -0
- package/cpp/third_party/tgfx/src/platform/android/SurfaceTextureReader.cpp +71 -0
- package/cpp/third_party/tgfx/src/platform/apple/BitmapContextUtil.h +26 -0
- package/cpp/third_party/tgfx/src/platform/apple/BitmapContextUtil.mm +63 -0
- package/cpp/third_party/tgfx/src/platform/apple/CGColorSpaceUtil.h +29 -0
- package/cpp/third_party/tgfx/src/platform/apple/CGColorSpaceUtil.mm +46 -0
- package/cpp/third_party/tgfx/src/platform/apple/CTTypeface.mm +44 -0
- package/cpp/third_party/tgfx/src/platform/apple/HardwareBuffer.mm +102 -0
- package/cpp/third_party/tgfx/src/platform/apple/NativeCodec.h +43 -0
- package/cpp/third_party/tgfx/src/platform/apple/NativeCodec.mm +197 -0
- package/cpp/third_party/tgfx/src/platform/mock/HardwareBuffer.cpp +47 -0
- package/cpp/third_party/tgfx/src/platform/mock/NativeCodec.cpp +33 -0
- package/cpp/third_party/tgfx/src/platform/ohos/HardwareBuffer.cpp +99 -0
- package/cpp/third_party/tgfx/src/platform/ohos/NativeCodec.cpp +230 -0
- package/cpp/third_party/tgfx/src/platform/ohos/NativeCodec.h +49 -0
- package/cpp/third_party/tgfx/src/platform/ohos/OHOSImageInfo.cpp +85 -0
- package/cpp/third_party/tgfx/src/platform/ohos/OHOSImageInfo.h +52 -0
- package/cpp/third_party/tgfx/src/platform/ohos/OHOSPixelMap.cpp +66 -0
- package/cpp/third_party/tgfx/src/platform/ohos/Print.cpp +45 -0
- package/cpp/third_party/tgfx/src/platform/web/HardwareBuffer.cpp +51 -0
- package/cpp/third_party/tgfx/src/platform/web/NativeCodec.cpp +113 -0
- package/cpp/third_party/tgfx/src/platform/web/NativeCodec.h +45 -0
- package/cpp/third_party/tgfx/src/platform/web/ReadPixelsFromCanvasImage.cpp +54 -0
- package/cpp/third_party/tgfx/src/platform/web/ReadPixelsFromCanvasImage.h +31 -0
- package/cpp/third_party/tgfx/src/platform/web/TGFXWasmBindings.cpp +79 -0
- package/cpp/third_party/tgfx/src/platform/web/TGFXWasmBindings.h +23 -0
- package/cpp/third_party/tgfx/src/platform/web/VideoElement.cpp +84 -0
- package/cpp/third_party/tgfx/src/platform/web/VideoElement.h +51 -0
- package/cpp/third_party/tgfx/src/platform/web/VideoElementReader.cpp +42 -0
- package/cpp/third_party/tgfx/src/platform/web/WebAtlasUploadTask.cpp +67 -0
- package/cpp/third_party/tgfx/src/platform/web/WebAtlasUploadTask.h +31 -0
- package/cpp/third_party/tgfx/src/platform/web/WebGlyphRasterizer.cpp +47 -0
- package/cpp/third_party/tgfx/src/platform/web/WebGlyphRasterizer.h +35 -0
- package/cpp/third_party/tgfx/src/platform/web/WebImageBuffer.cpp +185 -0
- package/cpp/third_party/tgfx/src/platform/web/WebImageBuffer.h +85 -0
- package/cpp/third_party/tgfx/src/platform/web/WebImageInfo.cpp +134 -0
- package/cpp/third_party/tgfx/src/platform/web/WebImageInfo.h +33 -0
- package/cpp/third_party/tgfx/src/platform/web/WebPathRasterizer.cpp +108 -0
- package/cpp/third_party/tgfx/src/platform/web/WebPathRasterizer.h +35 -0
- package/cpp/third_party/tgfx/src/platform/web/WebScalerContext.cpp +118 -0
- package/cpp/third_party/tgfx/src/platform/web/WebScalerContext.h +62 -0
- package/cpp/third_party/tgfx/src/platform/web/WebTypeface.cpp +146 -0
- package/cpp/third_party/tgfx/src/platform/web/WebTypeface.h +97 -0
- package/cpp/third_party/tgfx/src/platform/win/D3D11Defines.h +129 -0
- package/cpp/third_party/tgfx/src/platform/win/D3D11Util.cpp +69 -0
- package/cpp/third_party/tgfx/src/platform/win/D3D11Util.h +47 -0
- package/cpp/third_party/tgfx/src/platform/win/HardwareBuffer.cpp +215 -0
- package/cpp/third_party/tgfx/src/platform/win/NativeCodec.cpp +351 -0
- package/cpp/third_party/tgfx/src/platform/win/NativeCodec.h +47 -0
- package/cpp/third_party/tgfx/src/svg/ElementWriter.cpp +1569 -0
- package/cpp/third_party/tgfx/src/svg/ElementWriter.h +199 -0
- package/cpp/third_party/tgfx/src/svg/ResourceStore.h +82 -0
- package/cpp/third_party/tgfx/src/svg/SVGAttribute.cpp +63 -0
- package/cpp/third_party/tgfx/src/svg/SVGAttributeParser.cpp +1293 -0
- package/cpp/third_party/tgfx/src/svg/SVGAttributeParser.h +182 -0
- package/cpp/third_party/tgfx/src/svg/SVGDOM.cpp +126 -0
- package/cpp/third_party/tgfx/src/svg/SVGExportContext.cpp +894 -0
- package/cpp/third_party/tgfx/src/svg/SVGExportContext.h +169 -0
- package/cpp/third_party/tgfx/src/svg/SVGExporter.cpp +76 -0
- package/cpp/third_party/tgfx/src/svg/SVGFilterContext.cpp +132 -0
- package/cpp/third_party/tgfx/src/svg/SVGFilterContext.h +86 -0
- package/cpp/third_party/tgfx/src/svg/SVGLengthContext.cpp +124 -0
- package/cpp/third_party/tgfx/src/svg/SVGNodeConstructor.cpp +490 -0
- package/cpp/third_party/tgfx/src/svg/SVGNodeConstructor.h +94 -0
- package/cpp/third_party/tgfx/src/svg/SVGParseColor.cpp +363 -0
- package/cpp/third_party/tgfx/src/svg/SVGPathParser.cpp +292 -0
- package/cpp/third_party/tgfx/src/svg/SVGRenderContext.cpp +505 -0
- package/cpp/third_party/tgfx/src/svg/SVGRenderContext.h +250 -0
- package/cpp/third_party/tgfx/src/svg/SVGTextBuilder.cpp +112 -0
- package/cpp/third_party/tgfx/src/svg/SVGTextBuilder.h +43 -0
- package/cpp/third_party/tgfx/src/svg/SVGUtils.cpp +508 -0
- package/cpp/third_party/tgfx/src/svg/SVGUtils.h +89 -0
- package/cpp/third_party/tgfx/src/svg/TextShaper.cpp +119 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGCircle.cpp +86 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGClipPath.cpp +47 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGContainer.cpp +74 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGEllipse.cpp +79 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFe.cpp +145 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeBlend.cpp +55 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeColorMatrix.cpp +159 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeComponentTransfer.cpp +140 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeComposite.cpp +78 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeDisplacementMap.cpp +64 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeGaussianBlur.cpp +54 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeImage.cpp +36 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeLightSource.cpp +50 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeLighting.cpp +60 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeMerge.cpp +53 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeMorphology.cpp +60 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeOffset.cpp +37 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFeTurbulence.cpp +100 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGFilter.cpp +219 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGGradient.cpp +117 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGImage.cpp +126 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGLine.cpp +82 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGLinearGradient.cpp +56 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGMask.cpp +80 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGNode.cpp +201 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGPath.cpp +84 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGPattern.cpp +161 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGPoly.cpp +83 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGRadialGradient.cpp +63 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGRect.cpp +104 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGRoot.cpp +133 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGShape.cpp +59 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGStop.cpp +31 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGText.cpp +190 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGTransformableNode.cpp +71 -0
- package/cpp/third_party/tgfx/src/svg/node/SVGUse.cpp +90 -0
- package/cpp/third_party/tgfx/src/svg/xml/DOMParser.cpp +107 -0
- package/cpp/third_party/tgfx/src/svg/xml/DOMParser.h +62 -0
- package/cpp/third_party/tgfx/src/svg/xml/XMLDOM.cpp +156 -0
- package/cpp/third_party/tgfx/src/svg/xml/XMLParser.cpp +187 -0
- package/cpp/third_party/tgfx/src/svg/xml/XMLParser.h +59 -0
- package/cpp/third_party/tgfx/src/svg/xml/XMLWriter.cpp +289 -0
- package/cpp/third_party/tgfx/src/svg/xml/XMLWriter.h +132 -0
- package/cpp/third_party/tgfx/vendor.json +434 -0
- package/ios/HybridTgfxView.swift +95 -0
- package/ios/TgfxMetalView.h +42 -0
- package/ios/TgfxMetalView.mm +267 -0
- package/ios/libs/libtgfx.xcframework/Info.plist +43 -0
- package/ios/libs/libtgfx.xcframework/ios-arm64/libtgfx-ios.a +0 -0
- package/ios/libs/libtgfx.xcframework/ios-arm64-simulator/libtgfx-ios.a +0 -0
- package/lib/compiler/colors.d.ts +26 -0
- package/lib/compiler/colors.js +364 -0
- package/lib/compiler/compile.d.ts +17 -0
- package/lib/compiler/compile.js +474 -0
- package/lib/compiler/filters.d.ts +43 -0
- package/lib/compiler/filters.js +98 -0
- package/lib/compiler/image.d.ts +31 -0
- package/lib/compiler/image.js +71 -0
- package/lib/compiler/paint.d.ts +65 -0
- package/lib/compiler/paint.js +207 -0
- package/lib/compiler/sksl.d.ts +10 -0
- package/lib/compiler/sksl.js +180 -0
- package/lib/compiler/text.d.ts +37 -0
- package/lib/compiler/text.js +77 -0
- package/lib/compiler/transform.d.ts +34 -0
- package/lib/compiler/transform.js +11 -0
- package/lib/compiler/values.d.ts +22 -0
- package/lib/compiler/values.js +22 -0
- package/lib/compiler/writer.d.ts +70 -0
- package/lib/compiler/writer.js +142 -0
- package/lib/components/Canvas.d.ts +10 -0
- package/lib/components/Canvas.js +139 -0
- package/lib/components/Group.d.ts +7 -0
- package/lib/components/Group.js +6 -0
- package/lib/components/Paint.d.ts +45 -0
- package/lib/components/Paint.js +44 -0
- package/lib/components/drawings.d.ts +56 -0
- package/lib/components/drawings.js +55 -0
- package/lib/hooks/source.d.ts +18 -0
- package/lib/hooks/source.js +47 -0
- package/lib/hooks/useCameraFrame.d.ts +94 -0
- package/lib/hooks/useCameraFrame.js +139 -0
- package/lib/hooks/useClock.d.ts +13 -0
- package/lib/hooks/useClock.js +27 -0
- package/lib/hooks/useFonts.d.ts +81 -0
- package/lib/hooks/useFonts.js +117 -0
- package/lib/hooks/useImage.d.ts +70 -0
- package/lib/hooks/useImage.js +116 -0
- package/lib/imperative.d.ts +59 -0
- package/lib/imperative.js +582 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.js +11 -0
- package/lib/reanimated/AnimationDriver.d.ts +9 -0
- package/lib/reanimated/AnimationDriver.js +24 -0
- package/lib/reanimated/liveValue.d.ts +28 -0
- package/lib/reanimated/liveValue.js +44 -0
- package/lib/reanimated/moduleNotFound.d.ts +2 -0
- package/lib/reanimated/moduleNotFound.js +13 -0
- package/lib/reanimated/peer.d.ts +40 -0
- package/lib/reanimated/peer.js +55 -0
- package/lib/reanimated/slotFlags.d.ts +16 -0
- package/lib/reanimated/slotFlags.js +50 -0
- package/lib/reconciler/Container.d.ts +24 -0
- package/lib/reconciler/Container.js +56 -0
- package/lib/reconciler/Reconciler.d.ts +14 -0
- package/lib/reconciler/Reconciler.js +159 -0
- package/lib/reconciler/directNodes.d.ts +19 -0
- package/lib/reconciler/directNodes.js +68 -0
- package/lib/reconciler/types.d.ts +43 -0
- package/lib/reconciler/types.js +38 -0
- package/lib/specs/TgfxFonts.nitro.d.ts +92 -0
- package/lib/specs/TgfxFonts.nitro.js +1 -0
- package/lib/specs/TgfxImage.nitro.d.ts +85 -0
- package/lib/specs/TgfxImage.nitro.js +1 -0
- package/lib/specs/TgfxSlots.nitro.d.ts +44 -0
- package/lib/specs/TgfxSlots.nitro.js +1 -0
- package/lib/specs/TgfxView.nitro.d.ts +98 -0
- package/lib/specs/TgfxView.nitro.js +1 -0
- package/lib/types.d.ts +399 -0
- package/lib/types.js +1 -0
- package/lib/views/TgfxNativeView.d.ts +9 -0
- package/lib/views/TgfxNativeView.js +8 -0
- package/nitro.json +48 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroTgfx+autolinking.cmake +88 -0
- package/nitrogen/generated/android/NitroTgfx+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroTgfxOnLoad.cpp +86 -0
- package/nitrogen/generated/android/NitroTgfxOnLoad.hpp +34 -0
- package/nitrogen/generated/android/c++/JHybridTgfxViewSpec.cpp +135 -0
- package/nitrogen/generated/android/c++/JHybridTgfxViewSpec.hpp +70 -0
- package/nitrogen/generated/android/c++/JNativeSnapshot.hpp +71 -0
- package/nitrogen/generated/android/c++/JNativeSnapshotOptions.hpp +81 -0
- package/nitrogen/generated/android/c++/views/JHybridTgfxViewStateUpdater.cpp +60 -0
- package/nitrogen/generated/android/c++/views/JHybridTgfxViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/tgfx/HybridTgfxViewSpec.kt +83 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/tgfx/NativeSnapshot.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/tgfx/NativeSnapshotOptions.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/tgfx/NitroTgfxOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/tgfx/views/HybridTgfxViewManager.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/tgfx/views/HybridTgfxViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/NitroTgfx+autolinking.rb +62 -0
- package/nitrogen/generated/ios/NitroTgfx-Swift-Cxx-Bridge.cpp +57 -0
- package/nitrogen/generated/ios/NitroTgfx-Swift-Cxx-Bridge.hpp +193 -0
- package/nitrogen/generated/ios/NitroTgfx-Swift-Cxx-Umbrella.hpp +53 -0
- package/nitrogen/generated/ios/NitroTgfxAutolinking.mm +63 -0
- package/nitrogen/generated/ios/NitroTgfxAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridTgfxViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridTgfxViewSpecSwift.hpp +130 -0
- package/nitrogen/generated/ios/c++/views/HybridTgfxViewComponent.mm +127 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_NativeSnapshot.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridTgfxViewSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridTgfxViewSpec_cxx.swift +238 -0
- package/nitrogen/generated/ios/swift/NativeSnapshot.swift +44 -0
- package/nitrogen/generated/ios/swift/NativeSnapshotOptions.swift +59 -0
- package/nitrogen/generated/shared/c++/HybridTgfxFontsSpec.cpp +27 -0
- package/nitrogen/generated/shared/c++/HybridTgfxFontsSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridTgfxImageFactorySpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridTgfxImageFactorySpec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridTgfxImageSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridTgfxImageSpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridTgfxSlotsFactorySpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridTgfxSlotsFactorySpec.hpp +64 -0
- package/nitrogen/generated/shared/c++/HybridTgfxSlotsSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridTgfxSlotsSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/HybridTgfxViewSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridTgfxViewSpec.hpp +77 -0
- package/nitrogen/generated/shared/c++/LineMeasurement.hpp +107 -0
- package/nitrogen/generated/shared/c++/NativeSnapshot.hpp +96 -0
- package/nitrogen/generated/shared/c++/NativeSnapshotOptions.hpp +107 -0
- package/nitrogen/generated/shared/c++/PixelFormat.hpp +100 -0
- package/nitrogen/generated/shared/c++/TextLayoutStyle.hpp +119 -0
- package/nitrogen/generated/shared/c++/TextMeasurement.hpp +105 -0
- package/nitrogen/generated/shared/c++/views/HybridTgfxViewComponent.cpp +94 -0
- package/nitrogen/generated/shared/c++/views/HybridTgfxViewComponent.hpp +111 -0
- package/nitrogen/generated/shared/json/TgfxViewConfig.json +11 -0
- package/package.json +144 -8
- package/react-native.config.js +16 -0
- package/scripts/build-tgfx-ios.sh +60 -0
- package/src/compiler/colors.test.ts +195 -0
- package/src/compiler/colors.ts +402 -0
- package/src/compiler/compile.test.ts +971 -0
- package/src/compiler/compile.ts +565 -0
- package/src/compiler/filters.ts +140 -0
- package/src/compiler/image.ts +109 -0
- package/src/compiler/paint.ts +321 -0
- package/src/compiler/sceneHash.test.ts +70 -0
- package/src/compiler/sksl.test.ts +219 -0
- package/src/compiler/sksl.ts +218 -0
- package/src/compiler/stringTable.test.ts +136 -0
- package/src/compiler/svgPath.test.ts +147 -0
- package/src/compiler/text.ts +97 -0
- package/src/compiler/transform.ts +34 -0
- package/src/compiler/values.ts +44 -0
- package/src/compiler/writer.ts +159 -0
- package/src/components/Canvas.test.tsx +735 -0
- package/src/components/Canvas.tsx +199 -0
- package/src/components/Group.ts +9 -0
- package/src/components/Paint.ts +77 -0
- package/src/components/drawings.ts +86 -0
- package/src/hooks/source.ts +64 -0
- package/src/hooks/useCameraFrame.test.tsx +286 -0
- package/src/hooks/useCameraFrame.ts +222 -0
- package/src/hooks/useClock.test.ts +50 -0
- package/src/hooks/useClock.ts +36 -0
- package/src/hooks/useFonts.test.tsx +186 -0
- package/src/hooks/useFonts.ts +163 -0
- package/src/hooks/useImage.test.tsx +236 -0
- package/src/hooks/useImage.ts +143 -0
- package/src/imperative.ts +697 -0
- package/src/index.ts +125 -0
- package/src/reanimated/AnimationDriver.test.ts +12 -0
- package/src/reanimated/AnimationDriver.tsx +34 -0
- package/src/reanimated/liveValue.ts +53 -0
- package/src/reanimated/moduleNotFound.test.ts +54 -0
- package/src/reanimated/moduleNotFound.ts +16 -0
- package/src/reanimated/peer.ts +92 -0
- package/src/reanimated/slotFlags.ts +73 -0
- package/src/reconciler/Container.ts +78 -0
- package/src/reconciler/Reconciler.test.ts +28 -0
- package/src/reconciler/Reconciler.ts +210 -0
- package/src/reconciler/directNodes.test.tsx +150 -0
- package/src/reconciler/directNodes.ts +73 -0
- package/src/reconciler/types.ts +51 -0
- package/src/specs/TgfxFonts.nitro.ts +102 -0
- package/src/specs/TgfxImage.nitro.ts +106 -0
- package/src/specs/TgfxSlots.nitro.ts +46 -0
- package/src/specs/TgfxView.nitro.ts +112 -0
- package/src/testing/cppHarness.ts +116 -0
- package/src/testing/nativeMocks.ts +21 -0
- package/src/types.ts +441 -0
- package/src/views/TgfxNativeView.ts +15 -0
- package/src/views/idleGate.test.ts +58 -0
|
@@ -0,0 +1,1198 @@
|
|
|
1
|
+
/////////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
//
|
|
3
|
+
// Tencent is pleased to support the open source community by making tgfx available.
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) 2025 Tencent. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
|
|
8
|
+
// in compliance with the License. You may obtain a copy of the License at
|
|
9
|
+
//
|
|
10
|
+
// https://opensource.org/licenses/BSD-3-Clause
|
|
11
|
+
//
|
|
12
|
+
// unless required by applicable law or agreed to in writing, software distributed under the
|
|
13
|
+
// license is distributed on an "as is" basis, without warranties or conditions of any kind,
|
|
14
|
+
// either express or implied. see the license for the specific language governing permissions
|
|
15
|
+
// and limitations under the license.
|
|
16
|
+
//
|
|
17
|
+
/////////////////////////////////////////////////////////////////////////////////////////////////
|
|
18
|
+
|
|
19
|
+
#include "OpsCompositor.h"
|
|
20
|
+
#include "core/MeshBase.h"
|
|
21
|
+
#include "core/PathRef.h"
|
|
22
|
+
#include "core/VertexMesh.h"
|
|
23
|
+
#include "core/utils/ColorHelper.h"
|
|
24
|
+
#include "core/utils/ColorSpaceHelper.h"
|
|
25
|
+
#include "core/utils/GeometryExtra.h"
|
|
26
|
+
#include "core/utils/MathExtra.h"
|
|
27
|
+
#include "core/utils/RectToRectMatrix.h"
|
|
28
|
+
#include "core/utils/StrokeUtils.h"
|
|
29
|
+
#include "core/utils/USE.h"
|
|
30
|
+
#include "gpu/DrawingManager.h"
|
|
31
|
+
#include "gpu/ProxyProvider.h"
|
|
32
|
+
#include "gpu/ops/AtlasTextOp.h"
|
|
33
|
+
#include "gpu/ops/HairlineLineOp.h"
|
|
34
|
+
#include "gpu/ops/HairlineQuadOp.h"
|
|
35
|
+
#include "gpu/ops/MeshDrawOp.h"
|
|
36
|
+
#include "gpu/ops/ShapeDrawOp.h"
|
|
37
|
+
#include "gpu/ops/ShapeInstancedDrawOp.h"
|
|
38
|
+
#include "gpu/ops/StencilCoverPathDrawOp.h"
|
|
39
|
+
#include "gpu/processors/DeviceSpaceTextureEffect.h"
|
|
40
|
+
#include "gpu/processors/RRectEffect.h"
|
|
41
|
+
#include "gpu/processors/RectEffect.h"
|
|
42
|
+
#include "processors/ColorSpaceXFormEffect.h"
|
|
43
|
+
#include "processors/PorterDuffXferProcessor.h"
|
|
44
|
+
#include "processors/XfermodeFragmentProcessor.h"
|
|
45
|
+
#include "tgfx/gpu/GPU.h"
|
|
46
|
+
|
|
47
|
+
namespace tgfx {
|
|
48
|
+
|
|
49
|
+
static bool HasDifferentViewMatrix(const std::vector<PlacementPtr<RectRecord>>& rects) {
|
|
50
|
+
if (rects.size() <= 1) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
auto& firstMatrix = rects.front()->viewMatrix;
|
|
54
|
+
for (auto& record : rects) {
|
|
55
|
+
if (record->viewMatrix != firstMatrix) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
OpsCompositor::OpsCompositor(std::shared_ptr<RenderTargetProxy> proxy, uint32_t renderFlags,
|
|
63
|
+
std::optional<PMColor> clearColor,
|
|
64
|
+
std::shared_ptr<ColorSpace> colorSpace)
|
|
65
|
+
: context(proxy->getContext()), renderTarget(std::move(proxy)), renderFlags(renderFlags),
|
|
66
|
+
clearColor(clearColor), dstColorSpace(std::move(colorSpace)) {
|
|
67
|
+
DEBUG_ASSERT(renderTarget != nullptr);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
void OpsCompositor::fillImage(std::shared_ptr<Image> image, const SamplingOptions& sampling,
|
|
71
|
+
const Matrix& matrix, const ClipStack& clip, const Brush& brush) {
|
|
72
|
+
DEBUG_ASSERT(image != nullptr);
|
|
73
|
+
auto imageRect = Rect::MakeWH(image->width(), image->height());
|
|
74
|
+
if (!canAppend(PendingOpType::Image, clip, brush) || pendingImage != image ||
|
|
75
|
+
pendingSampling != sampling || pendingConstraint != SrcRectConstraint::Fast) {
|
|
76
|
+
flushPendingOps(PendingOpType::Image, clip, brush);
|
|
77
|
+
pendingImage = std::move(image);
|
|
78
|
+
pendingSampling = sampling;
|
|
79
|
+
pendingConstraint = SrcRectConstraint::Fast;
|
|
80
|
+
}
|
|
81
|
+
auto record = drawingAllocator()->make<RectRecord>(imageRect, matrix, brush.color);
|
|
82
|
+
pendingRects.emplace_back(std::move(record));
|
|
83
|
+
pendingUVRects.emplace_back(drawingAllocator()->make<Rect>(imageRect));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
void OpsCompositor::fillImageRect(std::shared_ptr<Image> image, const Rect& srcRect,
|
|
87
|
+
const Rect& dstRect, const SamplingOptions& sampling,
|
|
88
|
+
const Matrix& matrix, const ClipStack& clip, const Brush& brush,
|
|
89
|
+
SrcRectConstraint constraint, const Rect* strictRect) {
|
|
90
|
+
DEBUG_ASSERT(image != nullptr);
|
|
91
|
+
DEBUG_ASSERT(!srcRect.isEmpty());
|
|
92
|
+
DEBUG_ASSERT(!dstRect.isEmpty());
|
|
93
|
+
auto brushInLocal = brush.makeWithMatrix(MakeRectToRectMatrix(dstRect, srcRect));
|
|
94
|
+
if (!canAppend(PendingOpType::Image, clip, brushInLocal) || pendingImage != image ||
|
|
95
|
+
pendingSampling != sampling || pendingConstraint != constraint) {
|
|
96
|
+
flushPendingOps(PendingOpType::Image, clip, brushInLocal);
|
|
97
|
+
pendingImage = std::move(image);
|
|
98
|
+
pendingSampling = sampling;
|
|
99
|
+
pendingConstraint = constraint;
|
|
100
|
+
}
|
|
101
|
+
auto record = drawingAllocator()->make<RectRecord>(dstRect, matrix, brushInLocal.color);
|
|
102
|
+
pendingRects.emplace_back(std::move(record));
|
|
103
|
+
pendingUVRects.emplace_back(drawingAllocator()->make<Rect>(srcRect));
|
|
104
|
+
// For Strict mode, track a per-rect subset rectangle, falling back to srcRect when strictRect is
|
|
105
|
+
// null. The parallel array keeps indices aligned with pendingRects, simplifying flush-time
|
|
106
|
+
// access. Non-Strict ops never reach the subset path (see flushPendingOps), so the extra
|
|
107
|
+
// memory is harmless.
|
|
108
|
+
if (constraint == SrcRectConstraint::Strict) {
|
|
109
|
+
pendingSubsetRects.emplace_back(
|
|
110
|
+
drawingAllocator()->make<Rect>(strictRect != nullptr ? *strictRect : srcRect));
|
|
111
|
+
}
|
|
112
|
+
if (!hasRectToRectDraw && srcRect != dstRect) {
|
|
113
|
+
hasRectToRectDraw = true;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static bool ShouldFlushRectOps(const std::vector<PlacementPtr<Stroke>>& pendingStrokes,
|
|
118
|
+
const Stroke* stroke) {
|
|
119
|
+
if (pendingStrokes.empty()) {
|
|
120
|
+
return stroke != nullptr;
|
|
121
|
+
}
|
|
122
|
+
return stroke == nullptr || pendingStrokes.front()->join != stroke->join;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Returns true when the new RRect's complexity (Complex vs non-Complex) disagrees with the
|
|
126
|
+
// RRects already queued.
|
|
127
|
+
static bool ComplexMismatch(const RRect& newRRect,
|
|
128
|
+
const std::vector<PlacementPtr<RRectRecord>>& pending) {
|
|
129
|
+
if (pending.empty()) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
return newRRect.isComplex() != pending.front()->rRect.isComplex();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
void OpsCompositor::fillRect(const Rect& rect, const Matrix& matrix, const ClipStack& clip,
|
|
136
|
+
const Brush& brush, const Stroke* stroke) {
|
|
137
|
+
DEBUG_ASSERT(!rect.isEmpty());
|
|
138
|
+
if (!canAppend(PendingOpType::Rect, clip, brush) || ShouldFlushRectOps(pendingStrokes, stroke)) {
|
|
139
|
+
flushPendingOps(PendingOpType::Rect, clip, brush);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
auto record = drawingAllocator()->make<RectRecord>(rect, matrix, brush.color);
|
|
143
|
+
pendingRects.emplace_back(std::move(record));
|
|
144
|
+
if (stroke) {
|
|
145
|
+
auto strokeRecord = drawingAllocator()->make<Stroke>(*stroke);
|
|
146
|
+
pendingStrokes.emplace_back(std::move(strokeRecord));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
void OpsCompositor::drawRRect(const RRect& rRect, const Matrix& matrix, const ClipStack& clip,
|
|
151
|
+
const Brush& brush, const Stroke* stroke) {
|
|
152
|
+
DEBUG_ASSERT(!rRect.rect().isEmpty());
|
|
153
|
+
auto rectBrush = brush.makeWithMatrix(matrix);
|
|
154
|
+
// Complex and non-Complex RRects use different GPs and vertex layouts, so they cannot be
|
|
155
|
+
// batched into the same op; flush if the incoming RRect's complexity disagrees with pending.
|
|
156
|
+
if (!canAppend(PendingOpType::RRect, clip, rectBrush) ||
|
|
157
|
+
ShouldFlushRectOps(pendingStrokes, stroke) || ComplexMismatch(rRect, pendingRRects)) {
|
|
158
|
+
flushPendingOps(PendingOpType::RRect, clip, rectBrush);
|
|
159
|
+
}
|
|
160
|
+
auto record = drawingAllocator()->make<RRectRecord>(rRect, matrix, rectBrush.color);
|
|
161
|
+
pendingRRects.emplace_back(std::move(record));
|
|
162
|
+
if (stroke) {
|
|
163
|
+
auto strokeRecord = drawingAllocator()->make<Stroke>(*stroke);
|
|
164
|
+
pendingStrokes.emplace_back(std::move(strokeRecord));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
static Rect ClipLocalBounds(const Rect& localBounds, const Matrix& viewMatrix,
|
|
169
|
+
const Rect& clipBounds) {
|
|
170
|
+
auto result = ToLocalBounds(clipBounds, viewMatrix);
|
|
171
|
+
if (!result.intersect(localBounds)) {
|
|
172
|
+
return {};
|
|
173
|
+
}
|
|
174
|
+
return result;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
static bool MatrixOnlyDiffersInTranslation(const Matrix& a, const Matrix& b) {
|
|
178
|
+
// Exact floating-point comparison is intentional: we prefer missing a batch opportunity over
|
|
179
|
+
// incorrectly batching shapes with different non-translation transforms.
|
|
180
|
+
// [0]scaleX [1]skewX [2]transX [3]skewY [4]scaleY [5]transY [6]persp0 [7]persp1 [8]persp2
|
|
181
|
+
return a[0] == b[0] && a[1] == b[1] && a[3] == b[3] && a[4] == b[4] && a[6] == b[6] &&
|
|
182
|
+
a[7] == b[7] && a[8] == b[8];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
void OpsCompositor::drawShape(std::shared_ptr<Shape> shape, const Matrix& matrix,
|
|
186
|
+
const ClipStack& clip, const Brush& brush) {
|
|
187
|
+
DEBUG_ASSERT(shape != nullptr);
|
|
188
|
+
if (shouldUseStencilCover(brush)) {
|
|
189
|
+
if (!canAppend(PendingOpType::StencilCoverPath, clip, brush)) {
|
|
190
|
+
flushPendingOps(PendingOpType::StencilCoverPath, clip, brush);
|
|
191
|
+
}
|
|
192
|
+
// canAppend + CompareBrush ignore brush.color, so a run of stencil-cover shapes may
|
|
193
|
+
// legitimately differ only in color. Keep per-shape colors in a parallel array while
|
|
194
|
+
// pendingBrush stays pinned to the first shape's brush (its shader / blendMode /
|
|
195
|
+
// maskFilter / colorFilter are what canAppend actually validated). flushPendingStencil-
|
|
196
|
+
// CoverOps MUST feed dstColor from this array, not from pendingBrush.color.
|
|
197
|
+
pendingStencilCoverShapes.emplace_back(std::move(shape));
|
|
198
|
+
pendingStencilCoverMatrices.emplace_back(matrix);
|
|
199
|
+
pendingStencilCoverColors.emplace_back(brush.color);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (canAppend(PendingOpType::Shape, clip, brush) && pendingShape &&
|
|
203
|
+
pendingShape->getUniqueKey() == shape->getUniqueKey() &&
|
|
204
|
+
MatrixOnlyDiffersInTranslation(pendingShapeMatrix, matrix)) {
|
|
205
|
+
// Offset has two sources, both in device space:
|
|
206
|
+
// 1. Canvas matrix translation difference (already in device space).
|
|
207
|
+
// 2. Shape bounds difference (in local space, needs matrix linear transform to device space).
|
|
208
|
+
// This occurs when tryAddSimplifiedMatrixShape encodes position into shape bounds
|
|
209
|
+
// instead of the canvas matrix.
|
|
210
|
+
auto dx = matrix.getTranslateX() - pendingShapeMatrix.getTranslateX();
|
|
211
|
+
auto dy = matrix.getTranslateY() - pendingShapeMatrix.getTranslateY();
|
|
212
|
+
auto baseBounds = pendingShape->getBounds();
|
|
213
|
+
auto newBounds = shape->getBounds();
|
|
214
|
+
auto boundsDx = newBounds.left - baseBounds.left;
|
|
215
|
+
auto boundsDy = newBounds.top - baseBounds.top;
|
|
216
|
+
if (boundsDx != 0.0f || boundsDy != 0.0f) {
|
|
217
|
+
// Map local-space bounds offset to device space through the matrix linear part.
|
|
218
|
+
dx += matrix.getScaleX() * boundsDx + matrix.getSkewX() * boundsDy;
|
|
219
|
+
dy += matrix.getSkewY() * boundsDx + matrix.getScaleY() * boundsDy;
|
|
220
|
+
}
|
|
221
|
+
pendingShapeOffsets.emplace_back(dx, dy);
|
|
222
|
+
pendingShapeColors.emplace_back(brush.color);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
flushPendingOps(PendingOpType::Shape, clip, brush);
|
|
226
|
+
pendingShape = std::move(shape);
|
|
227
|
+
pendingShapeMatrix = matrix;
|
|
228
|
+
pendingShapeOffsets.emplace_back(0.0f, 0.0f);
|
|
229
|
+
pendingShapeColors.emplace_back(brush.color);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
bool OpsCompositor::shouldUseStencilCover(const Brush& brush) const {
|
|
233
|
+
#ifndef TGFX_ENABLE_STENCIL_COVER_PATH
|
|
234
|
+
// Compile-time master switch: shouldUseStencilCover returns false unconditionally when
|
|
235
|
+
// TGFX_ENABLE_STENCIL_COVER_PATH is off, which removes the only caller of the stencil-cover
|
|
236
|
+
// dispatch path (drawStencilCoverPath) and yields zero runtime overhead. The stencil-cover
|
|
237
|
+
// support files (tessellator, draw op, GPs, upload task) are still pulled in by the CMake
|
|
238
|
+
// GLOB and rely on the linker's dead-code stripping to drop them from the final binary.
|
|
239
|
+
USE(brush);
|
|
240
|
+
return false;
|
|
241
|
+
#else
|
|
242
|
+
// Any brush requesting antialiasing keeps using the legacy triangulation path so the
|
|
243
|
+
// existing coverage-AA / alpha-ramp visual contract is preserved without modification.
|
|
244
|
+
// MSAA render targets are *not* excluded: the stencil pass evaluates the Loop-Blinn test
|
|
245
|
+
// per-sample when the depth/stencil attachment is multisampled (OpsRenderTask requests the
|
|
246
|
+
// stencil texture with the same sampleCount as the render target), so hardware MSAA and
|
|
247
|
+
// stencil-and-cover compose naturally — MSAA handles edge coverage while stencil-and-cover
|
|
248
|
+
// handles interior/exterior classification.
|
|
249
|
+
if (brush.antiAlias) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
// Hardware gate: the render path requires a renderable stencil attachment. All other
|
|
253
|
+
// eligibility checks (this path being the tgfx-side choice for non-AA fills) are encoded
|
|
254
|
+
// in this method, not in GPUFeatures.
|
|
255
|
+
return context->gpu()->features()->stencilAttachmentSupported;
|
|
256
|
+
#endif
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
void OpsCompositor::drawMesh(std::shared_ptr<Mesh> mesh, const Matrix& matrix,
|
|
260
|
+
const ClipStack& clip, const Brush& brush) {
|
|
261
|
+
DEBUG_ASSERT(mesh != nullptr);
|
|
262
|
+
flushPendingOps();
|
|
263
|
+
|
|
264
|
+
auto meshBase = static_cast<MeshBase*>(mesh.get());
|
|
265
|
+
|
|
266
|
+
std::optional<Rect> localBounds = std::nullopt;
|
|
267
|
+
std::optional<Rect> deviceBounds = std::nullopt;
|
|
268
|
+
auto [needLocalBounds, needDeviceBounds] = needComputeBounds(brush, meshBase->hasCoverage());
|
|
269
|
+
auto clipBounds = getClipBounds(clip);
|
|
270
|
+
|
|
271
|
+
float drawScale = 1.0f;
|
|
272
|
+
auto meshBounds = mesh->bounds();
|
|
273
|
+
if (needLocalBounds) {
|
|
274
|
+
localBounds = ClipLocalBounds(meshBounds, matrix, clipBounds);
|
|
275
|
+
if (localBounds->isEmpty()) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
drawScale = std::min(matrix.getMaxScale(), 1.0f);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (needDeviceBounds) {
|
|
282
|
+
deviceBounds = matrix.mapRect(meshBounds);
|
|
283
|
+
if (!deviceBounds->intersect(clipBounds)) {
|
|
284
|
+
deviceBounds->setEmpty();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Determine if mesh has vertex colors (only VertexMesh can have these)
|
|
289
|
+
bool hasColors = false;
|
|
290
|
+
if (meshBase->type() == MeshBase::Type::Vertex) {
|
|
291
|
+
auto vertexMesh = static_cast<VertexMesh*>(meshBase);
|
|
292
|
+
hasColors = vertexMesh->hasColors();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Determine final color based on blending rules (see Canvas.h drawMesh documentation):
|
|
296
|
+
// Paint color is only used when no shader and no vertex colors; otherwise use white.
|
|
297
|
+
PMColor gpColor = PMColor::White();
|
|
298
|
+
if (!brush.shader && !hasColors) {
|
|
299
|
+
gpColor = ToPMColor(brush.color, dstColorSpace);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
auto meshProxy = proxyProvider()->createGPUMeshProxy(mesh, renderFlags, dstColorSpace);
|
|
303
|
+
auto drawOp = MeshDrawOp::Make(std::move(meshProxy), gpColor, matrix);
|
|
304
|
+
if (drawOp == nullptr) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Handle shader for mesh with special blending rules:
|
|
309
|
+
// - shader + colors: texture * vertexColor (Modulate)
|
|
310
|
+
// - shader only: pure texture
|
|
311
|
+
if (brush.shader) {
|
|
312
|
+
FPArgs args = {context, renderFlags, localBounds.value_or(Rect::MakeEmpty()), drawScale};
|
|
313
|
+
auto textureFP = FragmentProcessor::Make(brush.shader, args, nullptr, dstColorSpace);
|
|
314
|
+
if (textureFP == nullptr) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (hasColors) {
|
|
318
|
+
textureFP = XfermodeFragmentProcessor::MakeFromSrcProcessor(
|
|
319
|
+
drawingAllocator(), std::move(textureFP), BlendMode::Modulate);
|
|
320
|
+
}
|
|
321
|
+
drawOp->addColorFP(std::move(textureFP));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Create a brush without shader to pass to addDrawOp, since we handled shader above.
|
|
325
|
+
Brush meshBrush = brush;
|
|
326
|
+
meshBrush.shader = nullptr;
|
|
327
|
+
addDrawOp(std::move(drawOp), clip, meshBrush, localBounds, deviceBounds, drawScale);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
void OpsCompositor::drawHairlineShape(std::shared_ptr<Shape> shape, const Matrix& matrix,
|
|
331
|
+
const ClipStack& clip, const Brush& brush,
|
|
332
|
+
const Stroke* stroke) {
|
|
333
|
+
DEBUG_ASSERT(shape != nullptr);
|
|
334
|
+
flushPendingOps();
|
|
335
|
+
Matrix uvMatrix = {};
|
|
336
|
+
if (!matrix.invert(&uvMatrix)) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
std::optional<Rect> localBounds = std::nullopt;
|
|
340
|
+
std::optional<Rect> deviceBounds = std::nullopt;
|
|
341
|
+
float drawScale = 1.0f;
|
|
342
|
+
|
|
343
|
+
auto [needLocalBounds, needDeviceBounds] = needComputeBounds(brush, true);
|
|
344
|
+
auto clipBounds = getClipBounds(clip);
|
|
345
|
+
if (needLocalBounds) {
|
|
346
|
+
localBounds = shape->getBounds();
|
|
347
|
+
localBounds = ClipLocalBounds(*localBounds, matrix, clipBounds);
|
|
348
|
+
drawScale = std::min(matrix.getMaxScale(), 1.0f);
|
|
349
|
+
}
|
|
350
|
+
shape = Shape::ApplyMatrix(std::move(shape), matrix);
|
|
351
|
+
if (!shape) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
if (needDeviceBounds) {
|
|
355
|
+
deviceBounds = shape->getBounds();
|
|
356
|
+
if (!deviceBounds->intersect(clipBounds)) {
|
|
357
|
+
deviceBounds->setEmpty();
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
bool hasCap =
|
|
362
|
+
stroke != nullptr && (stroke->cap == LineCap::Round || stroke->cap == LineCap::Square);
|
|
363
|
+
auto aaType = getAAType(brush);
|
|
364
|
+
auto dstColor = ToPMColor(brush.color, dstColorSpace);
|
|
365
|
+
auto hairlineProxy = proxyProvider()->createGPUHairlineProxy(shape, hasCap, renderFlags);
|
|
366
|
+
if (hairlineProxy == nullptr) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
auto coverage = GetHairlineAlphaFactor(*stroke, matrix);
|
|
370
|
+
auto lineDrawOp = HairlineLineOp::Make(hairlineProxy, dstColor, uvMatrix, coverage, aaType);
|
|
371
|
+
addDrawOp(std::move(lineDrawOp), clip, brush, localBounds, deviceBounds, drawScale);
|
|
372
|
+
auto quadDrawOp = HairlineQuadOp::Make(hairlineProxy, dstColor, uvMatrix, coverage, aaType);
|
|
373
|
+
addDrawOp(std::move(quadDrawOp), clip, brush, localBounds, deviceBounds, drawScale);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
void OpsCompositor::discardAll() {
|
|
377
|
+
drawOps.clear();
|
|
378
|
+
clearColor.reset();
|
|
379
|
+
if (pendingType != PendingOpType::Unknown) {
|
|
380
|
+
resetPendingOps();
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
void OpsCompositor::resetPendingOps(PendingOpType type, ClipStack clip, Brush brush) {
|
|
385
|
+
hasRectToRectDraw = false;
|
|
386
|
+
pendingType = type;
|
|
387
|
+
pendingClip = std::move(clip);
|
|
388
|
+
pendingBrush = std::move(brush);
|
|
389
|
+
pendingImage = nullptr;
|
|
390
|
+
pendingSampling = {};
|
|
391
|
+
pendingConstraint = SrcRectConstraint::Fast;
|
|
392
|
+
pendingRects.clear();
|
|
393
|
+
pendingUVRects.clear();
|
|
394
|
+
pendingSubsetRects.clear();
|
|
395
|
+
pendingRRects.clear();
|
|
396
|
+
pendingStrokes.clear();
|
|
397
|
+
pendingAtlasTexture = nullptr;
|
|
398
|
+
pendingShape = nullptr;
|
|
399
|
+
pendingShapeMatrix = {};
|
|
400
|
+
pendingShapeOffsets.clear();
|
|
401
|
+
pendingShapeColors.clear();
|
|
402
|
+
pendingStencilCoverShapes.clear();
|
|
403
|
+
pendingStencilCoverMatrices.clear();
|
|
404
|
+
pendingStencilCoverColors.clear();
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
bool OpsCompositor::CompareBrush(const Brush& a, const Brush& b) {
|
|
408
|
+
// Ignore the color differences.
|
|
409
|
+
if (a.antiAlias != b.antiAlias || a.blendMode != b.blendMode) {
|
|
410
|
+
return false;
|
|
411
|
+
}
|
|
412
|
+
if (a.shader != b.shader) {
|
|
413
|
+
if (!a.shader || !b.shader || !a.shader->isEqual(b.shader.get())) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (a.maskFilter != b.maskFilter) {
|
|
418
|
+
if (!a.maskFilter || !b.maskFilter || !a.maskFilter->isEqual(b.maskFilter.get())) {
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (a.colorFilter != b.colorFilter) {
|
|
423
|
+
if (!a.colorFilter || !b.colorFilter || !a.colorFilter->isEqual(b.colorFilter.get())) {
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
bool OpsCompositor::canAppend(PendingOpType type, const ClipStack& clip, const Brush& brush) const {
|
|
431
|
+
if (pendingType != type || !pendingClip.isSame(clip) || !CompareBrush(pendingBrush, brush)) {
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
434
|
+
switch (pendingType) {
|
|
435
|
+
case PendingOpType::Rect:
|
|
436
|
+
case PendingOpType::Image:
|
|
437
|
+
case PendingOpType::Atlas:
|
|
438
|
+
return pendingRects.size() < RectDrawOp::MaxNumRects;
|
|
439
|
+
case PendingOpType::RRect:
|
|
440
|
+
return pendingRRects.size() < RRectDrawOp::MaxNumRRects;
|
|
441
|
+
case PendingOpType::Shape:
|
|
442
|
+
return pendingShapeOffsets.size() < ShapeInstancedDrawOp::MaxNumInstances;
|
|
443
|
+
case PendingOpType::StencilCoverPath:
|
|
444
|
+
return pendingStencilCoverShapes.size() < StencilCoverPathDrawOp::MaxNumBatched;
|
|
445
|
+
default:
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
class PendingOpsAutoReset {
|
|
452
|
+
public:
|
|
453
|
+
PendingOpsAutoReset(OpsCompositor* compositor, PendingOpType type, ClipStack clip, Brush brush)
|
|
454
|
+
: compositor(compositor), type(type), clip(std::move(clip)), brush(std::move(brush)) {
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
~PendingOpsAutoReset() {
|
|
458
|
+
compositor->resetPendingOps(type, std::move(clip), std::move(brush));
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
private:
|
|
462
|
+
OpsCompositor* compositor;
|
|
463
|
+
PendingOpType type;
|
|
464
|
+
ClipStack clip;
|
|
465
|
+
Brush brush;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
void OpsCompositor::flushPendingOps(PendingOpType type, ClipStack clip, Brush brush) {
|
|
469
|
+
if (pendingType == PendingOpType::Unknown) {
|
|
470
|
+
if (type != PendingOpType::Unknown) {
|
|
471
|
+
pendingType = type;
|
|
472
|
+
pendingClip = std::move(clip);
|
|
473
|
+
pendingBrush = std::move(brush);
|
|
474
|
+
}
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
PendingOpsAutoReset autoReset(this, type, std::move(clip), std::move(brush));
|
|
478
|
+
// Shape is handled separately with its own bounds computation.
|
|
479
|
+
if (pendingType == PendingOpType::Shape) {
|
|
480
|
+
flushPendingShapeOps();
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
if (pendingType == PendingOpType::StencilCoverPath) {
|
|
484
|
+
flushPendingStencilCoverOps();
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
PlacementPtr<DrawOp> drawOp = nullptr;
|
|
488
|
+
std::optional<Rect> localBounds = std::nullopt;
|
|
489
|
+
std::optional<Rect> deviceBounds = std::nullopt;
|
|
490
|
+
std::optional<float> drawScale = std::nullopt;
|
|
491
|
+
// Conservative prediction of whether the final DrawOp will have coverage. This determines if
|
|
492
|
+
// deviceBounds needs to be computed for DstTexture creation. We assume coverage exists unless
|
|
493
|
+
// clip is empty, since some ops (e.g., AtlasTextOp) always have coverage regardless of clip.
|
|
494
|
+
// Underestimating causes draws to be skipped on GPUs without frameBufferFetch (e.g., SwiftShader).
|
|
495
|
+
bool hasCoverage = pendingBrush.maskFilter != nullptr || pendingClip.state() != ClipState::Empty;
|
|
496
|
+
bool hasImageFill = pendingType == PendingOpType::Image;
|
|
497
|
+
auto [needLocalBounds, needDeviceBounds] =
|
|
498
|
+
needComputeBounds(pendingBrush, hasCoverage, hasImageFill);
|
|
499
|
+
auto aaType = getAAType(pendingBrush);
|
|
500
|
+
Rect clipBounds = {};
|
|
501
|
+
if (needLocalBounds || needDeviceBounds) {
|
|
502
|
+
clipBounds = getClipBounds(pendingClip);
|
|
503
|
+
}
|
|
504
|
+
if (needLocalBounds) {
|
|
505
|
+
localBounds = Rect::MakeEmpty();
|
|
506
|
+
drawScale = 0.0f;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
if (needLocalBounds || needDeviceBounds) {
|
|
510
|
+
if (pendingType == PendingOpType::RRect) {
|
|
511
|
+
deviceBounds = Rect::MakeEmpty();
|
|
512
|
+
for (auto& record : pendingRRects) {
|
|
513
|
+
auto rect = record->viewMatrix.mapRect(record->rRect.rect());
|
|
514
|
+
deviceBounds->join(rect);
|
|
515
|
+
drawScale = std::max(*drawScale, record->viewMatrix.getMaxScale());
|
|
516
|
+
}
|
|
517
|
+
if (!deviceBounds->intersect(clipBounds)) {
|
|
518
|
+
deviceBounds->setEmpty();
|
|
519
|
+
}
|
|
520
|
+
localBounds = deviceBounds;
|
|
521
|
+
if (!localBounds->intersect(clipBounds)) {
|
|
522
|
+
localBounds->setEmpty();
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
if (needLocalBounds) {
|
|
526
|
+
auto rectCount = pendingRects.size();
|
|
527
|
+
for (size_t i = 0; i < rectCount; i++) {
|
|
528
|
+
auto& record = pendingRects[i];
|
|
529
|
+
auto viewMatrix = record->viewMatrix;
|
|
530
|
+
auto rect = &record->rect;
|
|
531
|
+
if (hasRectToRectDraw) {
|
|
532
|
+
auto& uvRect = *pendingUVRects[i];
|
|
533
|
+
viewMatrix.preConcat(MakeRectToRectMatrix(uvRect, record->rect));
|
|
534
|
+
rect = &uvRect;
|
|
535
|
+
}
|
|
536
|
+
localBounds->join(ClipLocalBounds(*rect, viewMatrix, clipBounds));
|
|
537
|
+
drawScale = std::max(*drawScale, viewMatrix.getMaxScale());
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if (needDeviceBounds) {
|
|
541
|
+
deviceBounds = Rect::MakeEmpty();
|
|
542
|
+
for (auto& record : pendingRects) {
|
|
543
|
+
auto rect = record->viewMatrix.mapRect(record->rect);
|
|
544
|
+
deviceBounds->join(rect);
|
|
545
|
+
}
|
|
546
|
+
if (!deviceBounds->intersect(clipBounds)) {
|
|
547
|
+
deviceBounds->setEmpty();
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
if (localBounds.has_value() && localBounds->isEmpty()) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
switch (pendingType) {
|
|
557
|
+
case PendingOpType::Rect:
|
|
558
|
+
if (pendingRects.size() == 1 && pendingStrokes.empty()) {
|
|
559
|
+
auto& paint = pendingRects.front();
|
|
560
|
+
if (drawAsClear(paint->rect, paint->viewMatrix, pendingClip, pendingBrush)) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
// fallthrough
|
|
565
|
+
case PendingOpType::Image: {
|
|
566
|
+
auto subsetMode = UVSubsetMode::None;
|
|
567
|
+
if (pendingConstraint == SrcRectConstraint::Strict && pendingImage) {
|
|
568
|
+
subsetMode = pendingSampling.magFilterMode == FilterMode::Linear ||
|
|
569
|
+
pendingSampling.minFilterMode == FilterMode::Linear
|
|
570
|
+
? UVSubsetMode::SubsetOnly
|
|
571
|
+
: UVSubsetMode::RoundOutAndSubset;
|
|
572
|
+
}
|
|
573
|
+
bool needUVCoord =
|
|
574
|
+
needLocalBounds && (hasRectToRectDraw || HasDifferentViewMatrix(pendingRects));
|
|
575
|
+
auto uvRects =
|
|
576
|
+
hasRectToRectDraw ? std::move(pendingUVRects) : std::vector<PlacementPtr<Rect>>();
|
|
577
|
+
// pendingSubsetRects is populated only when constraint == Strict (per fillImageRect).
|
|
578
|
+
// When subsetMode != None we must provide subset rects of the same size as pendingRects.
|
|
579
|
+
auto subsetRects = std::move(pendingSubsetRects);
|
|
580
|
+
auto provider = RectsVertexProvider::MakeFrom(
|
|
581
|
+
drawingAllocator(), std::move(pendingRects), std::move(uvRects), std::move(subsetRects),
|
|
582
|
+
aaType, needUVCoord, subsetMode, std::move(pendingStrokes), dstColorSpace);
|
|
583
|
+
drawOp = RectDrawOp::Make(context, std::move(provider), renderFlags);
|
|
584
|
+
} break;
|
|
585
|
+
case PendingOpType::RRect: {
|
|
586
|
+
auto provider =
|
|
587
|
+
RRectsVertexProvider::MakeFrom(drawingAllocator(), std::move(pendingRRects), aaType,
|
|
588
|
+
std::move(pendingStrokes), dstColorSpace);
|
|
589
|
+
drawOp = RRectDrawOp::Make(context, std::move(provider), renderFlags);
|
|
590
|
+
} break;
|
|
591
|
+
case PendingOpType::Atlas: {
|
|
592
|
+
auto provider =
|
|
593
|
+
RectsVertexProvider::MakeFrom(drawingAllocator(), std::move(pendingRects), {}, {},
|
|
594
|
+
AAType::None, true, UVSubsetMode::None, {}, dstColorSpace);
|
|
595
|
+
drawOp = AtlasTextOp::Make(context, std::move(provider), renderFlags,
|
|
596
|
+
std::move(pendingAtlasTexture), pendingSampling);
|
|
597
|
+
} break;
|
|
598
|
+
default:
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
if (drawOp != nullptr && pendingType == PendingOpType::Image) {
|
|
602
|
+
FPArgs args = {context, renderFlags, localBounds.value_or(Rect::MakeEmpty()),
|
|
603
|
+
drawScale.value_or(1.0f)};
|
|
604
|
+
auto processor =
|
|
605
|
+
FragmentProcessor::Make(pendingImage, args, pendingSampling, pendingConstraint);
|
|
606
|
+
if (processor == nullptr) {
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
drawOp->addColorFP(std::move(processor));
|
|
610
|
+
if (!pendingImage->isAlphaOnly() &&
|
|
611
|
+
NeedConvertColorSpace(pendingImage->colorSpace(), dstColorSpace)) {
|
|
612
|
+
auto xformEffect = ColorSpaceXformEffect::Make(
|
|
613
|
+
context->drawingAllocator(), pendingImage->colorSpace().get(), AlphaType::Premultiplied,
|
|
614
|
+
dstColorSpace.get(), AlphaType::Premultiplied);
|
|
615
|
+
drawOp->addColorFP(std::move(xformEffect));
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
addDrawOp(std::move(drawOp), pendingClip, pendingBrush, localBounds, deviceBounds,
|
|
619
|
+
drawScale.value_or(1.0f));
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
void OpsCompositor::flushPendingShapeOps() {
|
|
623
|
+
DEBUG_ASSERT(pendingShape != nullptr);
|
|
624
|
+
DEBUG_ASSERT(!pendingShapeOffsets.empty());
|
|
625
|
+
auto shape = std::move(pendingShape);
|
|
626
|
+
auto shapeMatrix = pendingShapeMatrix;
|
|
627
|
+
auto offsets = std::move(pendingShapeOffsets);
|
|
628
|
+
auto shapeColors = std::move(pendingShapeColors);
|
|
629
|
+
|
|
630
|
+
Matrix uvMatrix = {};
|
|
631
|
+
if (!shapeMatrix.invert(&uvMatrix)) {
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
auto clipBounds = getClipBounds(pendingClip);
|
|
636
|
+
auto count = offsets.size();
|
|
637
|
+
std::optional<Rect> localBounds = std::nullopt;
|
|
638
|
+
std::optional<Rect> deviceBounds = std::nullopt;
|
|
639
|
+
float drawScale = 1.0f;
|
|
640
|
+
auto [needLocalBounds, needDeviceBounds] = needComputeBounds(pendingBrush, true);
|
|
641
|
+
|
|
642
|
+
// Compute the union of all instance bounds in the first instance's local space.
|
|
643
|
+
// offsets are in device space, so convert them to local space using uvMatrix (inverse of
|
|
644
|
+
// shapeMatrix) before offsetting shape bounds.
|
|
645
|
+
Rect shapeBounds = {};
|
|
646
|
+
if ((needLocalBounds || needDeviceBounds) && !shape->isInverseFillType()) {
|
|
647
|
+
const auto baseBounds = shape->getBounds();
|
|
648
|
+
for (size_t i = 0; i < count; ++i) {
|
|
649
|
+
auto localX = uvMatrix.getScaleX() * offsets[i].x + uvMatrix.getSkewX() * offsets[i].y;
|
|
650
|
+
auto localY = uvMatrix.getSkewY() * offsets[i].x + uvMatrix.getScaleY() * offsets[i].y;
|
|
651
|
+
shapeBounds.join(baseBounds.makeOffset(localX, localY));
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if (needLocalBounds) {
|
|
655
|
+
if (shape->isInverseFillType()) {
|
|
656
|
+
localBounds = ToLocalBounds(clipBounds, shapeMatrix);
|
|
657
|
+
} else {
|
|
658
|
+
localBounds = ClipLocalBounds(shapeBounds, shapeMatrix, clipBounds);
|
|
659
|
+
}
|
|
660
|
+
if (localBounds->isEmpty()) {
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
drawScale = std::min(shapeMatrix.getMaxScale(), 1.0f);
|
|
664
|
+
}
|
|
665
|
+
if (needDeviceBounds) {
|
|
666
|
+
deviceBounds = shape->isInverseFillType() ? clipBounds : shapeMatrix.mapRect(shapeBounds);
|
|
667
|
+
if (!shape->isInverseFillType() && !deviceBounds->intersect(clipBounds)) {
|
|
668
|
+
deviceBounds->setEmpty();
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
shape = Shape::ApplyMatrix(std::move(shape), shapeMatrix);
|
|
673
|
+
if (!shape) {
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
auto aaType = getAAType(pendingBrush);
|
|
678
|
+
auto shapeProxy = proxyProvider()->createGPUShapeProxy(shape, aaType, clipBounds, renderFlags);
|
|
679
|
+
|
|
680
|
+
if (count == 1) {
|
|
681
|
+
auto dstColor = ToPMColor(pendingBrush.color, dstColorSpace);
|
|
682
|
+
auto drawOp = ShapeDrawOp::Make(std::move(shapeProxy), dstColor, uvMatrix, aaType);
|
|
683
|
+
addDrawOp(std::move(drawOp), pendingClip, pendingBrush, localBounds, deviceBounds, drawScale);
|
|
684
|
+
} else {
|
|
685
|
+
const Color* colorsPtr = pendingBrush.shader ? nullptr : shapeColors.data();
|
|
686
|
+
auto drawOp = ShapeInstancedDrawOp::Make(std::move(shapeProxy), offsets.data(), colorsPtr,
|
|
687
|
+
count, uvMatrix, shapeMatrix, aaType, dstColorSpace);
|
|
688
|
+
addDrawOp(std::move(drawOp), pendingClip, pendingBrush, localBounds, deviceBounds, drawScale);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
void OpsCompositor::flushPendingStencilCoverOps() {
|
|
693
|
+
DEBUG_ASSERT(!pendingStencilCoverShapes.empty());
|
|
694
|
+
DEBUG_ASSERT(pendingStencilCoverShapes.size() == pendingStencilCoverMatrices.size());
|
|
695
|
+
DEBUG_ASSERT(pendingStencilCoverShapes.size() == pendingStencilCoverColors.size());
|
|
696
|
+
auto shapes = std::move(pendingStencilCoverShapes);
|
|
697
|
+
auto matrices = std::move(pendingStencilCoverMatrices);
|
|
698
|
+
auto colors = std::move(pendingStencilCoverColors);
|
|
699
|
+
auto count = shapes.size();
|
|
700
|
+
|
|
701
|
+
auto [needLocalBounds, needDeviceBounds] = needComputeBounds(pendingBrush, /*hasCoverage=*/true);
|
|
702
|
+
auto clipBounds = getClipBounds(pendingClip);
|
|
703
|
+
|
|
704
|
+
for (size_t i = 0; i < count; ++i) {
|
|
705
|
+
const auto& shape = shapes[i];
|
|
706
|
+
const auto& matrix = matrices[i];
|
|
707
|
+
const auto& color = colors[i];
|
|
708
|
+
|
|
709
|
+
auto geometryProxy = proxyProvider()->createStencilCoverPathProxy(shape, renderFlags);
|
|
710
|
+
if (geometryProxy == nullptr) {
|
|
711
|
+
continue;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
auto shapeBounds = shape->getBounds();
|
|
715
|
+
bool isInverseFill = shape->isInverseFillType();
|
|
716
|
+
if (isInverseFill && clipBounds.isEmpty()) {
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
// Local-space clip rect is used by both the inverse-fill local bounds and the cover
|
|
720
|
+
// quad. A non-invertible view matrix is a hard error for this op — bail out before
|
|
721
|
+
// consuming any further resources.
|
|
722
|
+
Matrix uvMatrix = {};
|
|
723
|
+
if (!matrix.invert(&uvMatrix)) {
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
Rect localClipBounds = uvMatrix.mapRect(clipBounds);
|
|
727
|
+
|
|
728
|
+
std::optional<Rect> localBounds = std::nullopt;
|
|
729
|
+
std::optional<Rect> deviceBounds = std::nullopt;
|
|
730
|
+
float drawScale = 1.0f;
|
|
731
|
+
if (needLocalBounds) {
|
|
732
|
+
if (isInverseFill) {
|
|
733
|
+
localBounds = localClipBounds;
|
|
734
|
+
} else {
|
|
735
|
+
localBounds = ClipLocalBounds(shapeBounds, matrix, clipBounds);
|
|
736
|
+
if (localBounds->isEmpty()) {
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
drawScale = std::min(matrix.getMaxScale(), 1.0f);
|
|
741
|
+
}
|
|
742
|
+
if (needDeviceBounds) {
|
|
743
|
+
if (isInverseFill) {
|
|
744
|
+
deviceBounds = clipBounds;
|
|
745
|
+
} else {
|
|
746
|
+
deviceBounds = matrix.mapRect(shapeBounds);
|
|
747
|
+
if (!deviceBounds->intersect(clipBounds)) {
|
|
748
|
+
deviceBounds->setEmpty();
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
Rect coverLocalBounds = isInverseFill ? localClipBounds : shapeBounds;
|
|
754
|
+
if (coverLocalBounds.isEmpty()) {
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
auto dstColor = ToPMColor(color, dstColorSpace);
|
|
759
|
+
auto fillType = shape->fillType();
|
|
760
|
+
auto drawOp = StencilCoverPathDrawOp::Make(std::move(geometryProxy), dstColor, matrix,
|
|
761
|
+
coverLocalBounds, fillType);
|
|
762
|
+
if (drawOp == nullptr) {
|
|
763
|
+
continue;
|
|
764
|
+
}
|
|
765
|
+
addDrawOp(std::move(drawOp), pendingClip, pendingBrush, localBounds, deviceBounds, drawScale);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
static void FlipYIfNeeded(Rect* rect, const RenderTargetProxy* renderTarget) {
|
|
770
|
+
if (renderTarget->origin() == ImageOrigin::BottomLeft) {
|
|
771
|
+
renderTarget->getOriginTransform().mapRect(rect);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
static bool HasColorOnly(const Brush& brush) {
|
|
776
|
+
return !brush.shader && !brush.maskFilter && !brush.colorFilter;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
bool OpsCompositor::drawAsClear(const Rect& rect, const Matrix& matrix, const ClipStack& clip,
|
|
780
|
+
const Brush& brush) {
|
|
781
|
+
if (!HasColorOnly(brush) || !brush.isOpaque() || !matrix.rectStaysRect()) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
auto deviceBounds = renderTarget->bounds();
|
|
785
|
+
Rect clipRect = {};
|
|
786
|
+
switch (clip.state()) {
|
|
787
|
+
case ClipState::WideOpen:
|
|
788
|
+
clipRect = deviceBounds;
|
|
789
|
+
break;
|
|
790
|
+
case ClipState::Rect:
|
|
791
|
+
clipRect = clip.bounds();
|
|
792
|
+
break;
|
|
793
|
+
case ClipState::Empty:
|
|
794
|
+
case ClipState::Complex:
|
|
795
|
+
return false;
|
|
796
|
+
}
|
|
797
|
+
auto bounds = rect;
|
|
798
|
+
matrix.mapRect(&bounds);
|
|
799
|
+
if (!bounds.intersect(clipRect) || !IsClipPixelAligned(bounds)) {
|
|
800
|
+
return false;
|
|
801
|
+
}
|
|
802
|
+
bounds.round();
|
|
803
|
+
if (bounds != deviceBounds) {
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
// discard all previous ops since the clear rect covers the entire render target.
|
|
807
|
+
drawOps.clear();
|
|
808
|
+
auto format = renderTarget->format();
|
|
809
|
+
auto writeSwizzle = Swizzle::ForWrite(format);
|
|
810
|
+
auto dstColor = ToPMColor(brush.color, dstColorSpace);
|
|
811
|
+
clearColor = writeSwizzle.applyTo(dstColor);
|
|
812
|
+
return true;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
void OpsCompositor::makeClosed() {
|
|
816
|
+
if (renderTarget == nullptr) {
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
flushPendingOps();
|
|
820
|
+
submitDrawOps();
|
|
821
|
+
renderTarget = nullptr;
|
|
822
|
+
// Remove the compositor from the list, so it won't be flushed again.
|
|
823
|
+
context->drawingManager()->compositors.erase(cachedPosition);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
AAType OpsCompositor::getAAType(const Brush& brush) const {
|
|
827
|
+
return getAAType(brush.antiAlias);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
AAType OpsCompositor::getAAType(bool antiAlias) const {
|
|
831
|
+
if (renderTarget->sampleCount() > 1) {
|
|
832
|
+
return AAType::MSAA;
|
|
833
|
+
}
|
|
834
|
+
if (antiAlias) {
|
|
835
|
+
return AAType::Coverage;
|
|
836
|
+
}
|
|
837
|
+
return AAType::None;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
std::pair<bool, bool> OpsCompositor::needComputeBounds(const Brush& brush, bool hasCoverage,
|
|
841
|
+
bool hasImageFill) {
|
|
842
|
+
bool needLocalBounds = hasImageFill || brush.shader != nullptr || brush.maskFilter != nullptr;
|
|
843
|
+
bool needDeviceBounds = false;
|
|
844
|
+
if (BlendModeNeedDstTexture(brush.blendMode, hasCoverage)) {
|
|
845
|
+
auto shaderCaps = context->shaderCaps();
|
|
846
|
+
auto features = context->gpu()->features();
|
|
847
|
+
if (!shaderCaps->frameBufferFetchSupport &&
|
|
848
|
+
(!features->textureBarrier || renderTarget->asTextureProxy() == nullptr ||
|
|
849
|
+
renderTarget->sampleCount() > 1)) {
|
|
850
|
+
needDeviceBounds = true;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
if (pendingType == PendingOpType::RRect && (needDeviceBounds || needLocalBounds)) {
|
|
854
|
+
// When either localBounds or deviceBounds needs to be computed for RRect, both should be set to
|
|
855
|
+
// true, since localBounds and deviceBounds are computed together in that case.
|
|
856
|
+
needLocalBounds = true;
|
|
857
|
+
needDeviceBounds = true;
|
|
858
|
+
}
|
|
859
|
+
return {needLocalBounds, needDeviceBounds};
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
Rect OpsCompositor::getClipBounds(const ClipStack& clip) const {
|
|
863
|
+
if (clip.state() == ClipState::WideOpen) {
|
|
864
|
+
return renderTarget->bounds();
|
|
865
|
+
}
|
|
866
|
+
auto bounds = clip.bounds();
|
|
867
|
+
if (!bounds.intersect(renderTarget->bounds())) {
|
|
868
|
+
bounds.setEmpty();
|
|
869
|
+
}
|
|
870
|
+
return bounds;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
AppliedClip OpsCompositor::applyClip(const ClipStack& clipStack) {
|
|
874
|
+
AppliedClip out;
|
|
875
|
+
|
|
876
|
+
// Stage 1: Fast path for Empty and WideOpen states.
|
|
877
|
+
if (clipStack.state() == ClipState::Empty) {
|
|
878
|
+
out.status = AppliedClipStatus::ClippedOut;
|
|
879
|
+
return out;
|
|
880
|
+
}
|
|
881
|
+
if (clipStack.state() == ClipState::WideOpen) {
|
|
882
|
+
out.status = AppliedClipStatus::Unclipped;
|
|
883
|
+
return out;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// Stage 2: Set initial scissor from clip bounds to restrict drawing area.
|
|
887
|
+
auto clipBounds = clipStack.bounds();
|
|
888
|
+
if (!clipBounds.intersect(renderTarget->bounds())) {
|
|
889
|
+
out.status = AppliedClipStatus::ClippedOut;
|
|
890
|
+
return out;
|
|
891
|
+
}
|
|
892
|
+
clipBounds.roundOut();
|
|
893
|
+
auto scissorBounds = clipBounds;
|
|
894
|
+
FlipYIfNeeded(&scissorBounds, renderTarget.get());
|
|
895
|
+
out.scissor = scissorBounds;
|
|
896
|
+
|
|
897
|
+
// Stage 3: Iterate through valid elements.
|
|
898
|
+
auto& elements = clipStack.elements();
|
|
899
|
+
std::vector<const ClipElement*> elementsForMask;
|
|
900
|
+
elementsForMask.reserve(elements.size() - clipStack.oldestValidIndex());
|
|
901
|
+
PlacementPtr<FragmentProcessor> clipFP = nullptr;
|
|
902
|
+
// Limit the analytic FP chain length; longer chains bloat program keys and shader complexity.
|
|
903
|
+
// Excess elements fall through to the mask path.
|
|
904
|
+
constexpr size_t MaxAnalyticFPs = 4;
|
|
905
|
+
size_t analyticFPCount = 0;
|
|
906
|
+
for (size_t i = clipStack.oldestValidIndex(); i < elements.size(); ++i) {
|
|
907
|
+
auto& element = elements[i];
|
|
908
|
+
if (!element.isValid()) {
|
|
909
|
+
continue;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// Inner and outer bounds coincide only for an axis-aligned rect whose device footprint is an
|
|
913
|
+
// exact integer pixel box: any non-AA rect (snapped to the grid) or a pixel-aligned AA rect.
|
|
914
|
+
// Such an element is exactly an integer scissor rect already covered by the clipBounds scissor,
|
|
915
|
+
// so it needs no coverage FP or mask.
|
|
916
|
+
if (element.innerBounds() == element.outerBounds()) {
|
|
917
|
+
continue;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
// Prefer the analytic FP path: it evaluates coverage in the shader and avoids the extra
|
|
921
|
+
// texture allocation and render pass of the mask path.
|
|
922
|
+
if (analyticFPCount < MaxAnalyticFPs) {
|
|
923
|
+
auto [success, result] = tryApplyAnalyticFP(element, std::move(clipFP));
|
|
924
|
+
clipFP = std::move(result);
|
|
925
|
+
if (success) {
|
|
926
|
+
++analyticFPCount;
|
|
927
|
+
continue;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
// Collect elements that need mask processing.
|
|
932
|
+
elementsForMask.push_back(&element);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// Stage 4: Generate mask for remaining elements
|
|
936
|
+
if (!elementsForMask.empty()) {
|
|
937
|
+
clipFP = getClipMaskFP(elementsForMask, clipStack.uniqueID(), clipBounds, std::move(clipFP));
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
out.coverageFP = std::move(clipFP);
|
|
941
|
+
out.status = AppliedClipStatus::Clipped;
|
|
942
|
+
return out;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
std::pair<bool, PlacementPtr<FragmentProcessor>> OpsCompositor::tryApplyAnalyticFP(
|
|
946
|
+
const ClipElement& element, PlacementPtr<FragmentProcessor> inputFP) const {
|
|
947
|
+
// The shader reads gl_FragCoord in window space, so append the render-target-to-window-space
|
|
948
|
+
// transform to the element's matrix.
|
|
949
|
+
auto matrix = element.matrix();
|
|
950
|
+
matrix.postConcat(renderTarget->getOriginTransform());
|
|
951
|
+
PlacementPtr<FragmentProcessor> elementFP = nullptr;
|
|
952
|
+
// Analytic FPs need a linear device-to-local inverse to reconstruct local coordinates in the
|
|
953
|
+
// shader, which a perspective matrix cannot provide; such elements fall through to the mask path.
|
|
954
|
+
if (!matrix.hasPerspective()) {
|
|
955
|
+
const bool aa = element.antiAlias();
|
|
956
|
+
const auto& shape = element.shape();
|
|
957
|
+
switch (shape.type()) {
|
|
958
|
+
case GeometryShape::Type::Rect:
|
|
959
|
+
elementFP = RectEffect::Make(drawingAllocator(), shape.rect(), matrix, aa);
|
|
960
|
+
break;
|
|
961
|
+
case GeometryShape::Type::RRect: {
|
|
962
|
+
const auto& rRect = shape.rRect();
|
|
963
|
+
if (rRect.type() == RRect::Type::Rect) {
|
|
964
|
+
elementFP = RectEffect::Make(drawingAllocator(), rRect.rect(), matrix, aa);
|
|
965
|
+
} else {
|
|
966
|
+
elementFP = RRectEffect::Make(drawingAllocator(), rRect, matrix, aa);
|
|
967
|
+
}
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
case GeometryShape::Type::Empty:
|
|
971
|
+
case GeometryShape::Type::Path:
|
|
972
|
+
break;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
// No analytic FP for this element (perspective, empty, or path); return the accumulated chain
|
|
976
|
+
// unchanged and report failure.
|
|
977
|
+
if (!elementFP) {
|
|
978
|
+
return {false, std::move(inputFP)};
|
|
979
|
+
}
|
|
980
|
+
if (inputFP) {
|
|
981
|
+
elementFP =
|
|
982
|
+
FragmentProcessor::Compose(drawingAllocator(), std::move(inputFP), std::move(elementFP));
|
|
983
|
+
}
|
|
984
|
+
return {true, std::move(elementFP)};
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
PlacementPtr<FragmentProcessor> OpsCompositor::getClipMaskFP(
|
|
988
|
+
const std::vector<const ClipElement*>& elements, uint32_t uniqueID, const Rect& clipBound,
|
|
989
|
+
PlacementPtr<FragmentProcessor> inputFP) {
|
|
990
|
+
// OpsCompositor is bound to a single RenderTarget, so using uniqueID alone as the cache key
|
|
991
|
+
// (without clipBound) is safe.
|
|
992
|
+
if (uniqueID == cachedClipID && clipTexture) {
|
|
993
|
+
return makeMaskFP(clipTexture, clipBound, std::move(inputFP));
|
|
994
|
+
}
|
|
995
|
+
clipTexture = makeClipTexture(elements, clipBound);
|
|
996
|
+
if (clipTexture == nullptr) {
|
|
997
|
+
DEBUG_ASSERT(false);
|
|
998
|
+
return inputFP;
|
|
999
|
+
}
|
|
1000
|
+
cachedClipID = uniqueID;
|
|
1001
|
+
return makeMaskFP(clipTexture, clipBound, std::move(inputFP));
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
std::shared_ptr<TextureProxy> OpsCompositor::makeClipTexture(
|
|
1005
|
+
const std::vector<const ClipElement*>& elements, const Rect& bounds) const {
|
|
1006
|
+
const auto width = FloatSaturateToInt(bounds.width());
|
|
1007
|
+
const auto height = FloatSaturateToInt(bounds.height());
|
|
1008
|
+
const auto rasterizeMatrix = Matrix::MakeTrans(-bounds.left, -bounds.top);
|
|
1009
|
+
auto clipRenderTarget = RenderTargetProxy::Make(context, width, height, true, 1, false,
|
|
1010
|
+
ImageOrigin::TopLeft, BackingFit::Approx);
|
|
1011
|
+
if (clipRenderTarget == nullptr) {
|
|
1012
|
+
DEBUG_ASSERT(false);
|
|
1013
|
+
return nullptr;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
std::vector<PlacementPtr<DrawOp>> clipDrawOps;
|
|
1017
|
+
clipDrawOps.reserve(elements.size());
|
|
1018
|
+
for (size_t i = 0; i < elements.size(); ++i) {
|
|
1019
|
+
const auto element = elements[i];
|
|
1020
|
+
DEBUG_ASSERT(element->isValid());
|
|
1021
|
+
const auto aaType = element->antiAlias() ? AAType::Coverage : AAType::None;
|
|
1022
|
+
auto clipBounds = Rect::MakeWH(width, height);
|
|
1023
|
+
auto path = element->getDevicePath();
|
|
1024
|
+
if (i > 0) {
|
|
1025
|
+
// Modulate blend erases the mask when hasCoverage is true (source coefficient becomes zero).
|
|
1026
|
+
// Use inverse fill + DstOut to erase areas outside each clip shape instead.
|
|
1027
|
+
path.toggleInverseFillType();
|
|
1028
|
+
}
|
|
1029
|
+
auto shape = Shape::MakeFrom(path);
|
|
1030
|
+
shape = Shape::ApplyMatrix(std::move(shape), rasterizeMatrix);
|
|
1031
|
+
auto shapeProxy = proxyProvider()->createGPUShapeProxy(shape, aaType, clipBounds, renderFlags);
|
|
1032
|
+
auto uvMatrix = Matrix::MakeTrans(bounds.left, bounds.top);
|
|
1033
|
+
auto drawOp = ShapeDrawOp::Make(std::move(shapeProxy), {}, uvMatrix, aaType);
|
|
1034
|
+
if (i > 0) {
|
|
1035
|
+
drawOp->setBlendMode(BlendMode::DstOut);
|
|
1036
|
+
}
|
|
1037
|
+
clipDrawOps.emplace_back(std::move(drawOp));
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
auto opArray = drawingAllocator()->makeArray(std::move(clipDrawOps));
|
|
1041
|
+
auto textureProxy = clipRenderTarget->asTextureProxy();
|
|
1042
|
+
context->drawingManager()->addOpsRenderTask(std::move(clipRenderTarget), std::move(opArray),
|
|
1043
|
+
PMColor::Transparent());
|
|
1044
|
+
return textureProxy;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
PlacementPtr<FragmentProcessor> OpsCompositor::makeMaskFP(
|
|
1048
|
+
std::shared_ptr<TextureProxy> maskTexture, const Rect& bounds,
|
|
1049
|
+
PlacementPtr<FragmentProcessor> inputFP) const {
|
|
1050
|
+
const auto allocator = drawingAllocator();
|
|
1051
|
+
auto uvMatrix = Matrix::MakeTrans(-bounds.left, -bounds.top);
|
|
1052
|
+
if (renderTarget->origin() == ImageOrigin::BottomLeft) {
|
|
1053
|
+
uvMatrix.preConcat(renderTarget->getOriginTransform());
|
|
1054
|
+
}
|
|
1055
|
+
PlacementPtr<FragmentProcessor> maskFP =
|
|
1056
|
+
DeviceSpaceTextureEffect::Make(allocator, std::move(maskTexture), uvMatrix);
|
|
1057
|
+
maskFP = FragmentProcessor::MulInputByChildAlpha(allocator, std::move(maskFP));
|
|
1058
|
+
if (!inputFP) {
|
|
1059
|
+
return maskFP;
|
|
1060
|
+
}
|
|
1061
|
+
return FragmentProcessor::Compose(allocator, std::move(maskFP), std::move(inputFP));
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
DstTextureInfo OpsCompositor::makeDstTextureInfo(const Rect& deviceBounds, AAType aaType) {
|
|
1065
|
+
if (context->shaderCaps()->frameBufferFetchSupport) {
|
|
1066
|
+
return {};
|
|
1067
|
+
}
|
|
1068
|
+
Rect bounds = {};
|
|
1069
|
+
auto features = context->gpu()->features();
|
|
1070
|
+
auto textureProxy = features->textureBarrier ? renderTarget->asTextureProxy() : nullptr;
|
|
1071
|
+
if (textureProxy == nullptr || renderTarget->sampleCount() > 1) {
|
|
1072
|
+
if (deviceBounds.isEmpty()) {
|
|
1073
|
+
return {};
|
|
1074
|
+
}
|
|
1075
|
+
bounds = deviceBounds;
|
|
1076
|
+
if (aaType != AAType::None) {
|
|
1077
|
+
bounds.outset(1.0f, 1.0f);
|
|
1078
|
+
}
|
|
1079
|
+
bounds.roundOut();
|
|
1080
|
+
if (!bounds.intersect(renderTarget->bounds())) {
|
|
1081
|
+
return {};
|
|
1082
|
+
}
|
|
1083
|
+
FlipYIfNeeded(&bounds, renderTarget.get());
|
|
1084
|
+
}
|
|
1085
|
+
DstTextureInfo dstTextureInfo = {};
|
|
1086
|
+
if (textureProxy != nullptr) {
|
|
1087
|
+
if (renderTarget->sampleCount() > 1) {
|
|
1088
|
+
// Submit draw ops immediately to ensure the MSAA render target is resolved.
|
|
1089
|
+
submitDrawOps();
|
|
1090
|
+
}
|
|
1091
|
+
dstTextureInfo.textureProxy = std::move(textureProxy);
|
|
1092
|
+
return dstTextureInfo;
|
|
1093
|
+
}
|
|
1094
|
+
submitDrawOps();
|
|
1095
|
+
dstTextureInfo.offset = {bounds.x(), bounds.y()};
|
|
1096
|
+
textureProxy = proxyProvider()->createTextureProxy(
|
|
1097
|
+
{}, static_cast<int>(bounds.width()), static_cast<int>(bounds.height()),
|
|
1098
|
+
renderTarget->format(), false, renderTarget->origin(), BackingFit::Approx);
|
|
1099
|
+
if (textureProxy == nullptr) {
|
|
1100
|
+
return {};
|
|
1101
|
+
}
|
|
1102
|
+
context->drawingManager()->addRenderTargetCopyTask(
|
|
1103
|
+
renderTarget, textureProxy, static_cast<int>(bounds.x()), static_cast<int>(bounds.y()));
|
|
1104
|
+
dstTextureInfo.textureProxy = std::move(textureProxy);
|
|
1105
|
+
return dstTextureInfo;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
void OpsCompositor::addDrawOp(PlacementPtr<DrawOp> op, const ClipStack& clip, const Brush& brush,
|
|
1109
|
+
const std::optional<Rect>& localBounds,
|
|
1110
|
+
const std::optional<Rect>& deviceBounds, float drawScale) {
|
|
1111
|
+
|
|
1112
|
+
if (op == nullptr || brush.nothingToDraw()) {
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
DEBUG_ASSERT(renderTarget != nullptr);
|
|
1116
|
+
if (localBounds.has_value() && localBounds->isEmpty()) {
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
auto appliedClip = applyClip(clip);
|
|
1120
|
+
if (appliedClip.status == AppliedClipStatus::ClippedOut) {
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
FPArgs args = {context, renderFlags, localBounds.value_or(Rect::MakeEmpty()), drawScale};
|
|
1125
|
+
auto colorFilter = brush.colorFilter;
|
|
1126
|
+
if (brush.shader) {
|
|
1127
|
+
auto shader = brush.shader;
|
|
1128
|
+
// If the color filter transforms transparent pixels into non-transparent ones, merge it with
|
|
1129
|
+
// the shader so that the original shader alpha masks the color filter output.
|
|
1130
|
+
if (colorFilter && colorFilter->affectsTransparentBlack()) {
|
|
1131
|
+
shader = shader->makeWithColorFilter(colorFilter);
|
|
1132
|
+
colorFilter = nullptr;
|
|
1133
|
+
}
|
|
1134
|
+
if (auto processor = FragmentProcessor::Make(shader, args, nullptr, dstColorSpace)) {
|
|
1135
|
+
op->addColorFP(std::move(processor));
|
|
1136
|
+
} else {
|
|
1137
|
+
// The shader is the main source of color, so if it fails to create a processor, we can't
|
|
1138
|
+
// draw anything.
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
if (colorFilter) {
|
|
1143
|
+
if (auto processor = colorFilter->asFragmentProcessor(context, dstColorSpace)) {
|
|
1144
|
+
op->addColorFP(std::move(processor));
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
if (brush.maskFilter) {
|
|
1148
|
+
if (auto processor = brush.maskFilter->asFragmentProcessor(args, nullptr)) {
|
|
1149
|
+
op->addCoverageFP(std::move(processor));
|
|
1150
|
+
} else {
|
|
1151
|
+
// if mask is empty, nothing to draw
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (appliedClip.coverageFP) {
|
|
1157
|
+
op->addCoverageFP(std::move(appliedClip.coverageFP));
|
|
1158
|
+
}
|
|
1159
|
+
if (appliedClip.scissor.has_value()) {
|
|
1160
|
+
op->setScissorRect(*appliedClip.scissor);
|
|
1161
|
+
}
|
|
1162
|
+
op->setBlendMode(brush.blendMode);
|
|
1163
|
+
auto aaType = getAAType(brush);
|
|
1164
|
+
if (BlendModeNeedDstTexture(brush.blendMode, op->hasCoverage())) {
|
|
1165
|
+
auto dstTextureInfo = makeDstTextureInfo(deviceBounds.value_or(Rect::MakeEmpty()), aaType);
|
|
1166
|
+
auto shaderCaps = context->shaderCaps();
|
|
1167
|
+
if (!shaderCaps->frameBufferFetchSupport && dstTextureInfo.textureProxy == nullptr) {
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
auto xferProcessor = PorterDuffXferProcessor::Make(drawingAllocator(), brush.blendMode,
|
|
1171
|
+
std::move(dstTextureInfo));
|
|
1172
|
+
op->setXferProcessor(std::move(xferProcessor));
|
|
1173
|
+
}
|
|
1174
|
+
drawOps.emplace_back(std::move(op));
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
void OpsCompositor::fillTextAtlas(std::shared_ptr<TextureProxy> textureProxy, const Rect& rect,
|
|
1178
|
+
const SamplingOptions& sampling, const Matrix& matrix,
|
|
1179
|
+
const ClipStack& clip, const Brush& brush) {
|
|
1180
|
+
DEBUG_ASSERT(textureProxy != nullptr);
|
|
1181
|
+
DEBUG_ASSERT(!rect.isEmpty());
|
|
1182
|
+
if (!canAppend(PendingOpType::Atlas, clip, brush) || pendingAtlasTexture != textureProxy ||
|
|
1183
|
+
pendingSampling != sampling) {
|
|
1184
|
+
flushPendingOps(PendingOpType::Atlas, clip, brush);
|
|
1185
|
+
pendingAtlasTexture = std::move(textureProxy);
|
|
1186
|
+
pendingSampling = sampling;
|
|
1187
|
+
}
|
|
1188
|
+
auto record = drawingAllocator()->make<RectRecord>(rect, matrix, brush.color);
|
|
1189
|
+
pendingRects.emplace_back(std::move(record));
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
void OpsCompositor::submitDrawOps() {
|
|
1193
|
+
auto opArray = drawingAllocator()->makeArray(std::move(drawOps));
|
|
1194
|
+
context->drawingManager()->addOpsRenderTask(renderTarget, std::move(opArray), clearColor);
|
|
1195
|
+
clearColor.reset();
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
} // namespace tgfx
|