Skip to content

Commit

Permalink
Release 1.0.12
Browse files Browse the repository at this point in the history
* Fixed bug in the ws::ft::FontManager which could yield memory corrption after
  complete font manager cleanup.
* Updated build scripts.
* Updated module versions in dependencies.
  • Loading branch information
sadko4u committed Jul 18, 2023
2 parents 9ddf847 + 02e80bf commit eb51871
Show file tree
Hide file tree
Showing 20 changed files with 296 additions and 173 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
steps:
- name: Add debug repositories
run: |
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[multilib-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
- name: Install dependencies
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
Expand All @@ -46,13 +46,13 @@ jobs:
steps:
- name: Add debug repositories
run: |
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[multilib-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
- name: Install dependencies
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 DEBUG=1
run: make config TEST=1 STRICT=1 DEBUG=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
Expand All @@ -74,7 +74,7 @@ jobs:
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
Expand All @@ -96,7 +96,7 @@ jobs:
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libstdc++-devel clang libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 CC=clang CXX=clang++
run: make config TEST=1 STRICT=1 CC=clang CXX=clang++
- name: Fetch project dependencies
run: make fetch
- name: Build project
Expand All @@ -120,7 +120,7 @@ jobs:
run: apt-get -y install git make pkg-config valgrind gcc g++ libgl-dev libsndfile1-dev libx11-dev libxrandr-dev libfreetype6-dev libcairo2-dev
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
- uses: actions/checkout@v3
- name: Configure project
shell: msys2 {0}
run: make config TEST=1
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
shell: msys2 {0}
run: make fetch
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
* RECENT CHANGES
*******************************************************************************

=== 1.0.12 ===
* Fixed bug in the ws::ft::FontManager which could yield memory corrption after
complete font manager cleanup.
* Updated build scripts.
* Updated module versions in dependencies.

=== 1.0.11 ===
* Fixed clang build error.

Expand Down
17 changes: 15 additions & 2 deletions include/lsp-plug.in/ws/IDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace lsp
r3d::factory_t *p3DFactory; // Pointer to the factory object
ssize_t nCurrent3D; // Current 3D backend
ssize_t nPending3D; // Pending 3D backend
size_t nIdleInterval; // Idle interval in milliseconds

protected:
friend class IR3DBackend;
Expand All @@ -109,7 +110,6 @@ namespace lsp
status_t switch_r3d_backend(r3d_lib_t *backend);
status_t commit_r3d_factory(const LSPString *path, r3d::factory_t *factory, const version_t *mversion);
void detach_r3d_backends();
void call_main_task(timestamp_t time);
status_t process_pending_tasks(timestamp_t time);
static void drop_r3d_lib(r3d_lib_t *lib);
bool check_duplicate(const r3d_lib_t *lib);
Expand Down Expand Up @@ -515,7 +515,20 @@ namespace lsp
* @param count number of actual monitors enumerated
* @return pointer to enumerated monitors or error.
*/
virtual const MonitorInfo *enum_monitors(size_t *count);
virtual const MonitorInfo *enum_monitors(size_t *count);

/**
* Get the typical idle interval for the display
* @return the typical idle interval (default 50 ms or 20 FPS)
*/
virtual size_t idle_interval();

/**
* Set the typical idle interval for the display
* @param interval idle interval in millisecionds
* @return previous value of the idle interval
*/
size_t set_idle_interval(size_t interval);
};

} /* namespace ws */
Expand Down
2 changes: 1 addition & 1 deletion include/lsp-plug.in/ws/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#define LSP_WS_LIB_MAJOR 1
#define LSP_WS_LIB_MINOR 0
#define LSP_WS_LIB_MICRO 11
#define LSP_WS_LIB_MICRO 12

#if defined(LSP_WS_LIB_PUBLISHER)
#define LSP_WS_LIB_PUBLIC LSP_EXPORT_MODIFIER
Expand Down
7 changes: 3 additions & 4 deletions include/private/win/WinDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ namespace lsp
friend class WinWindow;
friend class WinDDSurface;

