Jump to content

vfbb

Members
  • Content Count

    278
  • Joined

  • Last visited

  • Days Won

    30

Everything posted by vfbb

  1. vfbb

    ANN: Skia4Delphi v3.4.0

    Skia does not support animated SVG. There are very few libs that support SVG animations and even then I believe there are no versions for delphi. However, there is something similar, and much better: lottie. Lottie are also vectorized animations in json format. As with SVG, you can also find lottie of everything on the internet. You can also create your own animation using Adobe After Effects (although it's hard for programmers lol). However it is not possible to edit it at runtime. Note: Replacing your app's canvas (GlobalUseSkia := True) is optional. You'll be able to use svg, lottie, skia controls, even without skia being your app's renderer. However, skia controls perform better when your app's canvas is based on skia (GlobalUseSkia := True)
  2. vfbb

    ANN: Skia4Delphi v3.4.0

    There are 2 questions in your test: 1) On the Windows platform, both the FMX and Skia canvas present very similar results, both in terms of quality and performance. Although on my machine there was a 10% gain, some reported the opposite, but overall both were satisfactory in all tests. On non-Windows platforms, the performance differences are greater and a second problem arises, which is the quality of the drawings (there is only antialiasing on FMX Windows, while on Skia there is maximum quality on all platforms); 2) In our canvas implementation, bitmaps are not as optimized as they could be. We split our canvas into 2 parts, the window canvas (form) and the bitmap canvas. In the implementation of the canvas bitmap we always decided to use the raster mode because we wanted the TBitmap to be used in background threads without locking the UI (embarcadero put a lock on the canvas that blocks drawings in parallel, even if you use bitmaps in threads, the drawings are not actually done in parallel, one blocks the other during BeginScene and EndScene). In our tests this raster implementation of bitmaps didn't affect the performance of projects that don't abuse bitmaps as much (but it's not your case, you're drawing 300 bitmaps at once);
  3. vfbb

    ANN: Skia4Delphi v3.4.0

    Yes. When you set "GlobalUseSkia := True;", the lib replaces the app's default canvas to the skia-based canvas. However, we made more than 1 canvas based on skia: a raster canvas (CPU), an opengl canvas (GPU) and a metal canvas (GPU). When creating the first form or drawing with bitmaps (which is when the FMX canvas system is started), we check if GlobalUseSkia is true, and if it is, we will choose one of our implementations based on the booleans GlobalUseSkiaRasterWhenAvailable and GlobalUseMetal, and on the target platform. But why use by default on Windows a raster canvas (which runs on the CPU), since the canvases that run on the GPU are faster? This was done because it is the most compatible mode of all, as some specific VMs do not implement full openGL support and often this is not possible to verify via code. In the future we intend to add new canvas implementations based on skia, such as the Vulkan implementation. Perhaps Vulkan was better implemented on Windows VMs.
  4. vfbb

    ANN: Skia4Delphi v3.4.0

    Without this step it will work when you run your app on Windows through the IDE run (because the IDE shares the same env PATH with the exe it is running). But the rule is: whenever you are going to use any skia code in an application (vcl, console or fmx), do this step. This should only not be done in libraries that use skia. This is not expected. Can you add a new line above your GlobalUseSkia declaration: GlobalUseSkiaRasterWhenAvailable := False;
  5. vfbb

    ANN: Skia4Delphi v3.4.0

    Have you enabled skia in your project? Inside of IDE, right click in your project > Enable Skia. Maybe after that you have to rebuild your project (Clean and Compile). This step is made to configure skia binaries in your project... Maybe this is also @Serge_G problem too. My Ubuntu is 20.04 too (although it should work on 18.04 too)
  6. vfbb

    Printing FMX control to a PDF

    You are sure! I hadn't realized it. I have an idea how to solve this, maybe I can put it in a next version.
  7. vfbb

    Printing FMX control to a PDF

    You didn't get it with Skia? On github there is a demo just printing a control in PDF. Source: Webinar Demo - Source Video: Webinar Demo - YouTube
  8. vfbb

    ANN: Skia4Delphi v3.4.0

    What is your Ubuntu version? The packages needed to run on Ubuntu are the same for FMXLinux, if you can run a blank fmx app on your Ubuntu, you will be able to run our demo. @Edit Note: The Linux version of skia4delphi works only in RAD Studio 11.
  9. vfbb

    ANN: Skia4Delphi v3.4.0

    You cannot convert SkCustomCanvas <> SkCanvas. However, you can transform bitmaps into ISkImage (via TBitmap.ToSkImage) and paint it in ISkCanvas of the PDF. That way you can do anything, for example, paint controls on a TBitmap, convert that TBitmap to ISkImage, and then paint that ISkImage onto the PDF's ISkCanvas. Printing is an untested area in our project, so it's possibly an issue. It would really help if you opened an issue on the GitHub page with a project that simulates the problem. https://github.com/skia4delphi/skia4delphi/issues
  10. vfbb

    ANN: Skia4Delphi v3.4.0

    @Rollo62 Eugene's idea (creator of FMX) is great. He creates regions with cached drawings, through his control, then it is the programmer who has to define where he will cache the drawings, and have moderation about it. Unfortunately I had some issues mainly with updating the drawings of some controls inside it, so I never used it in production. I'm very conservative when I think about third-party libraries. Some libs also partially solve the FMX performance problem, but they leave you hostage, since you have to change all your codes, use their controls, etc. This is the main difference, you implement Skia in your app changing only 1 line in dpr. The day you want to remove the library, just remove the line... About updates and development stage, we still don't have the best code design and there's still a lot to optimize, a lot, such as: using Vulkan on Android and Windows 10+, and using hardware acceleration in drawings inside bitmaps, etc. But one thing I can say, it's very stable, it's no wonder that today we have 0 issues.
  11. vfbb

    ANN: Skia4Delphi v3.4.0

    Yes, we repaint the entire screen with every render. Unfortunately FMX is right. To repaint only modified controls, we would have to have a layering system, basically a bitmap for each control containing the control draw cached. It would be a very high speed drawing system, because drawing bitmaps on the screen (without strech), is an almost instantaneous operation. However, there is an insurmountable problem with this solution: memory consumption. Bitmaps consume a lot of memory, if each control has its own, you will quickly have a memory overflow. In addition you will have other problems, such as controls that are larger than the MaxSize of the bitmap accepted on the device (such as scrollbox). On a device with infinite memory this would be the best option, but it is not the case. There is another option, which FMX even implemented, which is to "filter" all controls that were changed through the region that was changed, repainting only them and with ClipRect on the changed region (it does this for Canvas that have the flag TCanvasStyle.SupportClipRects). Intuitively, this seemed like a great solution, but in practice it surprisingly turned out to be slightly worse. This is probably why FMX also disabled this option on non-Windows platforms.
  12. vfbb

    ANN: Skia4Delphi v3.4.0

    @Rollo62 The replacement of the FMX graphic engine by Ski4Delphi graphic engine (which is done just by adding the line "GlobalUseSkia := True;" in the dpr), affects all the drawings in your app, whether the screen controls or drawings in TBitmaps. So even delphi controls like TRectangle, TCircle, and all others (even third-party controls) are now rendered on screen by the Skia-based Canvas. Everything is done automatically internally. With this, your entire application will automatically gain: - Performance (up to 50%) - Quality in drawings (everything is rendered with antialiasing, and maximum quality, producing smooth curves, no jagged edges) - Fidelity (there are dozens of bugs in the FMX render that do not occur with Canvas based on Skia, mainly involving Metal) - And other advantages
  13. vfbb

    Is there a way to outline text in a TLabel?

    You can just use the StrokeColor property of TSkLabel from Skia4Delphi library:
  14. vfbb

    iOS Metal Api form doesn't fit on screen

    Hi @enesgeven! I didn't find this issue in the quality portal so I reported it: https://quality.embarcadero.com/browse/RSP-37935 Just a tip: This issue is fixed in the latest version of Skia4Delphi (3.3.2). Not only this problem but a dozen others. Our Metal is as stable as OpenGL. Just enable Skia4Delphi as your app's renderer, and all issues will be resolved.
  15. vfbb

    iOS, Metal, Bitmaps, RGB becomes BGR?

    The problem was fixed in new version 3.3.2. Fix: We support Android 5+
  16. v3.3.0 Added HeightMultiplier property to TSkLabel to change the default line height; Added tag properties to TCustomWordsItem of TSkLabel; Added TItemClickedMessage to intercept the OnClick of all TCustomWordsItem of TSkLabel controls; Improvements in the OnClick triggering of TSkLabel items; Fixed many issues in Windows when using Skia4Delphi Canvas (including combobox dropdown); Fixed wrong colors in iOS with services when using Skia4Delphi Canvas: IFMXTakenImageService, IFMXCameraService, IFMXPhotoLibrary and IFMXShareSheetActionsService; Fixed effects and filters issue in Metal when using Skia4Delphi Canvas; Fixed wrong text size when using Skia4Delphi Canvas (fixing problems with TMemo and TTMSFMXHTMLText); Fixed AV in TSkLabel when the text of a TWordsItem starts with a sLineBreak; Fixed case-insensitive of image formats when saving images; Fixed wrong draws with stroke thickness zero when using Skia4Delphi Canvas; Fixed black screen startup on iOS in simple forms with only shapes when using Skia4Delphi Canvas; Fixed specific cases of performance issues in Windows when using Skia4Delphi Canvas; Fixed projects of RAD Studio 11; Fixed popup menu exception in rasterization mode when using Skia4Delphi Canvas; Fixed modulate color problem before RAD Studio 11.1 (which involves TintColor and TintIconColor properties on mobile); Minor improvements and fixes. Github: github.com/skia4delphi/skia4delphi Website: skia4delphi.org
  17. vfbb

    ANN: Skia4Delphi v3.3.0

    v3.3.2 Changed Skia4Delphi's default Canvas on Windows to raster based to avoid some issue in specific scenarios; (1) Fixed support to Android 5.0, 5.1 and 6.0 when using Skia4Delphi Canvas; Fixed form draw in Metal when "Zoomed setting" is enabled in iOS/macOS settings when using Skia4Delphi Canvas; (RSP-37935) On Windows, Skia4Delphi has 2 types of Canvas to render the forms: GPU based and raster based (CPU). Before this release, the default was GPU based, however, support for GPU operations is not well implemented by the OS in some scenarios, especially in some VMs. It is not possible to detect these scenarios at runtime, so we changed our default Canvas to raster based (CPU) on Windows. However, you can still force the use of our GPU-based Canvas by adding to the dpr: GlobalUseSkiaRasterWhenAvailable := False;. Both have excellent and higher performance than the FMX but there are specific operations where the GPU-based Canvas is much faster, such as running shaders, mainly created by SkRuntimeEffects.
  18. vfbb

    iOS, Metal, Bitmaps, RGB becomes BGR?

    @John van de Waeter I confirmed the problem. I reported it on GitHub, you can follow it there: https://github.com/skia4delphi/skia4delphi/issues/94
  19. vfbb

    iOS, Metal, Bitmaps, RGB becomes BGR?

    It supports Android 4.1 JellyBean+. I will test it ASAP.
  20. vfbb

    ANN: Skia4Delphi v3.3.0

    v3.3.1 Fixed TSkLabel click in Vcl; Fixed bitmaps starting with garbage when using Skia4Delphi Canvas; Fixed AV in TSkLabel and TSkTextLayout in specific cases involving $13 char; Fixed AV drawing uninitialized bitmaps when using Skia4Delphi Canvas;
  21. vfbb

    iOS, Metal, Bitmaps, RGB becomes BGR?

    @ginnix Fixed this issue in new version v3.3.0
  22. vfbb

    iOS Metal Api FlipHorizontal Crash

    @eg1 This problem will be automatically fixed if you use the last version of skia4delphi. I reported the problem and solution to embarcadero too.
  23. vfbb

    iOS, Metal, Bitmaps, RGB becomes BGR?

    @ginnix Confirmed the issue! I reported the problem on Github, you can follow it there: https://github.com/skia4delphi/skia4delphi/issues/81
  24. v3.0.1 Increase default form quality of Skia4Delphi Canvas in Android and iOS; Improve documentation about Righ-To-Left text rendering with Skia4Delphi Canvas; Fixed demo in Android 11; Fixed exception in ExcludeClipRect; Fixed quality of DrawImage of Skia4Delphi Canvas; Fixed some wrong pixel format in Android and iOS (without metal) that caused wrong colors of TCameraComponet; Fixed opacity of TSkAnimatedImage, TSkLabel and TSkSVG when using Skia4Delphi Canvas; Fixed TSkSVG cache; Fixed compilation with FmxLinux; Fixed FontWeight in FmxLinux; Fixed PDF viewer of demo in FmxLinux; Fixed setup and improve the logs; Fixed build.sh script; Fixed chocolatey package; v3.0.2 Fixed pixelformat of TBitmap of Skia4Delphi Canvas; Github: github.com/skia4delphi/skia4delphi Website: skia4delphi.org
  25. vfbb

    ANN: Skia4Delphi v3.0.2

    Hi @b1ol, the default HitTest of TSkSvg and TSkAnimatedImage is False. So, you need to set the property HitTest to True to use the mouse operations.
×