Added VSync

This commit is contained in:
Yousef Khadadeh 2025-11-20 12:38:28 +03:00
parent 8f130ada92
commit 22e68de4cd
5 changed files with 34 additions and 3 deletions

View file

@ -310,7 +310,7 @@ void resize_window(MainStruct& mS) {
SkSurfaceProps props2;
mS.target = GrBackendRenderTargets::MakeGL(mS.m->window.size.x(), mS.m->window.size.y(), 0, mS.kStencilBits, info);
mS.surface = SkSurfaces::WrapBackendRenderTarget(mS.ctx.get(), mS.target, kBottomLeft_GrSurfaceOrigin, kRGBA_8888_SkColorType, nullptr, &props2);
mS.surface = SkSurfaces::WrapBackendRenderTarget(mS.ctx.get(), mS.target, kBottomLeft_GrSurfaceOrigin, kRGBA_8888_SkColorType, SkColorSpace::MakeSRGB(), &props2);
if(!mS.surface)
throw std::runtime_error("[resize_window] Could not make surface");