public:
static const WCHAR *WINDOW_CLASS_NAME;
static const WCHAR *CLIPBOARD_CLASS_NAME;

protected:
typedef struct font_t
{
Expand Down Expand Up @@ -118,6 +114,9 @@ namespace lsp
lltl::parray<void> vClipMemory; // Memory chunks allocated for the clipboard
WinWindow *pDragWindow; // Window which is currently acting in Drag&Drop action
ipc::Thread *pPingThread; // Pinger thread
volatile timestamp_t nLastIdleCall; // The time of last idle call
LSPString sWindowClassName; // Window class name
LSPString sClipboardClassName; // Clipboard window class name

protected:
void do_destroy();
Expand Down
2 changes: 2 additions & 0 deletions include/private/win/WinWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ namespace lsp
WinDisplay *pWinDisplay; // Pointer to the display
HWND hWindow; // The identifier of the wrapped window
HWND hParent; // The identifier of parent window
HWND hTransientFor; // The transient window
WinDDSurface *pSurface; // Drawing surface
WinDNDTarget *pDNDTarget; // Drag&Drop target
LONG_PTR pOldUserData; // Old user data
WNDPROC pOldProc; // Old window procedure (if present)
bool bWrapper; // Indicates that window is a wrapper
bool bMouseInside; // Flag that indicates that mouse is inside of the window
bool bGrabbing; // Grabbing mouse and keyboard events
bool bTransientOn; // The transient window status
size_t nMouseCapture; // Flag for capturing mouse
rectangle_t sSize; // Size of the window
size_limit_t sConstraints; // Window constraints
Expand Down
4 changes: 2 additions & 2 deletions include/private/x11/X11Display.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2020 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2023 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 10 окт. 2016 г.
Expand Down
8 changes: 4 additions & 4 deletions make/configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ define _modconfig =
$(if $($(name)_TEST),, $(eval $(name)_TEST := $($(name)_PATH)/test))
$(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0))
$(if $($(name)_BIN),, $(eval $(name)_BIN := $(TARGET_BUILDDIR)/$($(name)_NAME)))
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "-I\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER)))
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER)))
$(if $($(name)_LDLAGS),, $(eval $(name)_LDFLAGS :=))
$(if $($(name)_OBJ),, $(eval $(name)_OBJ := "$($(name)_BIN)/$($(name)_NAME).o"))
$(if $($(name)_OBJ_TEST),, $(eval $(name)_OBJ_TEST := "$($(name)_BIN)/$($(name)_NAME)-test.o"))
Expand All @@ -129,7 +129,7 @@ define _modconfig =
$(if $(HOST_$(name)_TEST),, $(eval HOST_$(name)_TEST := $(HOST_$(name)_PATH)/test))
$(if $(HOST_$(name)_TESTING),, $(eval HOST_$(name)_TESTING := 0))
$(if $(HOST_$(name)_BIN),, $(eval HOST_$(name)_BIN := $(HOST_BUILDDIR)/$($(name)_NAME)))
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "-I\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER)))
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\"" -D$(name)_BUILTIN$(if $(publisher), -D$(name)_PUBLISHER)))
$(if $(HOST_$(name)_LDLAGS),, $(eval HOST_$(name)_LDFLAGS :=))
$(if $(HOST_$(name)_OBJ),, $(eval HOST_$(name)_OBJ := "$(HOST_$(name)_BIN)/$($(name)_NAME).o"))
$(if $(HOST_$(name)_OBJ_TEST),,$(eval HOST_$(name)_OBJ_TEST:= "$(HOST_$(name)_BIN)/$($(name)_NAME)-test.o"))
Expand Down Expand Up @@ -158,13 +158,13 @@ define hdrconfig =
$(if $($(name)_PATH),, $(eval $(name)_PATH := $(MODULES)/$($(name)_NAME)))
$(if $($(name)_INC),, $(eval $(name)_INC := $($(name)_PATH)/include))
$(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0))
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "-I\"$($(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER")))
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER")))
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := "-D$(name)_BUILTIN -fvisibility=hidden"))

