Basic Font integration.
This commit is contained in:
parent
ce11c52ae5
commit
72123bc333
36 changed files with 325 additions and 198 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "FileLogger.h"
|
||||
#include "DesktopManager.h"
|
||||
#include "WindowManager.h"
|
||||
#include "FontsManager.h"
|
||||
|
||||
#include "WaylandSurface.h"
|
||||
#include "WaylandBuffer.h"
|
||||
|
@ -43,8 +44,8 @@ void WaylandInterface::registryHandleGlobalRemoveEvent(void *data, struct wl_reg
|
|||
|
||||
}
|
||||
|
||||
WaylandInterface::WaylandInterface(DesktopManager* desktopManager, bool useHardware)
|
||||
: AbstractUIInterface(desktopManager, useHardware),
|
||||
WaylandInterface::WaylandInterface(DesktopManager* desktopManager, std::unique_ptr<FontsManager> fontsManager, bool useHardware)
|
||||
: AbstractUIInterface(desktopManager, std::move(fontsManager), useHardware),
|
||||
mBuffer(std::make_shared<WaylandBuffer>())
|
||||
{
|
||||
mRegistryListener.global = registryHandleGlobalEvent;
|
||||
|
@ -129,7 +130,7 @@ void WaylandInterface::doXdgPong(uint32_t serial)
|
|||
|
||||
void WaylandInterface::addWindow(mt::Window* window)
|
||||
{
|
||||
WaylandSurface::add(window, mCompositor, mXdgBase, mBuffer, mEglInterface.get());
|
||||
WaylandSurface::add(window, mCompositor, mXdgBase, mBuffer, mFontsManager.get(), mEglInterface.get());
|
||||
}
|
||||
|
||||
void WaylandInterface::showWindow(mt::Window* window)
|
||||
|
|
|
@ -18,7 +18,7 @@ class WaylandInterface : public AbstractUIInterface
|
|||
{
|
||||
|
||||
public:
|
||||
WaylandInterface(DesktopManager* desktopManager, bool useHardware = true);
|
||||
WaylandInterface(DesktopManager* desktopManager, std::unique_ptr<FontsManager> fontsManager, bool useHardware = true);
|
||||
|
||||
~WaylandInterface();
|
||||
|
||||
|
|
|
@ -2,14 +2,16 @@
|
|||
|
||||
#include "WaylandEglWindowInterface.h"
|
||||
#include "ImagePrimitives.h"
|
||||
#include "DrawingContext.h"
|
||||
|
||||
void WaylandSurface::add(mt::Window* window, wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr<WaylandBuffer> buffer, WaylandEglInterface* eglInterface)
|
||||
#include "DrawingContext.h"
|
||||
#include "FontsManager.h"
|
||||
|
||||
void WaylandSurface::add(mt::Window* window, wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr<WaylandBuffer> buffer, FontsManager* fontsManager, WaylandEglInterface* eglInterface)
|
||||
{
|
||||
auto wayland_window = std::make_unique<WaylandSurface>(window, compositor, xdg_wm_base, buffer, eglInterface);
|
||||
|
||||
const auto drawing_mode = eglInterface ? DrawingMode::GRAPH : DrawingMode::RASTER;
|
||||
window->setPlatformWindow(std::move(wayland_window), drawing_mode);
|
||||
window->setPlatformWindow(std::move(wayland_window), fontsManager, drawing_mode);
|
||||
}
|
||||
|
||||
WaylandSurface::WaylandSurface(mt::Window* window, wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr<WaylandBuffer> buffer, WaylandEglInterface* eglInterface)
|
||||
|
|
|
@ -16,11 +16,13 @@ struct xdg_toplevel;
|
|||
class WaylandEglInterface;
|
||||
class WaylandEglWindowInterface;
|
||||
|
||||
class FontsManager;
|
||||
|
||||
class WaylandSurface : public IPlatformWindow
|
||||
{
|
||||
public:
|
||||
|
||||
static void add(mt::Window* window, wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr<WaylandBuffer> buffer, WaylandEglInterface* eglInterface);
|
||||
static void add(mt::Window* window, wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr<WaylandBuffer> buffer, FontsManager* fontsManager, WaylandEglInterface* eglInterface);
|
||||
|
||||
WaylandSurface(mt::Window* window, wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr<WaylandBuffer> buffer, WaylandEglInterface* eglInterface);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue