Skip to content

Commit 606934e

Browse files
committed
perf: 不再执行多余的渲染
1 parent 9ce749c commit 606934e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

‎Runtime/EffectDrawer.cpp‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,9 @@ bool EffectDrawer::Initialize(
238238
return false;
239239
}
240240

241-
D3D11_TEXTURE2D_DESC desc;
242-
_textures.back()->GetDesc(&desc);
243241
_dispatches.emplace_back(
244-
(desc.Width + passDesc.blockSize.first - 1) / passDesc.blockSize.first,
245-
(desc.Height + passDesc.blockSize.second - 1) / passDesc.blockSize.second
242+
(outputSize.cx + passDesc.blockSize.first - 1) / passDesc.blockSize.first,
243+
(outputSize.cy + passDesc.blockSize.second - 1) / passDesc.blockSize.second
246244
);
247245
}
248246
}

‎Runtime/ImGuiImpl.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static std::optional<LRESULT> WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam,
8787
break;
8888
case WM_MOUSEHWHEEL:
8989
io.MouseWheelH += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA;
90-
return 0;
90+
break;
9191
}
9292

9393
return std::nullopt;

0 commit comments

Comments
 (0)