$(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME)))
$(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include))
$(if $(HOST_$(name)_TESTING),, $(eval HOST_$(name)_TESTING := 0))
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "-I\"$(HOST_$(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER")))
$(if $(HOST_$(name)_CFLAGS),, $(eval HOST_$(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$(HOST_$(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER")))
$(if $(HOST_$(name)_MFLAGS),, $(eval HOST_$(name)_MFLAGS := "-D$(name)_BUILTIN -fvisibility=hidden"))
endef

Expand Down
2 changes: 2 additions & 0 deletions make/system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ COMMON_VARS = \
ROOT_ARTIFACT_ID \
PROFILE \
STATICLIB_EXT \
STRICT \
TEST \
TRACE

Expand All @@ -216,6 +217,7 @@ sysvars:
echo " PLATFORM target software platform to perform build"
echo " PROFILE build with profile options"
echo " STATICLIB_EXT file extension for static library files"
echo " STRICT strict compilation: treat compilation warnings as errors"
echo " SUB_FEATURES list of features disabled in the build as a subtraction of default"
echo " TEST use test build"
echo " TRACE compile with additional trace information output"
Expand Down
5 changes: 5 additions & 0 deletions make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ ifeq ($(TRACE),1)
CXXFLAGS_EXT += -DLSP_TRACE
endif

ifeq ($(STRICT),1)
CFLAGS_EXT += -Werror
CXXFLAGS_EXT += -Werror
endif

ifeq ($(TEST),1)
CFLAGS_EXT += -DLSP_TESTING
CXXFLAGS_EXT += -DLSP_TESTING
Expand Down
18 changes: 9 additions & 9 deletions modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,55 @@

#------------------------------------------------------------------------------
# Variables that describe source code dependencies
LSP_COMMON_LIB_VERSION := 1.0.28
LSP_COMMON_LIB_VERSION := 1.0.29
LSP_COMMON_LIB_NAME := lsp-common-lib
LSP_COMMON_LIB_TYPE := src
LSP_COMMON_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_COMMON_LIB_NAME).git
LSP_COMMON_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_COMMON_LIB_NAME).git

LSP_DSP_LIB_VERSION := 1.0.12
LSP_DSP_LIB_VERSION := 1.0.13
LSP_DSP_LIB_NAME := lsp-dsp-lib
LSP_DSP_LIB_TYPE := src
LSP_DSP_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_DSP_LIB_NAME).git
LSP_DSP_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_DSP_LIB_NAME).git

LSP_LLTL_LIB_VERSION := 1.0.11
LSP_LLTL_LIB_VERSION := 1.0.12
LSP_LLTL_LIB_NAME := lsp-lltl-lib
LSP_LLTL_LIB_TYPE := src
LSP_LLTL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_LLTL_LIB_NAME).git
LSP_LLTL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_LLTL_LIB_NAME).git

LSP_R3D_BASE_LIB_VERSION := 1.0.11
LSP_R3D_BASE_LIB_VERSION := 1.0.12
LSP_R3D_BASE_LIB_NAME := lsp-r3d-base-lib
LSP_R3D_BASE_LIB_TYPE := src
LSP_R3D_BASE_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git
LSP_R3D_BASE_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git

LSP_R3D_GLX_LIB_VERSION := 1.0.11
LSP_R3D_GLX_LIB_VERSION := 1.0.12
LSP_R3D_GLX_LIB_NAME := lsp-r3d-glx-lib
LSP_R3D_GLX_LIB_TYPE := src
LSP_R3D_GLX_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git
LSP_R3D_GLX_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git

