mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-26 18:02:14 +00:00
![]() Partial Rendering refers to a rendering technique where only a portion of the scene or screen is updated, rather than redrawing the entire output. It is commonly used as a performance optimization strategy, focusing on redrawing only the regions that have changed, often called dirty regions. This introduces RenderDirtyRegion, which assists in collecting a compact dirty region from render tasks. To efficient data-processing, this divide the screen region with a designated size of partition and handles the partitl rendering computation with a divide-conquer metholodgy. Each backend can utilize this class to support efficient partial rendering. This is implemented using a Line Sweep and Subdivision Merging O(NlogN). The basic per-frame workflow is as follows: 0. RenderDirtyRegion::init() //set the screen size to properly partition the regions 1. RenderDirtyRegion::prepare() //Call this in Renderer::preRender(). 2. RenderDirtyRegion::add() //Add all dirty paints for the frame before rendering. 3. RenderDirtyRegion::commit() //Generate the partial rendering region list before rendering. 4. RenderDirtyRegion::partition() //Get a certian partition 5. RenderDirtyRegion::get() //Retrieve the current dirty region list of a partition and use it when drawing paints. 6. RenderDirtyRegion::clear() //Reset the state. RenderMethod introduced for 2 utilities for paritial renderings 1. RenderMethod::damage() //add a force dirty region, especially useful for scene effects 2. RenderMethod::partial() //toggle the partial rendering feature issue: https://github.com/thorvg/thorvg/issues/1747 |
||
---|---|---|
.. | ||
gl_engine | ||
sw_engine | ||
wg_engine | ||
meson.build | ||
tvgAccessor.cpp | ||
tvgAnimation.cpp | ||
tvgAnimation.h | ||
tvgCanvas.cpp | ||
tvgCanvas.h | ||
tvgCommon.h | ||
tvgFill.cpp | ||
tvgFill.h | ||
tvgFrameModule.h | ||
tvgGlCanvas.cpp | ||
tvgInitializer.cpp | ||
tvgIteratorAccessor.h | ||
tvgLoader.cpp | ||
tvgLoader.h | ||
tvgLoadModule.h | ||
tvgPaint.cpp | ||
tvgPaint.h | ||
tvgPicture.cpp | ||
tvgPicture.h | ||
tvgRender.cpp | ||
tvgRender.h | ||
tvgSaveModule.h | ||
tvgSaver.cpp | ||
tvgScene.cpp | ||
tvgScene.h | ||
tvgShape.cpp | ||
tvgShape.h | ||
tvgSwCanvas.cpp | ||
tvgTaskScheduler.cpp | ||
tvgTaskScheduler.h | ||
tvgText.cpp | ||
tvgText.h | ||
tvgWgCanvas.cpp |