diff options
Diffstat (limited to 'vcl/inc/skia/win/gdiimpl.hxx')
-rw-r--r-- | vcl/inc/skia/win/gdiimpl.hxx | 53 |
1 files changed, 53 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..03f04ca4889c --- /dev/null +++ b/vcl/inc/skia/win/gdiimpl.hxx @@ -0,0 +1,53 @@ +/* -*- 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 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: */ |