+
Skip to content

wg_engine: tesselletor optimization #3576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SergeyLebedkin
Copy link
Member

  1. invoid intermediate outline buffers for tessellation
  2. render shape and strokes by single draw call

1. invoid intermediate outline buffers for tessellation
2. render shape and strokes by single draw call
@SergeyLebedkin SergeyLebedkin marked this pull request as draft June 25, 2025 22:41
@SergeyLebedkin SergeyLebedkin self-assigned this Jun 25, 2025
@github-actions github-actions bot added renderer Core rendering gl OpenGL/WebGL render backend webgpu WebGPU render backend labels Jun 25, 2025
@SergeyLebedkin SergeyLebedkin added refactoring Code refactoring / Exceptional handles optimization Enhance performance / Reduce memory usage or binary size and removed renderer Core rendering gl OpenGL/WebGL render backend labels Jun 25, 2025
@hermet hermet requested a review from Copilot June 26, 2025 01:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces optimizations in the wg_engine tessellator by avoiding the use of intermediate outline buffers and consolidating the rendering of shapes and strokes into a single draw call. Key changes include the addition of new tessellator classes and associated logic in tvgWgTessellator.{h,cpp}, updates to renderer and render data modules to remove obsolete buffer pool usage, and corresponding adjustments in GL engine files and build configuration.

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/renderer/wg_engine/tvgWgTessellator.{h,cpp} New tessellator classes and optimized stroke/dash processing
src/renderer/wg_engine/tvgWgRenderer.{h,cpp} Removed mBufferPool usage and updated updateMeshes calls
src/renderer/wg_engine/tvgWgRenderData.{h,cpp} Consolidated mesh variables (meshShape, meshStrokes, etc.) and removed deprecated mesh group usage
src/renderer/wg_engine/tvgWgGeometry.{h,cpp} Simplified geometry helpers and introduced clear() for mesh data
src/renderer/gl_engine/* Updated scaling and transformation logic for GL tessellation and rendering
src/renderer/wg_engine/tvgWgCommon.{h,cpp} Removed unused bufferIndexFan allocation
src/renderer/wg_engine/meson.build Added new tessellator source file
Comments suppressed due to low confidence (1)

src/renderer/wg_engine/tvgWgTessellator.cpp:38

  • Consider using scaling(mMatrix) for both the numerator and denominator in the stroke width computation to account for rotation and non-uniform scaling, instead of dividing by mMatrix.e11 directly.
    if (isinf(mMatrix.e11)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization Enhance performance / Reduce memory usage or binary size refactoring Code refactoring / Exceptional handles webgpu WebGPU render backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载