Skip to content

Texture#478

Merged
zccrs merged 2 commits intovioken:masterfrom
zccrs:texture
Sep 3, 2024
Merged

Texture#478
zccrs merged 2 commits intovioken:masterfrom
zccrs:texture

Conversation

@zccrs
Copy link
Copy Markdown
Contributor

@zccrs zccrs commented Aug 30, 2024

No description provided.

@zccrs zccrs requested review from Groveer and wineee August 30, 2024 09:20
@zccrs zccrs added the breaking Some interface will break in the PR. label Aug 30, 2024
@zccrs zccrs force-pushed the texture branch 5 times, most recently from 3e90c30 to 2dde7e3 Compare September 2, 2024 08:57
Renamed WBufferTextureProvider to WSGTextureProvider.

Deprecated and removed WTexture, moving its core implementation
to WRenderHelper. The logic for handling qw_buffer objects has
been transferred to WBufferTextureProvider.

Most of the WSGTextureProvider implementations are similar, so the
texture providers from multiple objects have been consolidated into
WSGTextureProvider to avoid redundant code. Additionally, the
implementation of WSGTextureProvider has been refactored to reuse
a single QSGPlainTexture object, rather than destroying and
recreating it with qw_texture as was done previously.

Refactored the usage of QSGTextureProvider in WSurfaceItem and other
objects to adapt to WSGTextureProvider, ensuring they are only used
on the render thread as specified in the Qt documentation.

Changes made to WSurfaceItem::updatePaintNode during the refactoring
resolved a potential crash issue. Previously, when updating the
paint node, calling markDirty(DirtyMaterial) alone was incorrect
because the QSGTexture object might have changed. Now, always calling
setTexture ensures this issue is addressed.
The way WQuickTextureProxy was using QSGTextureProvider was incorrect.
According to the Qt documentation, the QQuickItem::textureProvider function
should only be called from the render thread.
Comment thread src/server/qtquick/wsurfaceitem.cpp
Comment thread src/server/qtquick/wsurfaceitem.cpp
@zccrs zccrs merged commit db97ebc into vioken:master Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Some interface will break in the PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants