Comments (10)
Just a small comment Zeus64
Adding ```delphi before your code block
and ``` after your code block will format your code with Delphi Syntax Highlighting
// IF you set GlobalUseVulkan := True;
// in Project1.dpr then everything work
// fine but with GlobalUseVulkan := False
// nothing is draw :(
procedure TForm1.Button1Click(Sender: TObject);
begin
var LImageInfo: sk_imageinfo_t;
LImageInfo.width := 150;
LImageInfo.height := 150;
Backquote characters are available with the <> button when writing a comment
from skia4delphi.
@viniciusfbb yes the work you have done is my bible right now :) :)
from skia4delphi.
In the context of OpenGL, the problem probably stems from the absence of the "Flush()" and "Submit()" calls, which depending on the layout should be executed synchronously when the backend is OpenGL.
Unfortunately, OpenGL doesn't have a robust design for multi-threading operations. This contrasts with Vulkan and Metal/Apple, where a single context can be shared between several threads. OpenGL relies heavily on synchronization mechanisms even though it uses shared contexts.
Skia is currently developing a backend called Graphite, which promises significant performance improvements in multi-threaded systems. However, I believe that before long the vast majority of devices in use will all be Vulkan or Metal/Apple compatible.
from skia4delphi.
Thanks! but even with Flush() and Submit() the textures are still not drawed :( Here i m not even in multithread as all operations are made in the main thread. Also when working directly with an OpenGL canvas (not Skia), I am able to create and manage textures in the background without encountering significant issues. This leads me to believe that the problem might not solely lie with OpenGL's architecture. Given this, I suspect the issue may be more specifically related to how Skia creates and manages the shared context in OpenGL.
from skia4delphi.
@Zeus64 we'll be a bit overwhelmed with work over the next few days, but I'll look into your problem as soon as possible.
However, I can provide some preliminary insights. I'll have to look into it when time permits, I had some examples of this, I remember I had problems sharing texture between contexts (even if OpenGL contexts are created in a shared way) through Skia. Texture creation should use the same color type, number of samples (I see you used 1).
from skia4delphi.
@viniciusfbb Thanks a lot for your help and your precious work ! I will try also to dig into as soon as possible, right now I m fighting with skparagraph and I need to finish this before to study why GPU image do not work with skia in openGL.
from skia4delphi.
right now I m fighting with skparagraph
@Zeus64 You can check the implementation of FMX.Skia.Canvas.TSkTextLayout, which uses SkParagraph. However, the TSkTextLayout source has complexities that were only necessary to emulate the exact behavior of other TTextLayout implementations.
from skia4delphi.
Related Issues (20)
- Installation failed for Delphi 12 HOT 4
- Delphi 12: App will crash on Android if System.Skia is linked HOT 2
- Please make TSkGraphic and TSkSvgGraphic accessible HOT 4
- What is technical art behind “Skia Enabled” old app? HOT 3
- Multiline Text in TText: problem when AutoSize is True and WordWrap is False HOT 3
- TSkPath.Contains() does not work properly in some situations HOT 1
- Enabling Skia causes other controls to redraw abnormally HOT 2
- MacOS: Exception in libsk4d.dylib in skia::textlayout::TextWrapper::lookAhead
- TSkSVG not displaying SVG file properly HOT 4
- In Delphi 12 IDE crashes when you drag and drop TSkAnimatedPaintbox to Form HOT 1
- ACCESS Violation after adding SKIA to Uses clause HOT 3
- Text extent fails under MacOS(!) HOT 3
- Android Crash on Delphi 11.3 for Transferred Bricks Game Demo Project HOT 2
- Universal MAC Dylib HOT 2
- ISkRuntimeEffect changes from 3.4.0 to 6.0.0 HOT 3
- Request for SkFontMg.matchFamilyStyleCharacter equivalent
- Request for SkTextBlob.bounds eqivalent
- How to enable GPU in VCL? HOT 1
- Getting an indexed color from TSkPaint.Shader.MakeGradientLinear HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skia4delphi.