summaryrefslogtreecommitdiff
path: root/vcl/skia/win/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/skia/win/gdiimpl.cxx')
-rw-r--r--vcl/skia/win/gdiimpl.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 2e0e7fc8ee12..c7f1fc1f51e6 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -36,8 +36,12 @@ WinSkiaSalGraphicsImpl::WinSkiaSalGraphicsImpl(WinSalGraphics& rGraphics,
{
}
-void WinSkiaSalGraphicsImpl::createWindowContext(bool forceRaster)
+WinSkiaSalGraphicsImpl::~WinSkiaSalGraphicsImpl() { assert(!mWindowContext); }
+
+void WinSkiaSalGraphicsImpl::createWindowSurfaceInternal(bool forceRaster)
{
+ assert(!mWindowContext);
+ assert(!mSurface);
SkiaZone zone;
sk_app::DisplayParams displayParams;
assert(GetWidth() > 0 && GetHeight() > 0);
@@ -52,7 +56,18 @@ void WinSkiaSalGraphicsImpl::createWindowContext(bool forceRaster)
mWindowContext = sk_app::window_context_factory::MakeVulkanForWin(mWinParent.gethWnd(),
displayParams);
break;
+ case RenderMetal:
+ abort();
+ break;
}
+ if (mWindowContext)
+ mSurface = mWindowContext->getBackbufferSurface();
+}
+
+void WinSkiaSalGraphicsImpl::destroyWindowSurfaceInternal()
+{
+ mWindowContext.reset();
+ mSurface.reset();
}
void WinSkiaSalGraphicsImpl::DeInit()