LSP_R3D_IFACE_VERSION := 1.0.11
LSP_R3D_IFACE_VERSION := 1.0.12
LSP_R3D_IFACE_NAME := lsp-r3d-iface
LSP_R3D_IFACE_TYPE := src
LSP_R3D_IFACE_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_IFACE_NAME).git
LSP_R3D_IFACE_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_IFACE_NAME).git

LSP_R3D_WGL_LIB_VERSION := 1.0.6
LSP_R3D_WGL_LIB_VERSION := 1.0.7
LSP_R3D_WGL_LIB_NAME := lsp-r3d-wgl-lib
LSP_R3D_WGL_LIB_TYPE := src
LSP_R3D_WGL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git
LSP_R3D_WGL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git

LSP_RUNTIME_LIB_VERSION := 1.0.14
LSP_RUNTIME_LIB_VERSION := 1.0.15
LSP_RUNTIME_LIB_NAME := lsp-runtime-lib
LSP_RUNTIME_LIB_TYPE := src
LSP_RUNTIME_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git
LSP_RUNTIME_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git

LSP_TEST_FW_VERSION := 1.0.20
LSP_TEST_FW_VERSION := 1.0.21
LSP_TEST_FW_NAME := lsp-test-fw
LSP_TEST_FW_TYPE := src
LSP_TEST_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_TEST_FW_NAME).git
Expand Down
2 changes: 1 addition & 1 deletion project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ ARTIFACT_ID = LSP_WS_LIB
ARTIFACT_NAME = lsp-ws-lib
ARTIFACT_DESC = LSP window subsystem core library
ARTIFACT_HEADERS = lsp-plug.in
ARTIFACT_VERSION = 1.0.11
ARTIFACT_VERSION = 1.0.12

53 changes: 33 additions & 20 deletions src/main/IDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ namespace lsp
sMainTask.nTime = 0;
sMainTask.pHandler = NULL;
sMainTask.pArg = NULL;
nIdleInterval = 50;
}

IDisplay::~IDisplay()
Expand Down Expand Up @@ -484,18 +485,30 @@ namespace lsp
}
}

void IDisplay::call_main_task(timestamp_t time)
{
if (sMainTask.pHandler != NULL)
sMainTask.pHandler(time, time, sMainTask.pArg);
}

void IDisplay::task_queue_changed()
{
}

status_t IDisplay::process_pending_tasks(timestamp_t time)
{
// Sync backends
if (nCurrent3D != nPending3D)
{
r3d_lib_t *lib = s3DLibs.get(nPending3D);
if (lib != NULL)
{
if (switch_r3d_backend(lib) == STATUS_OK)
nCurrent3D = nPending3D;
}
else
nPending3D = nCurrent3D;
}

// Call the main task
if (sMainTask.pHandler != NULL)
sMainTask.pHandler(time, time, sMainTask.pArg);

// Execute all other pending tasks
dtask_t task;
status_t result = STATUS_OK;

Expand Down Expand Up @@ -706,19 +719,6 @@ namespace lsp

status_t IDisplay::main_iteration()
{
// Sync backends
if (nCurrent3D != nPending3D)
{
r3d_lib_t *lib = s3DLibs.get(nPending3D);
if (lib != NULL)
{
if (switch_r3d_backend(lib) == STATUS_OK)
nCurrent3D = nPending3D;
}
else
nPending3D = nCurrent3D;
}

return STATUS_SUCCESS;
}

Expand Down Expand Up @@ -993,6 +993,19 @@ namespace lsp
*count = 0;
return NULL;
}
}

size_t IDisplay::idle_interval()
{
return nIdleInterval;
}

size_t IDisplay::set_idle_interval(size_t interval)
{
size_t old = nIdleInterval;
nIdleInterval = interval;
return old;
}

} /* namespace ws */

} /* namespace lsp */
Loading

0 comments on commit eb51871

Please sign in to comment.