mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
wg_engine: fix model view matrix
In a case of compostions model view matrix did not apply samples count
This commit is contained in:
parent
9f08e4755c
commit
a7f4d718f4
3 changed files with 5 additions and 5 deletions
|
@ -323,7 +323,7 @@ void WgRenderStorage::endComputePass(WGPUComputePassEncoder computePassEncoder)
|
|||
// render storage pool
|
||||
//*****************************************************************************
|
||||
|
||||
WgRenderStorage* WgRenderStoragePool::allocate(WgContext& context, uint32_t w, uint32_t h)
|
||||
WgRenderStorage* WgRenderStoragePool::allocate(WgContext& context, uint32_t w, uint32_t h, uint32_t samples)
|
||||
{
|
||||
WgRenderStorage* renderStorage{};
|
||||
if (mPool.count > 0) {
|
||||
|
@ -331,7 +331,7 @@ WgRenderStorage* WgRenderStoragePool::allocate(WgContext& context, uint32_t w, u
|
|||
mPool.pop();
|
||||
} else {
|
||||
renderStorage = new WgRenderStorage;
|
||||
renderStorage->initialize(context, w, h);
|
||||
renderStorage->initialize(context, w, h, samples);
|
||||
mList.push(renderStorage);
|
||||
}
|
||||
return renderStorage;
|
||||
|
|
|
@ -81,7 +81,7 @@ private:
|
|||
Array<WgRenderStorage*> mList;
|
||||
Array<WgRenderStorage*> mPool;
|
||||
public:
|
||||
WgRenderStorage* allocate(WgContext& context, uint32_t w, uint32_t h);
|
||||
WgRenderStorage* allocate(WgContext& context, uint32_t w, uint32_t h, uint32_t samples = 1);
|
||||
void free(WgContext& context, WgRenderStorage* renderTarget);
|
||||
void release(WgContext& context);
|
||||
};
|
||||
|
|
|
@ -300,7 +300,7 @@ bool WgRenderer::target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t
|
|||
mTargetSurface.w = w;
|
||||
mTargetSurface.h = h;
|
||||
|
||||
mRenderTarget.initialize(mContext, w * WG_SSAA_SAMPLES, h * WG_SSAA_SAMPLES);
|
||||
mRenderTarget.initialize(mContext, w, h, WG_SSAA_SAMPLES);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,7 @@ bool WgRenderer::beginComposite(TVG_UNUSED Compositor* cmp, TVG_UNUSED Composite
|
|||
// end current render pass
|
||||
mRenderStorageStack.last()->endRenderPass();
|
||||
// allocate new render storage and push it to top of render tree
|
||||
WgRenderStorage* renderStorage = mRenderStoragePool.allocate(mContext, mTargetSurface.w * WG_SSAA_SAMPLES, mTargetSurface.h * WG_SSAA_SAMPLES);
|
||||
WgRenderStorage* renderStorage = mRenderStoragePool.allocate(mContext, mTargetSurface.w, mTargetSurface.h, WG_SSAA_SAMPLES);
|
||||
mRenderStorageStack.push(renderStorage);
|
||||
// begin last render pass
|
||||
mRenderStorageStack.last()->beginRenderPass(mCommandEncoder, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue