Skip to content

About savelayer #122

Answered by domchen
xdestiny110 asked this question in General
Discussion options

You must be logged in to vote

There are two reasons why tgfx does not implement the saveLayer API. Firstly, the saveLayer API is just a shortcut, offering a convenient way to create temporary surfaces. As such, it is not necessary since the same functionality can be achieved by manually creating surfaces. Secondly, this API can significantly impact rendering performance. To optimize rendering performance, it is crucial to minimize offscreen rendering phases whenever possible. However, the saveLayer API can introduce numerous unnecessary offscreen-rendering phases without the user's awareness. Therefore, to maintain optimal performance, tgfx has chosen not to implement this API.

The question you've raised is a good one…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by domchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants