Skip to content

Commit

Permalink
Release 1.0.21
Browse files Browse the repository at this point in the history
* Using inplace new from common library.
* Some optimizations of X11CairoSurface.
* Updated build scripts.
* Updated module versions in dependencies.
  • Loading branch information
sadko4u committed May 20, 2024
2 parents dca72eb + d17ed8e commit 7717075
Show file tree
Hide file tree
Showing 17 changed files with 180 additions and 113 deletions.
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.21 ===
* Using inplace new from common library.
* Some optimizations of X11CairoSurface.
* Updated build scripts.
* Updated module versions in dependencies.

=== 1.0.20 ===
* Updated build scripts.
* Updated module versions in dependencies.
Expand Down
2 changes: 2 additions & 0 deletions dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ TEST_DEPENDENCIES = \
LINUX_DEPENDENCIES = \
LIBPTHREAD \
LIBDL \
LIBRT \
LIBSNDFILE \
LIBCAIRO \
LIBFREETYPE \
Expand All @@ -56,6 +57,7 @@ endif
BSD_DEPENDENCIES = \
LIBPTHREAD \
LIBDL \
LIBRT \
LIBSNDFILE \
LIBICONV \
LIBCAIRO \
Expand Down
1 change: 1 addition & 0 deletions include/lsp-plug.in/ws/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ namespace lsp
ST_UNKNOWN, // Unknown surface type
ST_IMAGE, // Image surface
ST_XLIB, // Surface created by XLIB extension (X.11 Linux/FreeBSD)
ST_SIMILAR, // Similar surface to the parent
ST_DDRAW, // Surface created by DirectDraw factory (Windows)
};

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 20
#define LSP_WS_LIB_MICRO 21

