summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-08 12:19:18 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:07 +0100
commit71a07e886c61b47370ddaaf1b3d4b88971ef9efc (patch)
treea90d1b4084925f707a6b1f31f7ca3f218f0c0a0e /vcl/inc/skia
parent3027980cdfaa954e4b4c244d3cd493923077d359 (diff)
initial implementation of Skia drawing on screen in Windows
Change-Id: I1562bd2cfd1862947042bef3343aefd851a65002
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r--vcl/inc/skia/win/gdiimpl.hxx54
1 files changed, 54 insertions, 0 deletions
diff --git a/vcl/inc/skia/win/gdiimpl.hxx b/vcl/inc/skia/win/gdiimpl.hxx
new file mode 100644
index 000000000000..621d8d4b4a78
--- /dev/null
+++ b/vcl/inc/skia/win/gdiimpl.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_VCL_INC_SKIA_WIN_GDIIMPL_HXX
+#define INCLUDED_VCL_INC_SKIA_WIN_GDIIMPL_HXX
+
+#include <memory>
+#include <vcl/dllapi.h>
+
+#include <skia/gdiimpl.hxx>
+#include <win/salgdi.h>
+
+class ControlCacheKey;
+namespace sk_app
+{
+class WindowContext;
+}
+
+class WinSkiaSalGraphicsImpl : public SkiaSalGraphicsImpl
+{
+private:
+ WinSalGraphics& mWinParent;
+
+public:
+ WinSkiaSalGraphicsImpl(WinSalGraphics& rGraphics, SalGeometryProvider* mpProvider);
+
+ virtual void Init() override;
+ virtual void DeInit() override;
+ virtual void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
+
+ virtual void freeResources() override;
+
+ bool TryRenderCachedNativeControl(ControlCacheKey const& rControlCacheKey, int nX, int nY);
+
+ bool RenderAndCacheNativeControl(OpenGLCompatibleDC& rWhite, OpenGLCompatibleDC& rBlack, int nX,
+ int nY, ControlCacheKey& aControlCacheKey);
+
+protected:
+ virtual void createSurface() override;
+ virtual void performFlush() override;
+
+private:
+ std::unique_ptr<sk_app::WindowContext> mWindowContext;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */