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,1250 @@
|
|
|
1
|
+
/////////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
//
|
|
3
|
+
// Tencent is pleased to support the open source community by making tgfx available.
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) 2024 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 "tgfx/layers/DisplayList.h"
|
|
20
|
+
#include <algorithm>
|
|
21
|
+
#include "core/utils/DecomposeRects.h"
|
|
22
|
+
#include "core/utils/Log.h"
|
|
23
|
+
#include "core/utils/MathExtra.h"
|
|
24
|
+
#include "core/utils/TileSortCompareFunc.h"
|
|
25
|
+
#include "layers/BackgroundHandler.h"
|
|
26
|
+
#include "layers/BackgroundSnapshotMap.h"
|
|
27
|
+
#include "layers/BackgroundSource.h"
|
|
28
|
+
#include "layers/DrawArgs.h"
|
|
29
|
+
#include "layers/RootLayer.h"
|
|
30
|
+
#include "layers/TileCache.h"
|
|
31
|
+
#include "tgfx/gpu/GPU.h"
|
|
32
|
+
|
|
33
|
+
namespace tgfx {
|
|
34
|
+
static constexpr size_t MAX_DIRTY_REGION_FRAMES = 5;
|
|
35
|
+
static constexpr float DIRTY_REGION_ANTIALIAS_MARGIN = 0.5f;
|
|
36
|
+
static constexpr int MIN_TILE_SIZE = 16;
|
|
37
|
+
static constexpr int MAX_TILE_SIZE = 2048;
|
|
38
|
+
static constexpr int FALLBACK_GRID_SIZE = 64;
|
|
39
|
+
static constexpr int MAX_ATLAS_SIZE = 8192;
|
|
40
|
+
|
|
41
|
+
class DrawTask {
|
|
42
|
+
public:
|
|
43
|
+
DrawTask(std::shared_ptr<Tile> tile, int tileSize, const Rect& drawRect = {}, float scale = 1.0f)
|
|
44
|
+
: tiles({std::move(tile)}), _identityScale(scale == 1.0f) {
|
|
45
|
+
calculateRects(tileSize, drawRect, scale);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
DrawTask(std::vector<std::shared_ptr<Tile>> tiles, int tileSize, const Rect& drawRect)
|
|
49
|
+
: tiles(std::move(tiles)) {
|
|
50
|
+
DEBUG_ASSERT(!drawRect.isEmpty());
|
|
51
|
+
calculateRects(tileSize, drawRect, 1.0f);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the index of the atlas in the surface caches.
|
|
56
|
+
*/
|
|
57
|
+
size_t sourceIndex() const {
|
|
58
|
+
return tiles.front()->sourceIndex;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Returns the source rectangle of the tile in the atlas.
|
|
63
|
+
*/
|
|
64
|
+
const Rect& sourceRect() const {
|
|
65
|
+
return _sourceRect;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns the rectangle of the tile in the zoomed display list grid.
|
|
70
|
+
*/
|
|
71
|
+
const Rect& tileRect() const {
|
|
72
|
+
return _tileRect;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const Rect& strictRect() const {
|
|
76
|
+
return _strictRect;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const std::vector<std::shared_ptr<Tile>>& getTiles() const {
|
|
80
|
+
return tiles;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
bool identityScale() const {
|
|
84
|
+
return _identityScale;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
private:
|
|
88
|
+
// Hold strong references to tiles to ensure they aren't reused by TileCache.
|
|
89
|
+
std::vector<std::shared_ptr<Tile>> tiles = {};
|
|
90
|
+
Rect _sourceRect = {};
|
|
91
|
+
Rect _tileRect = {};
|
|
92
|
+
Rect _strictRect = {};
|
|
93
|
+
bool _identityScale = true;
|
|
94
|
+
|
|
95
|
+
void calculateRects(int tileSize, const Rect& drawRect, float scale) {
|
|
96
|
+
DEBUG_ASSERT(!tiles.empty());
|
|
97
|
+
DEBUG_ASSERT(std::all_of(tiles.begin(), tiles.end(), [&](const std::shared_ptr<Tile>& t) {
|
|
98
|
+
return t->sourceIndex == tiles.front()->sourceIndex;
|
|
99
|
+
}));
|
|
100
|
+
auto& tile = tiles.front();
|
|
101
|
+
_tileRect = drawRect.isEmpty() ? tile->getTileRect(tileSize) : drawRect;
|
|
102
|
+
_sourceRect = _tileRect;
|
|
103
|
+
auto offsetX = (tile->sourceX - tile->tileX) * tileSize;
|
|
104
|
+
auto offsetY = (tile->sourceY - tile->tileY) * tileSize;
|
|
105
|
+
_sourceRect.offset(static_cast<float>(offsetX), static_cast<float>(offsetY));
|
|
106
|
+
_tileRect.scale(scale, scale);
|
|
107
|
+
_strictRect = tile->getSourceRect(tileSize);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
static std::vector<Rect> GetNonIntersectingRects(const Rect& a, const Rect& b) {
|
|
112
|
+
std::vector<Rect> rects = {};
|
|
113
|
+
auto leftRect = Rect::MakeLTRB(a.left, a.top, b.left, b.bottom);
|
|
114
|
+
if (!leftRect.isEmpty()) {
|
|
115
|
+
rects.emplace_back(leftRect);
|
|
116
|
+
}
|
|
117
|
+
auto topRect = Rect::MakeLTRB(b.left, a.top, a.right, b.top);
|
|
118
|
+
if (!topRect.isEmpty()) {
|
|
119
|
+
rects.emplace_back(topRect);
|
|
120
|
+
}
|
|
121
|
+
auto rightRect = Rect::MakeLTRB(b.right, b.top, a.right, a.bottom);
|
|
122
|
+
if (!rightRect.isEmpty()) {
|
|
123
|
+
rects.emplace_back(rightRect);
|
|
124
|
+
}
|
|
125
|
+
auto bottomRect = Rect::MakeLTRB(a.left, b.bottom, b.right, a.bottom);
|
|
126
|
+
if (!bottomRect.isEmpty()) {
|
|
127
|
+
rects.emplace_back(bottomRect);
|
|
128
|
+
}
|
|
129
|
+
return rects;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static float ToZoomScaleFloat(int64_t zoomScaleInt, int64_t precision) {
|
|
133
|
+
if (zoomScaleInt < 0) {
|
|
134
|
+
return static_cast<float>(precision) / static_cast<float>(-zoomScaleInt);
|
|
135
|
+
}
|
|
136
|
+
return static_cast<float>(zoomScaleInt) / static_cast<float>(precision);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static int64_t ToZoomScaleInt(float zoomScaleFloat, int64_t precision) {
|
|
140
|
+
if (zoomScaleFloat < 0.0f || FloatNearlyZero(zoomScaleFloat)) {
|
|
141
|
+
return 0;
|
|
142
|
+
}
|
|
143
|
+
if (zoomScaleFloat < 1.0f) {
|
|
144
|
+
return -static_cast<int64_t>(std::roundf(static_cast<float>(precision) / zoomScaleFloat));
|
|
145
|
+
}
|
|
146
|
+
return static_cast<int64_t>(std::roundf(static_cast<float>(precision) * zoomScaleFloat));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
static int64_t ChangeZoomScalePrecision(int64_t zoomScaleInt, int oldPrecision, int newPrecision) {
|
|
150
|
+
return static_cast<int64_t>(
|
|
151
|
+
std::roundf(static_cast<float>(zoomScaleInt) * static_cast<float>(newPrecision) /
|
|
152
|
+
static_cast<float>(oldPrecision)));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static std::vector<std::pair<int, int>> GenerateGridTiles(int startX, int endX, int startY,
|
|
156
|
+
int endY) {
|
|
157
|
+
std::vector<std::pair<int, int>> tiles;
|
|
158
|
+
for (auto tileY = startY; tileY < endY; ++tileY) {
|
|
159
|
+
for (auto tileX = startX; tileX < endX; ++tileX) {
|
|
160
|
+
tiles.emplace_back(tileX, tileY);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return tiles;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
static std::vector<std::pair<int, int>> GetSortedTiles(int startX, int endX, int startY, int endY,
|
|
167
|
+
int tileSize, const Point& mousePosition) {
|
|
168
|
+
|
|
169
|
+
auto tiles = GenerateGridTiles(startX, endX, startY, endY);
|
|
170
|
+
std::sort(tiles.begin(), tiles.end(),
|
|
171
|
+
[&mousePosition, tileSize = static_cast<float>(tileSize)](
|
|
172
|
+
const std::pair<int, int>& a, const std::pair<int, int>& b) {
|
|
173
|
+
return TileSortCompareFunc(mousePosition, tileSize, a, b);
|
|
174
|
+
});
|
|
175
|
+
return tiles;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
DisplayList::DisplayList() : _root(RootLayer::Make()) {
|
|
179
|
+
_root->_root = _root.get();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
DisplayList::~DisplayList() {
|
|
183
|
+
resetCaches();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
Layer* DisplayList::root() const {
|
|
187
|
+
return _root.get();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
float DisplayList::zoomScale() const {
|
|
191
|
+
return ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
void DisplayList::setZoomScale(float zoomScale) {
|
|
195
|
+
auto zoomScaleInt = ToZoomScaleInt(zoomScale, _zoomScalePrecision);
|
|
196
|
+
if (_zoomScaleInt == zoomScaleInt) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
_hasContentChanged = true;
|
|
200
|
+
_zoomScaleInt = zoomScaleInt;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
void DisplayList::setZoomScalePrecision(int precision) {
|
|
204
|
+
if (precision < 1) {
|
|
205
|
+
precision = 1;
|
|
206
|
+
}
|
|
207
|
+
if (_zoomScalePrecision == precision) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
auto oldPrecision = _zoomScalePrecision;
|
|
211
|
+
_zoomScalePrecision = precision;
|
|
212
|
+
_zoomScaleInt = ChangeZoomScalePrecision(_zoomScaleInt, oldPrecision, precision);
|
|
213
|
+
lastZoomScaleInt = ChangeZoomScalePrecision(lastZoomScaleInt, oldPrecision, precision);
|
|
214
|
+
if (!tileCaches.empty()) {
|
|
215
|
+
std::unordered_map<int64_t, TileCache*> newCaches = {};
|
|
216
|
+
for (auto& item : tileCaches) {
|
|
217
|
+
auto zoomScaleInt = ChangeZoomScalePrecision(item.first, oldPrecision, _zoomScalePrecision);
|
|
218
|
+
newCaches[zoomScaleInt] = item.second;
|
|
219
|
+
}
|
|
220
|
+
tileCaches = std::move(newCaches);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
void DisplayList::setContentOffset(float offsetX, float offsetY) {
|
|
225
|
+
// Round to integer pixels to avoid subpixel positioning artifacts.
|
|
226
|
+
offsetX = roundf(offsetX);
|
|
227
|
+
offsetY = roundf(offsetY);
|
|
228
|
+
if (offsetX == _contentOffset.x && offsetY == _contentOffset.y) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
_hasContentChanged = true;
|
|
232
|
+
_contentOffset.x = offsetX;
|
|
233
|
+
_contentOffset.y = offsetY;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
void DisplayList::setRenderMode(RenderMode renderMode) {
|
|
237
|
+
if (_renderMode == renderMode) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (_renderMode != RenderMode::Direct) {
|
|
241
|
+
resetCaches();
|
|
242
|
+
}
|
|
243
|
+
_renderMode = renderMode;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
void DisplayList::setTileSize(int tileSize) {
|
|
247
|
+
if (tileSize < MIN_TILE_SIZE) {
|
|
248
|
+
tileSize = MIN_TILE_SIZE;
|
|
249
|
+
}
|
|
250
|
+
if (tileSize > MAX_TILE_SIZE) {
|
|
251
|
+
tileSize = MAX_TILE_SIZE;
|
|
252
|
+
}
|
|
253
|
+
if (tileSize & (tileSize - 1)) {
|
|
254
|
+
// Ensure tileSize is a power of two.
|
|
255
|
+
tileSize = 1 << static_cast<int>(std::log2(tileSize));
|
|
256
|
+
}
|
|
257
|
+
if (_tileSize == tileSize) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
_tileSize = tileSize;
|
|
261
|
+
if (_renderMode == RenderMode::Tiled) {
|
|
262
|
+
resetCaches();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
void DisplayList::setMaxTileCount(int count) {
|
|
267
|
+
if (count < 0) {
|
|
268
|
+
count = 0;
|
|
269
|
+
}
|
|
270
|
+
if (_maxTileCount == count) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
_maxTileCount = count;
|
|
274
|
+
resetCaches();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
void DisplayList::setBackgroundColor(const Color& color) {
|
|
278
|
+
if (_backgroundColor == color) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
_backgroundColor = color;
|
|
282
|
+
_root->invalidateContent();
|
|
283
|
+
resetCaches();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
void DisplayList::setSubtreeCacheMaxSize(int maxSize) {
|
|
287
|
+
if (maxSize < 0) {
|
|
288
|
+
maxSize = 0;
|
|
289
|
+
}
|
|
290
|
+
_subtreeCacheMaxSize = maxSize;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
void DisplayList::showDirtyRegions(bool show) {
|
|
294
|
+
if (_showDirtyRegions == show) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
_showDirtyRegions = show;
|
|
298
|
+
if (!_showDirtyRegions) {
|
|
299
|
+
lastDirtyRegions = {};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
bool DisplayList::hasContentChanged() const {
|
|
304
|
+
if (_hasContentChanged || hasZoomBlurTiles || _root->bitFields.dirtyDescendents) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
if (!_showDirtyRegions) {
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
for (auto& regions : lastDirtyRegions) {
|
|
311
|
+
if (!regions.empty()) {
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
void DisplayList::render(Surface* surface, bool autoClear) {
|
|
319
|
+
if (!surface) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
_hasContentChanged = false;
|
|
323
|
+
auto dirtyRegions = _root->updateDirtyRegions();
|
|
324
|
+
if (_zoomScaleInt == 0) {
|
|
325
|
+
if (autoClear) {
|
|
326
|
+
auto canvas = surface->getCanvas();
|
|
327
|
+
canvas->clear();
|
|
328
|
+
}
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
switch (_renderMode) {
|
|
332
|
+
case RenderMode::Direct:
|
|
333
|
+
dirtyRegions = renderDirect(surface, autoClear);
|
|
334
|
+
break;
|
|
335
|
+
case RenderMode::Partial:
|
|
336
|
+
dirtyRegions = renderPartial(surface, autoClear, dirtyRegions);
|
|
337
|
+
break;
|
|
338
|
+
case RenderMode::Tiled:
|
|
339
|
+
dirtyRegions = renderTiled(surface, autoClear, dirtyRegions);
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
if (_showDirtyRegions) {
|
|
343
|
+
renderDirtyRegions(surface->getCanvas(), std::move(dirtyRegions));
|
|
344
|
+
}
|
|
345
|
+
_root->updateStaticSubtreeFlags();
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
std::vector<Rect> DisplayList::renderDirect(Surface* surface, bool autoClear) const {
|
|
349
|
+
auto surfaceRect = Rect::MakeWH(surface->width(), surface->height());
|
|
350
|
+
std::unique_ptr<BackgroundSnapshotMap> snapshotMap = nullptr;
|
|
351
|
+
if (_root->hasBackgroundStyle()) {
|
|
352
|
+
snapshotMap = captureBackgrounds(surface, {surfaceRect});
|
|
353
|
+
}
|
|
354
|
+
drawRootLayer(surface, surfaceRect, getViewMatrix(), autoClear, snapshotMap.get());
|
|
355
|
+
return {Rect::MakeEmpty()};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
static std::vector<Rect> MapDirtyRegions(const std::vector<Rect>& dirtyRegions,
|
|
359
|
+
const Matrix& viewMatrix, bool decompose = false,
|
|
360
|
+
const Rect* clipRect = nullptr) {
|
|
361
|
+
std::vector<Rect> dirtyRects = {};
|
|
362
|
+
dirtyRects.reserve(dirtyRegions.size());
|
|
363
|
+
for (auto& region : dirtyRegions) {
|
|
364
|
+
auto dirtyRect = viewMatrix.mapRect(region);
|
|
365
|
+
if (dirtyRect.isEmpty()) {
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
// Expand by 0.5 pixels to preserve antialiasing results.
|
|
369
|
+
dirtyRect.outset(DIRTY_REGION_ANTIALIAS_MARGIN, DIRTY_REGION_ANTIALIAS_MARGIN);
|
|
370
|
+
// Snap to pixel boundaries to avoid subpixel clipping artifacts.
|
|
371
|
+
dirtyRect.roundOut();
|
|
372
|
+
if (!clipRect || dirtyRect.intersect(*clipRect)) {
|
|
373
|
+
dirtyRects.push_back(dirtyRect);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
if (decompose) {
|
|
377
|
+
DecomposeRects(dirtyRects.data(), dirtyRects.size());
|
|
378
|
+
}
|
|
379
|
+
return dirtyRects;
|
|
380
|
+
}
|
|
381
|
+
std::vector<Rect> DisplayList::renderPartial(Surface* surface, bool autoClear,
|
|
382
|
+
const std::vector<Rect>& dirtyRegions) {
|
|
383
|
+
auto context = surface->getContext();
|
|
384
|
+
bool cacheChanged = false;
|
|
385
|
+
auto partialCache = surfaceCaches.empty() ? nullptr : surfaceCaches.front();
|
|
386
|
+
if (partialCache == nullptr || partialCache->getContext() != context ||
|
|
387
|
+
partialCache->width() != surface->width() || partialCache->height() != surface->height() ||
|
|
388
|
+
!ColorSpace::Equals(partialCache->colorSpace().get(), surface->colorSpace().get())) {
|
|
389
|
+
surfaceCaches.clear();
|
|
390
|
+
partialCache = Surface::Make(context, surface->width(), surface->height(), ColorType::RGBA_8888,
|
|
391
|
+
1, false, surface->renderFlags(), surface->colorSpace());
|
|
392
|
+
if (partialCache == nullptr) {
|
|
393
|
+
LOGE("DisplayList::renderPartial: Failed to create partial cache surface.");
|
|
394
|
+
return renderDirect(surface, autoClear);
|
|
395
|
+
}
|
|
396
|
+
surfaceCaches.push_back(partialCache);
|
|
397
|
+
cacheChanged = true;
|
|
398
|
+
}
|
|
399
|
+
auto viewMatrix = getViewMatrix();
|
|
400
|
+
auto surfaceRect = Rect::MakeWH(surface->width(), surface->height());
|
|
401
|
+
std::vector<Rect> renderRects = {};
|
|
402
|
+
if (cacheChanged || lastZoomScaleInt != _zoomScaleInt || lastContentOffset != _contentOffset) {
|
|
403
|
+
renderRects = {surfaceRect};
|
|
404
|
+
lastZoomScaleInt = _zoomScaleInt;
|
|
405
|
+
lastContentOffset = _contentOffset;
|
|
406
|
+
} else {
|
|
407
|
+
renderRects = MapDirtyRegions(dirtyRegions, viewMatrix, true, &surfaceRect);
|
|
408
|
+
}
|
|
409
|
+
// Pass the full rect list so each replay is scoped to a single rect; otherwise Layers in the
|
|
410
|
+
// gaps between scattered dirty regions get skipped.
|
|
411
|
+
std::unique_ptr<BackgroundSnapshotMap> snapshotMap = nullptr;
|
|
412
|
+
if (_root->hasBackgroundStyle()) {
|
|
413
|
+
snapshotMap = captureBackgrounds(surface, renderRects);
|
|
414
|
+
}
|
|
415
|
+
auto canvas = surface->getCanvas();
|
|
416
|
+
for (auto& drawRect : renderRects) {
|
|
417
|
+
drawRootLayer(partialCache.get(), drawRect, viewMatrix, true, snapshotMap.get());
|
|
418
|
+
}
|
|
419
|
+
AutoCanvasRestore restore(canvas);
|
|
420
|
+
canvas->resetMatrix();
|
|
421
|
+
Paint paint = {};
|
|
422
|
+
paint.setAntiAlias(false);
|
|
423
|
+
if (autoClear) {
|
|
424
|
+
paint.setBlendMode(BlendMode::Src);
|
|
425
|
+
}
|
|
426
|
+
static SamplingOptions sampling(FilterMode::Nearest);
|
|
427
|
+
canvas->drawImage(partialCache->makeImageSnapshot(), sampling, &paint);
|
|
428
|
+
return renderRects;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
std::vector<Rect> DisplayList::renderTiled(Surface* surface, bool autoClear,
|
|
432
|
+
const std::vector<Rect>& dirtyRegions) {
|
|
433
|
+
if (!surfaceCaches.empty() && (surfaceCaches.front()->getContext() != surface->getContext() ||
|
|
434
|
+
!ColorSpace::Equals(surfaceCaches.front()->colorSpace().get(),
|
|
435
|
+
surface->colorSpace().get()))) {
|
|
436
|
+
resetCaches();
|
|
437
|
+
}
|
|
438
|
+
checkTileCount(surface);
|
|
439
|
+
auto tileTasks = invalidateTileCaches(dirtyRegions);
|
|
440
|
+
std::vector<Rect> skippedRects = {};
|
|
441
|
+
std::vector<DrawTask> throttleScreenTasks = {};
|
|
442
|
+
auto screenTasks = collectScreenTasks(surface, !dirtyRegions.empty(), autoClear, &tileTasks,
|
|
443
|
+
&skippedRects, &throttleScreenTasks);
|
|
444
|
+
// Throttle tasks and skipped rects must keep the tiled path; only fall back when all are empty.
|
|
445
|
+
if (screenTasks.empty() && throttleScreenTasks.empty() && skippedRects.empty()) {
|
|
446
|
+
recycleCurrentTileTasks(tileTasks);
|
|
447
|
+
return renderDirect(surface, autoClear);
|
|
448
|
+
}
|
|
449
|
+
// tileRect is in zoom space; offset by contentOffset to line it up with surface pixel coords.
|
|
450
|
+
std::unique_ptr<BackgroundSnapshotMap> snapshotMap = nullptr;
|
|
451
|
+
if (_root->hasBackgroundStyle()) {
|
|
452
|
+
std::vector<Rect> captureRects = {};
|
|
453
|
+
captureRects.reserve(tileTasks.size());
|
|
454
|
+
for (auto& task : tileTasks) {
|
|
455
|
+
auto captureRect = task.tileRect();
|
|
456
|
+
captureRect.offset(_contentOffset.x, _contentOffset.y);
|
|
457
|
+
captureRects.push_back(captureRect);
|
|
458
|
+
}
|
|
459
|
+
snapshotMap = captureBackgrounds(surface, captureRects);
|
|
460
|
+
}
|
|
461
|
+
std::vector<Rect> dirtyRects = {};
|
|
462
|
+
auto surfaceRect = Rect::MakeWH(surface->width(), surface->height());
|
|
463
|
+
for (auto& task : tileTasks) {
|
|
464
|
+
drawTileTask(task, snapshotMap.get());
|
|
465
|
+
auto dirtyRect = task.tileRect();
|
|
466
|
+
dirtyRect.offset(_contentOffset.x, _contentOffset.y);
|
|
467
|
+
if (dirtyRect.intersect(surfaceRect)) {
|
|
468
|
+
dirtyRects.emplace_back(dirtyRect);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
drawScreenTasks(std::move(screenTasks), std::move(skippedRects), surface, autoClear);
|
|
472
|
+
drawThrottleScreenTasks(std::move(throttleScreenTasks), surface, autoClear);
|
|
473
|
+
return dirtyRects;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
void DisplayList::checkTileCount(Surface* renderSurface) {
|
|
477
|
+
DEBUG_ASSERT(renderSurface != nullptr);
|
|
478
|
+
const auto tileSizeFloat = static_cast<float>(_tileSize);
|
|
479
|
+
const auto tileCountX =
|
|
480
|
+
FloatCeilToInt(static_cast<float>(renderSurface->width()) / tileSizeFloat);
|
|
481
|
+
const auto tileCountY =
|
|
482
|
+
FloatCeilToInt(static_cast<float>(renderSurface->height()) / tileSizeFloat);
|
|
483
|
+
auto minTileCount = (tileCountX + 1) * (tileCountY + 1);
|
|
484
|
+
if (totalTileCount > 0) {
|
|
485
|
+
if (totalTileCount >= minTileCount) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
resetCaches();
|
|
489
|
+
}
|
|
490
|
+
totalTileCount = std::max(minTileCount, _maxTileCount);
|
|
491
|
+
auto maxTileCountPerAtlas = getMaxTileCountPerAtlas(renderSurface->getContext());
|
|
492
|
+
if (maxTileCountPerAtlas <= 0) {
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
auto remainingTileCount = totalTileCount % maxTileCountPerAtlas;
|
|
496
|
+
totalTileCount -= remainingTileCount;
|
|
497
|
+
auto width = FloatSaturateToInt(sqrtf(static_cast<float>(remainingTileCount)));
|
|
498
|
+
int height = FloatCeilToInt(static_cast<float>(remainingTileCount) / static_cast<float>(width));
|
|
499
|
+
totalTileCount += width * height;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
std::vector<DrawTask> DisplayList::invalidateTileCaches(const std::vector<Rect>& dirtyRegions) {
|
|
503
|
+
if (dirtyRegions.empty()) {
|
|
504
|
+
return {};
|
|
505
|
+
}
|
|
506
|
+
std::vector<DrawTask> tileTasks = {};
|
|
507
|
+
std::vector<int64_t> emptyScales = {};
|
|
508
|
+
for (auto& [scaleInt, tileCache] : tileCaches) {
|
|
509
|
+
if (scaleInt == _zoomScaleInt) {
|
|
510
|
+
invalidateCurrentTileCache(tileCache, dirtyRegions, &tileTasks);
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
auto zoomMatrix = Matrix::MakeScale(ToZoomScaleFloat(scaleInt, _zoomScalePrecision));
|
|
514
|
+
auto dirtyRects = MapDirtyRegions(dirtyRegions, zoomMatrix);
|
|
515
|
+
for (auto& dirtyRect : dirtyRects) {
|
|
516
|
+
auto tiles = tileCache->getTilesUnderRect(dirtyRect);
|
|
517
|
+
for (auto& tile : tiles) {
|
|
518
|
+
tileCache->removeTile(tile->tileX, tile->tileY);
|
|
519
|
+
}
|
|
520
|
+
emptyTiles.insert(emptyTiles.end(), tiles.begin(), tiles.end());
|
|
521
|
+
}
|
|
522
|
+
if (tileCache->empty()) {
|
|
523
|
+
emptyScales.push_back(scaleInt);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
for (auto& scale : emptyScales) {
|
|
527
|
+
auto result = tileCaches.find(scale);
|
|
528
|
+
if (result != tileCaches.end()) {
|
|
529
|
+
delete result->second;
|
|
530
|
+
tileCaches.erase(result);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return tileTasks;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
void DisplayList::recycleCurrentTileTasks(const std::vector<DrawTask>& tileTasks) {
|
|
537
|
+
if (tileTasks.empty()) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
auto result = tileCaches.find(_zoomScaleInt);
|
|
541
|
+
DEBUG_ASSERT(result != tileCaches.end());
|
|
542
|
+
if (result == tileCaches.end()) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
auto tileCache = result->second;
|
|
546
|
+
for (auto& task : tileTasks) {
|
|
547
|
+
for (auto& tile : task.getTiles()) {
|
|
548
|
+
if (tileCache->removeTile(tile->tileX, tile->tileY)) {
|
|
549
|
+
emptyTiles.push_back(tile);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
if (tileCache->empty()) {
|
|
554
|
+
delete tileCache;
|
|
555
|
+
tileCaches.erase(result);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
void DisplayList::invalidateCurrentTileCache(const TileCache* tileCache,
|
|
560
|
+
const std::vector<Rect>& dirtyRegions,
|
|
561
|
+
std::vector<DrawTask>* tileTasks) const {
|
|
562
|
+
auto zoomMatrix = Matrix::MakeScale(ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision));
|
|
563
|
+
auto dirtyRects = MapDirtyRegions(dirtyRegions, zoomMatrix, true);
|
|
564
|
+
for (auto& dirtyRect : dirtyRects) {
|
|
565
|
+
bool continuous = false;
|
|
566
|
+
auto tiles = tileCache->getTilesUnderRect(dirtyRect, false, &continuous);
|
|
567
|
+
if (continuous) {
|
|
568
|
+
tileTasks->emplace_back(std::move(tiles), _tileSize, dirtyRect);
|
|
569
|
+
} else {
|
|
570
|
+
for (auto& tile : tiles) {
|
|
571
|
+
auto drawRect = tile->getTileRect(_tileSize);
|
|
572
|
+
if (drawRect.intersect(dirtyRect)) {
|
|
573
|
+
tileTasks->emplace_back(tile, _tileSize, drawRect);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
std::vector<DrawTask> DisplayList::collectScreenTasks(const Surface* surface, bool hasDirtyRegions,
|
|
581
|
+
bool autoClear,
|
|
582
|
+
std::vector<DrawTask>* tileTasks,
|
|
583
|
+
std::vector<Rect>* skippedRects,
|
|
584
|
+
std::vector<DrawTask>* throttleScreenTasks) {
|
|
585
|
+
auto maxBudget = _maxTilesRefinedPerFrame;
|
|
586
|
+
const auto useFallback = _tileUpdateMode != TileUpdateMode::Immediate;
|
|
587
|
+
if (lastContentOffset != _contentOffset || lastZoomScaleInt != _zoomScaleInt) {
|
|
588
|
+
updateMousePosition();
|
|
589
|
+
lastContentOffset = _contentOffset;
|
|
590
|
+
lastZoomScaleInt = _zoomScaleInt;
|
|
591
|
+
maxBudget = 0;
|
|
592
|
+
}
|
|
593
|
+
hasZoomBlurTiles = false;
|
|
594
|
+
TileCache* currentTileCache = nullptr;
|
|
595
|
+
auto result = tileCaches.find(_zoomScaleInt);
|
|
596
|
+
if (result != tileCaches.end()) {
|
|
597
|
+
currentTileCache = result->second;
|
|
598
|
+
} else {
|
|
599
|
+
currentTileCache = new TileCache(_tileSize);
|
|
600
|
+
tileCaches[_zoomScaleInt] = currentTileCache;
|
|
601
|
+
}
|
|
602
|
+
auto renderRect = Rect::MakeWH(surface->width(), surface->height());
|
|
603
|
+
renderRect.offset(-_contentOffset.x, -_contentOffset.y);
|
|
604
|
+
|
|
605
|
+
auto renderBounds = _root->renderBounds;
|
|
606
|
+
auto zoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
607
|
+
renderBounds.scale(zoomScale, zoomScale);
|
|
608
|
+
renderBounds.roundOut();
|
|
609
|
+
if (!renderRect.intersect(renderBounds)) {
|
|
610
|
+
return {};
|
|
611
|
+
}
|
|
612
|
+
const auto tileSizeFloat = static_cast<float>(_tileSize);
|
|
613
|
+
const auto startX = FloatFloorToInt(renderRect.left / tileSizeFloat);
|
|
614
|
+
const auto startY = FloatFloorToInt(renderRect.top / tileSizeFloat);
|
|
615
|
+
const auto endX = FloatCeilToInt(renderRect.right / tileSizeFloat);
|
|
616
|
+
const auto endY = FloatCeilToInt(renderRect.bottom / tileSizeFloat);
|
|
617
|
+
|
|
618
|
+
if (startX >= endX || startY >= endY) {
|
|
619
|
+
return {};
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
std::vector<DrawTask> screenTasks = {};
|
|
623
|
+
std::vector<std::pair<int, int>> dirtyGrids = {};
|
|
624
|
+
auto tileCount = static_cast<size_t>(endX - startX) * static_cast<size_t>(endY - startY);
|
|
625
|
+
screenTasks.reserve(tileCount);
|
|
626
|
+
dirtyGrids.reserve(tileCount);
|
|
627
|
+
auto sortedCaches = getSortedTileCaches();
|
|
628
|
+
auto fallbackTileCaches = getFallbackTileCaches(sortedCaches);
|
|
629
|
+
auto sortedTiles = GetSortedTiles(startX, endX, startY, endY, _tileSize, mousePosition);
|
|
630
|
+
for (const auto& [tileX, tileY] : sortedTiles) {
|
|
631
|
+
auto tile = currentTileCache->getTile(tileX, tileY);
|
|
632
|
+
if (tile != nullptr) {
|
|
633
|
+
auto tileRect = tile->getTileRect(_tileSize, &renderRect);
|
|
634
|
+
screenTasks.emplace_back(tile, _tileSize, tileRect);
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
if (!useFallback || maxBudget > 0) {
|
|
638
|
+
if (useFallback) {
|
|
639
|
+
maxBudget--;
|
|
640
|
+
}
|
|
641
|
+
dirtyGrids.emplace_back(tileX, tileY);
|
|
642
|
+
} else {
|
|
643
|
+
auto fallbackTasks = getFallbackDrawTasks(tileX, tileY, fallbackTileCaches);
|
|
644
|
+
if (!fallbackTasks.empty()) {
|
|
645
|
+
hasZoomBlurTiles = true;
|
|
646
|
+
screenTasks.insert(screenTasks.end(), fallbackTasks.begin(), fallbackTasks.end());
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
// Rasterize in Smooth mode, or when this frame has dirty regions: dirty regions also
|
|
650
|
+
// clear fallback tiles at other scales, so a skipRect would render as background color.
|
|
651
|
+
if (_tileUpdateMode == TileUpdateMode::Smooth || hasDirtyRegions) {
|
|
652
|
+
dirtyGrids.emplace_back(tileX, tileY);
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
hasZoomBlurTiles = true;
|
|
656
|
+
skippedRects->emplace_back(
|
|
657
|
+
Rect::MakeXYWH(tileX * _tileSize, tileY * _tileSize, _tileSize, _tileSize));
|
|
658
|
+
if (!autoClear) {
|
|
659
|
+
// Under autoClear=false, throttle fallback tiles are not drawn because SrcOver blending
|
|
660
|
+
// would let farther tiles bleed through near-tile alpha edges, producing cross-scale
|
|
661
|
+
// artifacts. Skip collection entirely to avoid wasted work.
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
auto throttleFallback = getThrottleFallbackTasks(tileX, tileY, fallbackTileCaches);
|
|
665
|
+
if (!throttleFallback.empty()) {
|
|
666
|
+
throttleScreenTasks->insert(throttleScreenTasks->end(), throttleFallback.begin(),
|
|
667
|
+
throttleFallback.end());
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
std::vector<std::shared_ptr<Tile>> freeTiles = {};
|
|
672
|
+
bool continuous = false;
|
|
673
|
+
if (screenTasks.empty() && throttleScreenTasks->empty()) {
|
|
674
|
+
freeTiles = createContinuousTiles(surface, endX - startX, endY - startY);
|
|
675
|
+
continuous = !freeTiles.empty();
|
|
676
|
+
dirtyGrids = GenerateGridTiles(startX, endX, startY, endY);
|
|
677
|
+
skippedRects->clear();
|
|
678
|
+
hasZoomBlurTiles = false;
|
|
679
|
+
}
|
|
680
|
+
if (freeTiles.empty()) {
|
|
681
|
+
freeTiles = getFreeTiles(surface, dirtyGrids.size(), sortedCaches);
|
|
682
|
+
}
|
|
683
|
+
if (dirtyGrids.size() != freeTiles.size()) {
|
|
684
|
+
DEBUG_ASSERT(freeTiles.size() < dirtyGrids.size());
|
|
685
|
+
LOGE("DisplayList::collectRenderTiles() Not enough free tiles available.");
|
|
686
|
+
return {};
|
|
687
|
+
}
|
|
688
|
+
size_t tileIndex = 0;
|
|
689
|
+
std::vector<std::shared_ptr<Tile>> taskTiles = {};
|
|
690
|
+
for (auto& grid : dirtyGrids) {
|
|
691
|
+
auto& tile = freeTiles[tileIndex++];
|
|
692
|
+
tile->tileX = grid.first;
|
|
693
|
+
tile->tileY = grid.second;
|
|
694
|
+
taskTiles.push_back(tile);
|
|
695
|
+
auto tileRect = tile->getTileRect(_tileSize, &renderRect);
|
|
696
|
+
screenTasks.emplace_back(tile, _tileSize, tileRect);
|
|
697
|
+
currentTileCache->addTile(tile);
|
|
698
|
+
}
|
|
699
|
+
if (continuous) {
|
|
700
|
+
// If we have continuous tiles, we can draw a single rectangle for the entire area.
|
|
701
|
+
auto drawRect = Rect::MakeXYWH(startX * _tileSize, startY * _tileSize,
|
|
702
|
+
(endX - startX) * _tileSize, (endY - startY) * _tileSize);
|
|
703
|
+
tileTasks->emplace_back(std::move(freeTiles), _tileSize, drawRect);
|
|
704
|
+
} else {
|
|
705
|
+
for (auto& tile : taskTiles) {
|
|
706
|
+
tileTasks->emplace_back(tile, _tileSize);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return screenTasks;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
static float ScaleRatio(float scaleA, float zoomScale) {
|
|
713
|
+
auto ratio = fabsf(scaleA / zoomScale);
|
|
714
|
+
if (ratio < 1.0f) {
|
|
715
|
+
ratio = 1.0f / ratio;
|
|
716
|
+
}
|
|
717
|
+
return ratio;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
std::vector<std::pair<float, TileCache*>> DisplayList::getSortedTileCaches() const {
|
|
721
|
+
std::vector<std::pair<float, TileCache*>> sortedTileCaches;
|
|
722
|
+
sortedTileCaches.reserve(tileCaches.size());
|
|
723
|
+
for (auto& [scaleInt, tileCache] : tileCaches) {
|
|
724
|
+
auto zoomScale = ToZoomScaleFloat(scaleInt, _zoomScalePrecision);
|
|
725
|
+
sortedTileCaches.emplace_back(zoomScale, tileCache);
|
|
726
|
+
}
|
|
727
|
+
std::sort(sortedTileCaches.begin(), sortedTileCaches.end(),
|
|
728
|
+
[](const std::pair<float, TileCache*>& a, const std::pair<float, TileCache*>& b) {
|
|
729
|
+
return a.first < b.first;
|
|
730
|
+
});
|
|
731
|
+
return sortedTileCaches;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
std::vector<std::pair<float, TileCache*>> DisplayList::getFallbackTileCaches(
|
|
735
|
+
const std::vector<std::pair<float, TileCache*>>& sortedCaches) const {
|
|
736
|
+
if (_tileUpdateMode == TileUpdateMode::Immediate) {
|
|
737
|
+
return {};
|
|
738
|
+
}
|
|
739
|
+
auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
740
|
+
DEBUG_ASSERT(currentZoomScale != 0.0f);
|
|
741
|
+
auto cacheCount = sortedCaches.size();
|
|
742
|
+
std::vector<std::pair<float, TileCache*>> fallbackCaches = {};
|
|
743
|
+
fallbackCaches.reserve(cacheCount);
|
|
744
|
+
size_t firstGreaterIndex = 0;
|
|
745
|
+
for (auto& item : sortedCaches) {
|
|
746
|
+
if (item.first < currentZoomScale) {
|
|
747
|
+
firstGreaterIndex++;
|
|
748
|
+
} else {
|
|
749
|
+
fallbackCaches.push_back(item);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
for (size_t index = firstGreaterIndex; index > 0; index--) {
|
|
753
|
+
auto& item = sortedCaches[index - 1];
|
|
754
|
+
fallbackCaches.push_back(item);
|
|
755
|
+
}
|
|
756
|
+
return fallbackCaches;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
std::vector<DrawTask> DisplayList::getFallbackDrawTasks(
|
|
760
|
+
int tileX, int tileY, const std::vector<std::pair<float, TileCache*>>& fallbackCaches) const {
|
|
761
|
+
auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
762
|
+
DEBUG_ASSERT(currentZoomScale != 0.0f);
|
|
763
|
+
auto gridCount = std::max(_tileSize / FALLBACK_GRID_SIZE, 1);
|
|
764
|
+
auto gridSize = _tileSize / gridCount;
|
|
765
|
+
auto tileStartX = tileX * _tileSize;
|
|
766
|
+
auto tileStartY = tileY * _tileSize;
|
|
767
|
+
std::vector<DrawTask> tasks = {};
|
|
768
|
+
auto renderBounds = _root->renderBounds;
|
|
769
|
+
renderBounds.scale(currentZoomScale, currentZoomScale);
|
|
770
|
+
renderBounds.roundOut();
|
|
771
|
+
for (int gridX = 0; gridX < gridCount; gridX++) {
|
|
772
|
+
for (int gridY = 0; gridY < gridCount; gridY++) {
|
|
773
|
+
auto gridStartX = tileStartX + gridX * gridSize;
|
|
774
|
+
auto gridStartY = tileStartY + gridY * gridSize;
|
|
775
|
+
bool found = false;
|
|
776
|
+
auto gridRect = Rect::MakeXYWH(gridStartX, gridStartY, gridSize, gridSize);
|
|
777
|
+
if (!gridRect.intersect(renderBounds)) {
|
|
778
|
+
continue;
|
|
779
|
+
}
|
|
780
|
+
for (auto& [scale, tileCache] : fallbackCaches) {
|
|
781
|
+
if (scale == currentZoomScale || tileCache->empty()) {
|
|
782
|
+
continue;
|
|
783
|
+
}
|
|
784
|
+
auto scaleRatio = scale / currentZoomScale;
|
|
785
|
+
DEBUG_ASSERT(scaleRatio != 0.0f);
|
|
786
|
+
auto zoomedRect = gridRect;
|
|
787
|
+
zoomedRect.scale(scaleRatio, scaleRatio);
|
|
788
|
+
auto tiles = tileCache->getTilesUnderRect(zoomedRect, true);
|
|
789
|
+
if (tiles.empty()) {
|
|
790
|
+
continue;
|
|
791
|
+
}
|
|
792
|
+
for (auto& tile : tiles) {
|
|
793
|
+
auto drawRect = tile->getTileRect(_tileSize);
|
|
794
|
+
if (drawRect.intersect(zoomedRect)) {
|
|
795
|
+
tasks.emplace_back(tile, _tileSize, drawRect, 1.0f / scaleRatio);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
found = true;
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
if (!found) {
|
|
802
|
+
return {};
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
return tasks;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
std::vector<DrawTask> DisplayList::getThrottleFallbackTasks(
|
|
810
|
+
int tileX, int tileY, const std::vector<std::pair<float, TileCache*>>& fallbackCaches) const {
|
|
811
|
+
auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
812
|
+
DEBUG_ASSERT(currentZoomScale != 0.0f);
|
|
813
|
+
auto tileRect = Rect::MakeXYWH(tileX * _tileSize, tileY * _tileSize, _tileSize, _tileSize);
|
|
814
|
+
auto renderBounds = _root->renderBounds;
|
|
815
|
+
renderBounds.scale(currentZoomScale, currentZoomScale);
|
|
816
|
+
renderBounds.roundOut();
|
|
817
|
+
if (!tileRect.intersect(renderBounds)) {
|
|
818
|
+
return {};
|
|
819
|
+
}
|
|
820
|
+
// Sort fallback caches farthest-first so that nearer (higher-quality) tiles are drawn on top
|
|
821
|
+
// of farther (lower-quality) ones during rendering. When two caches have the same ScaleRatio
|
|
822
|
+
// (e.g. 0.5x and 2.0x relative to 1.0x), the upsample cache is placed before the downsample
|
|
823
|
+
// cache so the downsample output (sharper) overlays the upsample output (blurrier).
|
|
824
|
+
auto orderedCaches = fallbackCaches;
|
|
825
|
+
std::sort(orderedCaches.begin(), orderedCaches.end(),
|
|
826
|
+
[currentZoomScale](const std::pair<float, TileCache*>& a,
|
|
827
|
+
const std::pair<float, TileCache*>& b) {
|
|
828
|
+
auto ratioA = ScaleRatio(a.first, currentZoomScale);
|
|
829
|
+
auto ratioB = ScaleRatio(b.first, currentZoomScale);
|
|
830
|
+
if (ratioA != ratioB) {
|
|
831
|
+
return ratioA > ratioB;
|
|
832
|
+
}
|
|
833
|
+
return a.first < b.first;
|
|
834
|
+
});
|
|
835
|
+
std::vector<DrawTask> tasks = {};
|
|
836
|
+
for (auto& [scale, tileCache] : orderedCaches) {
|
|
837
|
+
if (scale == currentZoomScale || tileCache->empty()) {
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
840
|
+
auto scaleRatio = scale / currentZoomScale;
|
|
841
|
+
DEBUG_ASSERT(scaleRatio != 0.0f);
|
|
842
|
+
auto zoomedRect = tileRect;
|
|
843
|
+
zoomedRect.scale(scaleRatio, scaleRatio);
|
|
844
|
+
auto covering = tileCache->getTilesUnderRect(zoomedRect, false);
|
|
845
|
+
if (covering.empty()) {
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
for (auto& t : covering) {
|
|
849
|
+
auto drawRect = t->getTileRect(_tileSize);
|
|
850
|
+
if (drawRect.intersect(zoomedRect)) {
|
|
851
|
+
tasks.emplace_back(t, _tileSize, drawRect, 1.0f / scaleRatio);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return tasks;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
std::vector<std::shared_ptr<Tile>> DisplayList::getFreeTiles(
|
|
859
|
+
const Surface* renderSurface, size_t tileCount,
|
|
860
|
+
const std::vector<std::pair<float, TileCache*>>& sortedCaches) {
|
|
861
|
+
std::vector<std::shared_ptr<Tile>> tiles = {};
|
|
862
|
+
tiles.reserve(tileCount);
|
|
863
|
+
while (emptyTiles.size() < tileCount) {
|
|
864
|
+
if (!createEmptyTiles(renderSurface)) {
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
if (emptyTiles.size() >= tileCount) {
|
|
869
|
+
tiles.insert(tiles.end(), emptyTiles.end() - static_cast<int>(tileCount), emptyTiles.end());
|
|
870
|
+
emptyTiles.resize(emptyTiles.size() - tileCount);
|
|
871
|
+
return tiles;
|
|
872
|
+
}
|
|
873
|
+
tiles.insert(tiles.end(), emptyTiles.begin(), emptyTiles.end());
|
|
874
|
+
emptyTiles.clear();
|
|
875
|
+
auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
876
|
+
DEBUG_ASSERT(currentZoomScale != 0.0f);
|
|
877
|
+
// Reverse iterate through sorted caches to get the farest tiles first.
|
|
878
|
+
for (size_t i = 0, j = sortedCaches.size(); i < j;) {
|
|
879
|
+
auto& [scaleS, tileCacheS] = sortedCaches.at(i);
|
|
880
|
+
auto& [scaleL, tileCacheL] = sortedCaches.at(j - 1);
|
|
881
|
+
auto scale = scaleS;
|
|
882
|
+
auto tileCache = tileCacheS;
|
|
883
|
+
if (ScaleRatio(scaleS, currentZoomScale) < ScaleRatio(scaleL, currentZoomScale)) {
|
|
884
|
+
scale = scaleL;
|
|
885
|
+
tileCache = tileCacheL;
|
|
886
|
+
j--;
|
|
887
|
+
} else {
|
|
888
|
+
i++;
|
|
889
|
+
}
|
|
890
|
+
auto centerX = static_cast<float>(renderSurface->width()) * 0.5f - _contentOffset.x;
|
|
891
|
+
auto centerY = static_cast<float>(renderSurface->height()) * 0.5f - _contentOffset.y;
|
|
892
|
+
centerX *= scale / currentZoomScale;
|
|
893
|
+
centerY *= scale / currentZoomScale;
|
|
894
|
+
auto reusableTiles = tileCache->getReusableTiles(centerX, centerY);
|
|
895
|
+
for (auto& tile : reusableTiles) {
|
|
896
|
+
tileCache->removeTile(tile->tileX, tile->tileY);
|
|
897
|
+
tiles.push_back(std::move(tile));
|
|
898
|
+
if (tiles.size() >= tileCount) {
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
if (tiles.size() >= tileCount) {
|
|
903
|
+
break;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
if (tiles.size() < tileCount) {
|
|
907
|
+
emptyTiles = std::move(tiles);
|
|
908
|
+
return {};
|
|
909
|
+
}
|
|
910
|
+
return tiles;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
std::vector<std::shared_ptr<Tile>> DisplayList::createContinuousTiles(const Surface* renderSurface,
|
|
914
|
+
int requestCountX,
|
|
915
|
+
int requestCountY) {
|
|
916
|
+
DEBUG_ASSERT(renderSurface != nullptr);
|
|
917
|
+
auto context = renderSurface->getContext();
|
|
918
|
+
auto tileCount = nextSurfaceTileCount(context);
|
|
919
|
+
if (tileCount <= 0) {
|
|
920
|
+
return {};
|
|
921
|
+
}
|
|
922
|
+
auto requestCount = requestCountX * requestCountY;
|
|
923
|
+
if (tileCount < requestCount) {
|
|
924
|
+
return {};
|
|
925
|
+
}
|
|
926
|
+
int countX = FloatSaturateToInt(sqrtf(static_cast<float>(tileCount)));
|
|
927
|
+
int countY = FloatCeilToInt(static_cast<float>(tileCount) / static_cast<float>(countX));
|
|
928
|
+
if (countX < requestCountX) {
|
|
929
|
+
countX = requestCountX;
|
|
930
|
+
countY = FloatCeilToInt(static_cast<float>(tileCount) / static_cast<float>(countX));
|
|
931
|
+
} else if (countY < requestCountY) {
|
|
932
|
+
countY = requestCountY;
|
|
933
|
+
countX = FloatCeilToInt(static_cast<float>(tileCount) / static_cast<float>(countY));
|
|
934
|
+
}
|
|
935
|
+
auto surface =
|
|
936
|
+
Surface::Make(context, countX * _tileSize, countY * _tileSize, ColorType::RGBA_8888, 1, false,
|
|
937
|
+
renderSurface->renderFlags(), renderSurface->colorSpace());
|
|
938
|
+
if (surface == nullptr) {
|
|
939
|
+
return {};
|
|
940
|
+
}
|
|
941
|
+
surfaceCaches.push_back(std::move(surface));
|
|
942
|
+
auto surfaceIndex = surfaceCaches.size() - 1;
|
|
943
|
+
auto emptyCount = countX * countY - requestCount;
|
|
944
|
+
emptyTiles.reserve(emptyTiles.size() + static_cast<size_t>(emptyCount));
|
|
945
|
+
std::vector<std::shared_ptr<Tile>> renderTiles = {};
|
|
946
|
+
renderTiles.reserve(static_cast<size_t>(requestCount));
|
|
947
|
+
for (int y = 0; y < countY; ++y) {
|
|
948
|
+
for (int x = 0; x < countX; ++x) {
|
|
949
|
+
auto tile = std::make_shared<Tile>();
|
|
950
|
+
tile->sourceIndex = surfaceIndex;
|
|
951
|
+
tile->sourceX = x;
|
|
952
|
+
tile->sourceY = y;
|
|
953
|
+
if (x < requestCountX && y < requestCountY) {
|
|
954
|
+
renderTiles.push_back(std::move(tile));
|
|
955
|
+
} else {
|
|
956
|
+
emptyTiles.push_back(std::move(tile));
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
return renderTiles;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
bool DisplayList::createEmptyTiles(const Surface* renderSurface) {
|
|
964
|
+
DEBUG_ASSERT(renderSurface != nullptr);
|
|
965
|
+
auto context = renderSurface->getContext();
|
|
966
|
+
auto tileCount = nextSurfaceTileCount(context);
|
|
967
|
+
if (tileCount <= 0) {
|
|
968
|
+
return false;
|
|
969
|
+
}
|
|
970
|
+
int countX = FloatSaturateToInt(sqrtf(static_cast<float>(tileCount)));
|
|
971
|
+
int countY = FloatCeilToInt(static_cast<float>(tileCount) / static_cast<float>(countX));
|
|
972
|
+
auto surface =
|
|
973
|
+
Surface::Make(context, countX * _tileSize, countY * _tileSize, ColorType::RGBA_8888, 1, false,
|
|
974
|
+
renderSurface->renderFlags(), renderSurface->colorSpace());
|
|
975
|
+
if (surface == nullptr) {
|
|
976
|
+
return false;
|
|
977
|
+
}
|
|
978
|
+
surfaceCaches.push_back(std::move(surface));
|
|
979
|
+
auto surfaceIndex = surfaceCaches.size() - 1;
|
|
980
|
+
emptyTiles.reserve(emptyTiles.size() + static_cast<size_t>(countX * countY));
|
|
981
|
+
for (int y = 0; y < countY; ++y) {
|
|
982
|
+
for (int x = 0; x < countX; ++x) {
|
|
983
|
+
auto tile = std::make_shared<Tile>();
|
|
984
|
+
tile->sourceIndex = surfaceIndex;
|
|
985
|
+
tile->sourceX = x;
|
|
986
|
+
tile->sourceY = y;
|
|
987
|
+
emptyTiles.push_back(std::move(tile));
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return !emptyTiles.empty();
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
int DisplayList::nextSurfaceTileCount(Context* context) const {
|
|
994
|
+
DEBUG_ASSERT(context != nullptr);
|
|
995
|
+
int surfaceTileCount = 0;
|
|
996
|
+
for (auto& surface : surfaceCaches) {
|
|
997
|
+
auto tileCountX = surface->width() / _tileSize;
|
|
998
|
+
auto tileCountY = surface->height() / _tileSize;
|
|
999
|
+
surfaceTileCount += tileCountX * tileCountY;
|
|
1000
|
+
}
|
|
1001
|
+
if (surfaceTileCount >= totalTileCount) {
|
|
1002
|
+
return 0;
|
|
1003
|
+
}
|
|
1004
|
+
auto maxTileCountPerAtlas = getMaxTileCountPerAtlas(context);
|
|
1005
|
+
return std::min(totalTileCount - surfaceTileCount, maxTileCountPerAtlas);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
int DisplayList::getMaxTileCountPerAtlas(Context* context) const {
|
|
1009
|
+
auto maxTextureSize = std::min(context->gpu()->limits()->maxTextureDimension2D, MAX_ATLAS_SIZE);
|
|
1010
|
+
return (maxTextureSize / _tileSize) * (maxTextureSize / _tileSize);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
void DisplayList::drawTileTask(const DrawTask& task, BackgroundSnapshotMap* snapshots) const {
|
|
1014
|
+
auto surface = surfaceCaches[task.sourceIndex()].get();
|
|
1015
|
+
DEBUG_ASSERT(surface != nullptr);
|
|
1016
|
+
auto canvas = surface->getCanvas();
|
|
1017
|
+
AutoCanvasRestore autoRestore(canvas);
|
|
1018
|
+
auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
1019
|
+
DEBUG_ASSERT(currentZoomScale != 0.0f);
|
|
1020
|
+
auto viewMatrix = Matrix::MakeScale(currentZoomScale);
|
|
1021
|
+
auto& tileRect = task.tileRect();
|
|
1022
|
+
auto& sourceRect = task.sourceRect();
|
|
1023
|
+
auto offsetX = sourceRect.left - tileRect.left;
|
|
1024
|
+
auto offsetY = sourceRect.top - tileRect.top;
|
|
1025
|
+
viewMatrix.postTranslate(offsetX, offsetY);
|
|
1026
|
+
auto clipRect = tileRect;
|
|
1027
|
+
clipRect.offset(offsetX, offsetY);
|
|
1028
|
+
drawRootLayer(surface, clipRect, viewMatrix, true, snapshots);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
void DisplayList::drawScreenTasks(std::vector<DrawTask> screenTasks, std::vector<Rect> skippedRects,
|
|
1032
|
+
Surface* surface, bool autoClear) const {
|
|
1033
|
+
// Sort tasks by surface index to ensure they are drawn in batches.
|
|
1034
|
+
std::sort(screenTasks.begin(), screenTasks.end(),
|
|
1035
|
+
[](const DrawTask& a, const DrawTask& b) { return a.sourceIndex() < b.sourceIndex(); });
|
|
1036
|
+
auto canvas = surface->getCanvas();
|
|
1037
|
+
AutoCanvasRestore autoRestore(canvas);
|
|
1038
|
+
Paint paint = {};
|
|
1039
|
+
paint.setAntiAlias(false);
|
|
1040
|
+
if (autoClear) {
|
|
1041
|
+
paint.setBlendMode(BlendMode::Src);
|
|
1042
|
+
}
|
|
1043
|
+
static SamplingOptions nearestSampling(FilterMode::Nearest, MipmapMode::None);
|
|
1044
|
+
static SamplingOptions linearSampling(FilterMode::Linear, MipmapMode::None);
|
|
1045
|
+
canvas->setMatrix(Matrix::MakeTrans(_contentOffset.x, _contentOffset.y));
|
|
1046
|
+
Rect tileRect = {};
|
|
1047
|
+
for (auto& task : screenTasks) {
|
|
1048
|
+
auto surfaceCache = surfaceCaches[task.sourceIndex()];
|
|
1049
|
+
DEBUG_ASSERT(surfaceCache != nullptr);
|
|
1050
|
+
auto image = surfaceCache->makeImageSnapshot();
|
|
1051
|
+
auto& sampling = task.identityScale() ? nearestSampling : linearSampling;
|
|
1052
|
+
canvas->drawImageRect(image, task.sourceRect(), task.tileRect(), sampling, &paint,
|
|
1053
|
+
SrcRectConstraint::Strict, &task.strictRect());
|
|
1054
|
+
tileRect.join(task.tileRect());
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
auto screenRect = Rect::MakeWH(surface->width(), surface->height());
|
|
1058
|
+
screenRect.offset(-_contentOffset.x, -_contentOffset.y);
|
|
1059
|
+
|
|
1060
|
+
paint.setColor(_backgroundColor);
|
|
1061
|
+
for (auto& rect : skippedRects) {
|
|
1062
|
+
canvas->drawRect(rect, paint);
|
|
1063
|
+
tileRect.join(rect);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
if (tileRect.contains(screenRect)) {
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
const auto currentZoomScale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision);
|
|
1071
|
+
auto renderBounds = _root->renderBounds;
|
|
1072
|
+
renderBounds.scale(currentZoomScale, currentZoomScale);
|
|
1073
|
+
renderBounds.roundOut();
|
|
1074
|
+
// Clip to render bounds because fallback tiles may extend beyond content due to roundOut.
|
|
1075
|
+
tileRect.intersect(renderBounds);
|
|
1076
|
+
|
|
1077
|
+
paint.setColor(_backgroundColor);
|
|
1078
|
+
auto backgroundRect = GetNonIntersectingRects(screenRect, tileRect);
|
|
1079
|
+
for (auto& rect : backgroundRect) {
|
|
1080
|
+
canvas->drawRect(rect, paint);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
void DisplayList::drawThrottleScreenTasks(std::vector<DrawTask> throttleScreenTasks,
|
|
1085
|
+
Surface* surface, bool autoClear) const {
|
|
1086
|
+
if (throttleScreenTasks.empty()) {
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
auto canvas = surface->getCanvas();
|
|
1090
|
+
AutoCanvasRestore autoRestore(canvas);
|
|
1091
|
+
canvas->setMatrix(Matrix::MakeTrans(_contentOffset.x, _contentOffset.y));
|
|
1092
|
+
Paint paint = {};
|
|
1093
|
+
paint.setAntiAlias(false);
|
|
1094
|
+
paint.setBlendMode(autoClear ? BlendMode::Src : BlendMode::SrcOver);
|
|
1095
|
+
static SamplingOptions linearSampling(FilterMode::Linear, MipmapMode::None);
|
|
1096
|
+
for (auto& task : throttleScreenTasks) {
|
|
1097
|
+
auto surfaceCache = surfaceCaches[task.sourceIndex()];
|
|
1098
|
+
DEBUG_ASSERT(surfaceCache != nullptr);
|
|
1099
|
+
auto image = surfaceCache->makeImageSnapshot();
|
|
1100
|
+
canvas->drawImageRect(std::move(image), task.sourceRect(), task.tileRect(), linearSampling,
|
|
1101
|
+
&paint, SrcRectConstraint::Strict, &task.strictRect());
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
void DisplayList::renderDirtyRegions(Canvas* canvas, std::vector<Rect> dirtyRegions) {
|
|
1106
|
+
if (lastDirtyRegions.empty()) {
|
|
1107
|
+
for (size_t i = 0; i < MAX_DIRTY_REGION_FRAMES; ++i) {
|
|
1108
|
+
lastDirtyRegions.emplace_back();
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
lastDirtyRegions.push_back(std::move(dirtyRegions));
|
|
1112
|
+
lastDirtyRegions.pop_front();
|
|
1113
|
+
Paint dirtyPaint = {};
|
|
1114
|
+
dirtyPaint.setAntiAlias(false);
|
|
1115
|
+
dirtyPaint.setColor(Color::Red());
|
|
1116
|
+
dirtyPaint.setAlpha(0.15f);
|
|
1117
|
+
AutoCanvasRestore autoRestore(canvas);
|
|
1118
|
+
canvas->resetMatrix();
|
|
1119
|
+
for (auto& regions : lastDirtyRegions) {
|
|
1120
|
+
for (auto& region : regions) {
|
|
1121
|
+
canvas->drawRect(region, dirtyPaint);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
Matrix DisplayList::getViewMatrix() const {
|
|
1127
|
+
auto viewMatrix = Matrix::MakeScale(ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision));
|
|
1128
|
+
viewMatrix.postTranslate(_contentOffset.x, _contentOffset.y);
|
|
1129
|
+
return viewMatrix;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
void DisplayList::resetCaches() {
|
|
1133
|
+
for (auto& item : tileCaches) {
|
|
1134
|
+
delete item.second;
|
|
1135
|
+
}
|
|
1136
|
+
tileCaches = {};
|
|
1137
|
+
surfaceCaches = {};
|
|
1138
|
+
totalTileCount = 0;
|
|
1139
|
+
emptyTiles.clear();
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
void DisplayList::drawRootLayer(Surface* surface, const Rect& drawRect, const Matrix& viewMatrix,
|
|
1143
|
+
bool autoClear, BackgroundSnapshotMap* snapshots) const {
|
|
1144
|
+
DEBUG_ASSERT(surface != nullptr);
|
|
1145
|
+
auto canvas = surface->getCanvas();
|
|
1146
|
+
auto context = surface->getContext();
|
|
1147
|
+
AutoCanvasRestore autoRestore(canvas);
|
|
1148
|
+
auto surfaceRect = Rect::MakeWH(surface->width(), surface->height());
|
|
1149
|
+
bool fullScreen = drawRect == surfaceRect;
|
|
1150
|
+
if (!fullScreen) {
|
|
1151
|
+
canvas->clipRect(drawRect, false);
|
|
1152
|
+
}
|
|
1153
|
+
if (autoClear) {
|
|
1154
|
+
canvas->clear();
|
|
1155
|
+
}
|
|
1156
|
+
canvas->setMatrix(viewMatrix);
|
|
1157
|
+
DrawArgs args(context);
|
|
1158
|
+
DEBUG_ASSERT(viewMatrix.invertible());
|
|
1159
|
+
Matrix inverse = Matrix::I();
|
|
1160
|
+
viewMatrix.invert(&inverse);
|
|
1161
|
+
auto renderRect = inverse.mapRect(drawRect);
|
|
1162
|
+
renderRect.roundOut();
|
|
1163
|
+
std::vector<Rect> renderRectsVec = {renderRect};
|
|
1164
|
+
args.renderRects = &renderRectsVec;
|
|
1165
|
+
args.dstColorSpace = surface->colorSpace();
|
|
1166
|
+
args.subtreeCacheMaxSize = _subtreeCacheMaxSize;
|
|
1167
|
+
// Draw background color before the layer tree. This ensures backgroundColor is only rendered
|
|
1168
|
+
// through the DisplayList::render() path, not when calling Layer::draw() directly.
|
|
1169
|
+
canvas->drawColor(_backgroundColor, BlendMode::SrcOver);
|
|
1170
|
+
// Consume pass: replay snapshots produced by the capture pass. When the tree has no
|
|
1171
|
+
// background-sourced styles, snapshots is null and we fall back to NoOp, which makes
|
|
1172
|
+
// background-sourced styles (if any show up unexpectedly) silently no-op — matching the
|
|
1173
|
+
// contour / 3D subtree semantics.
|
|
1174
|
+
BackgroundConsumer consumer(snapshots);
|
|
1175
|
+
args.backgroundHandler = snapshots ? &consumer : BackgroundHandler::NoOp();
|
|
1176
|
+
_root->drawLayer(args, surface->getCanvas(), 1.0f, BlendMode::SrcOver);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
std::unique_ptr<BackgroundSnapshotMap> DisplayList::captureBackgrounds(
|
|
1180
|
+
Surface* surface, const std::vector<Rect>& renderRects) const {
|
|
1181
|
+
DEBUG_ASSERT(surface != nullptr);
|
|
1182
|
+
if (!_root->hasBackgroundStyle()) {
|
|
1183
|
+
return nullptr;
|
|
1184
|
+
}
|
|
1185
|
+
if (renderRects.empty()) {
|
|
1186
|
+
return nullptr;
|
|
1187
|
+
}
|
|
1188
|
+
auto context = surface->getContext();
|
|
1189
|
+
if (context == nullptr) {
|
|
1190
|
+
return nullptr;
|
|
1191
|
+
}
|
|
1192
|
+
auto viewMatrix = getViewMatrix();
|
|
1193
|
+
DEBUG_ASSERT(viewMatrix.invertible());
|
|
1194
|
+
// createBackgroundSource takes a surface-pixel-space rect for sizing; BackgroundCapturer::Run
|
|
1195
|
+
// takes world-space renderRects (pre-outset by blur sampling range) for per-rect culling.
|
|
1196
|
+
Matrix inverse = Matrix::I();
|
|
1197
|
+
viewMatrix.invert(&inverse);
|
|
1198
|
+
Rect surfaceUnion = Rect::MakeEmpty();
|
|
1199
|
+
std::vector<Rect> worldRects = {};
|
|
1200
|
+
worldRects.reserve(renderRects.size());
|
|
1201
|
+
for (const auto& drawRect : renderRects) {
|
|
1202
|
+
if (drawRect.isEmpty()) {
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
surfaceUnion.join(drawRect);
|
|
1206
|
+
auto worldRect = inverse.mapRect(drawRect);
|
|
1207
|
+
worldRect.roundOut();
|
|
1208
|
+
worldRects.push_back(worldRect);
|
|
1209
|
+
}
|
|
1210
|
+
if (worldRects.empty()) {
|
|
1211
|
+
return nullptr;
|
|
1212
|
+
}
|
|
1213
|
+
// Expand by the max blur outset so layers whose bounds sit just outside the dirty rects but
|
|
1214
|
+
// still contribute pixels to the blur sampling region are not culled by the capture pass.
|
|
1215
|
+
for (auto& rect : worldRects) {
|
|
1216
|
+
rect.outset(_root->maxBackgroundOutset, _root->maxBackgroundOutset);
|
|
1217
|
+
}
|
|
1218
|
+
DrawArgs args(context);
|
|
1219
|
+
args.dstColorSpace = surface->colorSpace();
|
|
1220
|
+
args.subtreeCacheMaxSize = _subtreeCacheMaxSize;
|
|
1221
|
+
auto bgSource =
|
|
1222
|
+
_root->createBackgroundSource(context, surfaceUnion, viewMatrix, false, args.dstColorSpace);
|
|
1223
|
+
if (bgSource == nullptr) {
|
|
1224
|
+
return nullptr;
|
|
1225
|
+
}
|
|
1226
|
+
auto snapshotMap = std::make_unique<BackgroundSnapshotMap>();
|
|
1227
|
+
// Draw backgroundColor before the layer tree so that the capture pass includes it as part of
|
|
1228
|
+
// the background for blur/backdrop effects.
|
|
1229
|
+
if (_backgroundColor != Color::Transparent()) {
|
|
1230
|
+
bgSource->getCanvas()->drawColor(_backgroundColor, BlendMode::SrcOver);
|
|
1231
|
+
}
|
|
1232
|
+
BackgroundCapturer::Run(_root.get(), args, std::move(bgSource), snapshotMap.get(), worldRects);
|
|
1233
|
+
return snapshotMap;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
void DisplayList::updateMousePosition() {
|
|
1237
|
+
if (lastZoomScaleInt == _zoomScaleInt) {
|
|
1238
|
+
mousePosition += (lastContentOffset - _contentOffset);
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
const auto scale = ToZoomScaleFloat(_zoomScaleInt, _zoomScalePrecision) /
|
|
1243
|
+
ToZoomScaleFloat(lastZoomScaleInt, _zoomScalePrecision);
|
|
1244
|
+
DEBUG_ASSERT(scale != 1.0f);
|
|
1245
|
+
const auto invScaleFactor = 1.0f / (1.0f - scale);
|
|
1246
|
+
mousePosition = (_contentOffset - lastContentOffset * scale) * invScaleFactor;
|
|
1247
|
+
mousePosition -= _contentOffset;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
} // namespace tgfx
|