#if defined(LSP_WS_LIB_PUBLISHER)
#define LSP_WS_LIB_PUBLIC LSP_EXPORT_MODIFIER
Expand Down
11 changes: 2 additions & 9 deletions include/private/freetype/types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2023 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 8 апр. 2023 г.
Expand Down Expand Up @@ -37,13 +37,6 @@ namespace lsp
{
namespace ft
{
/**
* Tag structure used for in-place new operator
*/
typedef struct allocator_tag_t
{
} allocator_tag_t;

typedef int32_t f26p6_t;

/**
Expand Down
1 change: 1 addition & 0 deletions include/private/win/WinWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ namespace lsp
bool process_virtual_key(event_t *ev, WPARAM wParam, LPARAM lParam);
void handle_mouse_leave();
void handle_mouse_enter(const ws::event_t *ev);
status_t set_geomety_impl();

public:
explicit WinWindow(WinDisplay *dpy, HWND wnd, IEventHandler *handler, bool wrapper);
Expand Down
7 changes: 7 additions & 0 deletions include/private/x11/X11CairoSurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ namespace lsp
*/
explicit X11CairoSurface(X11Display *dpy, Drawable drawable, Visual *visual, size_t width, size_t height);

/** Create image surface
*
* @param width surface width
* @param height surface height
*/
explicit X11CairoSurface(X11Display *dpy, cairo_surface_t *surface, size_t width, size_t height);

/** Create image surface
*
* @param width surface width
Expand Down
2 changes: 2 additions & 0 deletions make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ ifeq ($(PLATFORM),Solaris)
else ifeq ($(PLATFORM),Windows)
FLAG_RELRO =
FLAG_STDLIB =
CFLAGS_EXT += -DWINVER=0x600 -D_WIN32_WINNT=0x600
CXXFLAGS_EXT += -DWINVER=0x600 -D_WIN32_WINNT=0x600
EXE_FLAGS_EXT += -static-libgcc -static-libstdc++
SO_FLAGS_EXT += -static-libgcc -static-libstdc++
LDFLAGS_EXT += -T $(CURDIR)/make/ld-windows.script
Expand Down
23 changes: 14 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.34
LSP_COMMON_LIB_VERSION := 1.0.36
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.21
LSP_DSP_LIB_VERSION := 1.0.23
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.17
LSP_LLTL_LIB_VERSION := 1.0.19
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.17
LSP_R3D_BASE_LIB_VERSION := 1.0.18
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.17
LSP_R3D_GLX_LIB_VERSION := 1.0.18
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.17
LSP_R3D_IFACE_VERSION := 1.0.18
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.12
LSP_R3D_WGL_LIB_VERSION := 1.0.13
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.20
LSP_RUNTIME_LIB_VERSION := 1.0.22
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.24
LSP_TEST_FW_VERSION := 1.0.25
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 Expand Up @@ -133,6 +133,11 @@ LIBPTHREAD_NAME := libpthread
LIBPTHREAD_TYPE := opt
LIBPTHREAD_LDFLAGS := -lpthread

LIBRT_VERSION := system
LIBRT_NAME := librt
LIBRT_TYPE := opt
LIBRT_LDFLAGS := -lrt

LIBSNDFILE_VERSION := system
LIBSNDFILE_NAME := sndfile
LIBSNDFILE_TYPE := pkg
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.20
ARTIFACT_VERSION = 1.0.21

18 changes: 9 additions & 9 deletions src/main/freetype/FontManger.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2023 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 23 апр. 2023 г.
Expand Down Expand Up @@ -74,13 +74,13 @@ namespace lsp
return;

// Output cache statistics
lsp_info("Cache statistics:");
lsp_info(" Memory: %ld", long(nCacheSize));
lsp_info(" Face hits: %ld", long(nFaceHits));
lsp_info(" Face misses: %ld", long(nFaceMisses));
lsp_info(" Glyph hits: %ld", long(nGlyphHits));
lsp_info(" Glyph misses: %ld", long(nGlyphMisses));
lsp_info(" Glyph removal: %ld", long(nGlyphRemoval));
lsp_trace("Cache statistics:");
lsp_trace(" Memory: %ld", long(nCacheSize));
lsp_trace(" Face hits: %ld", long(nFaceHits));
lsp_trace(" Face misses: %ld", long(nFaceMisses));
lsp_trace(" Glyph hits: %ld", long(nGlyphHits));
lsp_trace(" Glyph misses: %ld", long(nGlyphMisses));
lsp_trace(" Glyph removal: %ld", long(nGlyphRemoval));

// Destroy the state
clear();
Expand Down
12 changes: 3 additions & 9 deletions src/main/freetype/face.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <lsp-plug.in/common/alloc.h>
#include <lsp-plug.in/common/debug.h>
#include <lsp-plug.in/common/new.h>
#include <lsp-plug.in/common/types.h>
#include <lsp-plug.in/io/OutMemoryStream.h>
#include <lsp-plug.in/stdlib/stdlib.h>
Expand All @@ -31,11 +32,6 @@
#include <private/freetype/glyph.h>
#include <private/freetype/types.h>

inline void *operator new(size_t size, void *ptr, const lsp::ws::ft::allocator_tag_t & tag)
{
return ptr;
}

namespace lsp
{
namespace ws
Expand Down Expand Up @@ -157,8 +153,7 @@ namespace lsp
face->ascent = 0;
face->descent = 0;

allocator_tag_t tag;
new (&face->cache, tag) GlyphCache();
new (reinterpret_cast<void *>(&face->cache), inplace_new_tag_t()) GlyphCache();

// Cleanup the pointer to avoid face destruction
++face->font->references;
Expand Down Expand Up @@ -209,8 +204,7 @@ namespace lsp
face->ascent = 0;
face->descent = 0;

allocator_tag_t tag;
new (&face->cache, tag) GlyphCache();
new (reinterpret_cast<void *>(&face->cache), inplace_new_tag_t()) GlyphCache();

// Cleanup the pointer to avoid face destruction
++face->font->references;
Expand Down
9 changes: 2 additions & 7 deletions src/main/win/WinDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <lsp-plug.in/common/alloc.h>
#include <lsp-plug.in/common/debug.h>
#include <lsp-plug.in/common/new.h>
#include <lsp-plug.in/io/charset.h>
#include <lsp-plug.in/io/OutMemoryStream.h>
#include <lsp-plug.in/stdlib/math.h>
Expand All @@ -45,12 +46,6 @@
#include <winuser.h>
#include <d2d1.h>

// Define the placement-new for our construction/destruction tricks
inline void *operator new (size_t size, void *ptr)
{
return ptr;
}

namespace lsp
{
namespace ws
Expand Down Expand Up @@ -589,7 +584,7 @@ namespace lsp
MonitorInfo *di = result->add();
if (di == NULL)
return TRUE;
new (static_cast<void *>(&di->name)) LSPString;
new (&di->name, inplace_new_tag_t()) LSPString;

MONITORINFOEXW xmi;
xmi.cbSize = sizeof(xmi);
Expand Down
Loading

0 comments on commit 7717075

Please sign in to comment.