Skip to content

Commit

Permalink
Release 1.0.14
Browse files Browse the repository at this point in the history
* Improved code base by using PVS Studio static code analyzer.
* Improved text rendering for Windows platform.
* Significant improvements related to rectangle area clipping for Windows platform.
* Several improvements against grabbing events for Windows.
* Updated module versions in dependencies.
  • Loading branch information
sadko4u committed Sep 9, 2023
2 parents e7cb7e4 + e9e55d7 commit b4732b3
Show file tree
Hide file tree
Showing 20 changed files with 553 additions and 181 deletions.
86 changes: 77 additions & 9 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@
</tool>
</toolChain>
</folderInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.855449491" name="main.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/test/main.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1203487925.462668593">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1203487925.462668593" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1203487925"/>
</fileInfo>
<sourceEntries>
<entry excluding="modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-r3d-wgl-lib/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
Expand Down Expand Up @@ -145,9 +142,6 @@
</tool>
</toolChain>
</folderInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.release.2093466427.1267403702" name="main.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/test/main.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.675932511.2029411196">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.675932511.2029411196" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.675932511"/>
</fileInfo>
<sourceEntries>
<entry excluding="modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-r3d-wgl-lib/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
Expand Down Expand Up @@ -185,6 +179,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-r3d-wgl-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-runtime-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-common-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-dsp-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-lltl-lib/include}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.preprocessor.def.1394769691" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
Expand All @@ -204,7 +199,11 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-test-fw/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-lltl-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-r3d-base-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-r3d-iface/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-r3d-wgl-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-common-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-dsp-lib/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/modules/lsp-lltl-lib/include}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.1740830576" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LSP_IDE_DEBUG"/>
Expand Down Expand Up @@ -240,8 +239,77 @@
</tool>
</toolChain>
</folderInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.1188655569" name="main.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/test/main.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.993933867">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.993933867" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992"/>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.1973163312" name="sse3.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse3.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.1778206551">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.1778206551" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992">
<option id="gnu.cpp.compiler.option.other.other.822865306" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse -msse2 -msse3 -mssse3" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1948661925" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1173142162" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.2122033903" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths=""/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.609511051" name="Resource Custom Build Step Output Type"/>
</tool>
</fileInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.1317540636" name="avx.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/avx.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.521380056">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.521380056" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992">
<option id="gnu.cpp.compiler.option.other.other.906791138" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -mavx" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1351744238" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.359315293" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1012684327" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths=""/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.569698827" name="Resource Custom Build Step Output Type"/>
</tool>
</fileInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.826603074" name="sse4.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse4.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.1492076728">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.1492076728" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992">
<option id="gnu.cpp.compiler.option.other.other.104518172" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4a" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1115064533" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1404802796" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.2009309518" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths=""/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.606952725" name="Resource Custom Build Step Output Type"/>
</tool>
</fileInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.511642143" name="sse.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.353846204">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.353846204" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992">
<option id="gnu.cpp.compiler.option.other.other.40707639" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.92804767" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.2106694089" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.581573296" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths=""/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.1555762383" name="Resource Custom Build Step Output Type"/>
</tool>
</fileInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.1571315291" name="sse2.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse2.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.453919574">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.453919574" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992">
<option id="gnu.cpp.compiler.option.other.other.914327845" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse -msse2" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.2051479165" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1745913994" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.752825294" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths=""/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.920429147" name="Resource Custom Build Step Output Type"/>
</tool>
</fileInfo>
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.1006088949.1786573548.1692984727" name="avx2.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/avx2.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.2063164285">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992.2063164285" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.772178992">
<option id="gnu.cpp.compiler.option.other.other.125015310" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -mavx -mavx2" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1403254847" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.705973846" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1984643885" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths=""/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.652793881" name="Resource Custom Build Step Output Type"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-r3d-wgl-lib/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
Expand Down Expand Up @@ -286,4 +354,4 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>
</cproject>
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
* RECENT CHANGES
*******************************************************************************

=== 1.0.14 ===
* Improved code base by using PVS Studio static code analyzer.
* Improved text rendering for Windows platform.
* Significant improvements related to rectangle area clipping for Windows platform.
* Several improvements against grabbing events for Windows.
* Updated module versions in dependencies.

=== 1.0.13 ===
* Updated build scripts.
* Updated module versions in dependencies.
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 13
#define LSP_WS_LIB_MICRO 14

#if defined(LSP_WS_LIB_PUBLISHER)
#define LSP_WS_LIB_PUBLIC LSP_EXPORT_MODIFIER
Expand Down
8 changes: 4 additions & 4 deletions include/private/win/WinDDSurface.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: 5 июл. 2022 г.
Expand Down Expand Up @@ -89,8 +89,8 @@ namespace lsp
void draw_negative_arc(ID2D1Brush *brush, float x0, float y0, float x1, float y1, float x2, float y2);
void draw_polygon(ID2D1Brush *brush, const float *x, const float *y, size_t n, float width);

bool try_out_text(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, const WCHAR *text, size_t length);
bool try_out_text_relative(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, float dx, float dy, const WCHAR *text, size_t length);
bool try_out_text(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, const lsp_wchar_t *text, size_t length);
bool try_out_text_relative(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, float dx, float dy, const lsp_wchar_t *text, size_t length);

public:
virtual IDisplay *display() override;
Expand Down
13 changes: 10 additions & 3 deletions include/private/win/WinDisplay.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: 1 июл. 2022 г.
Expand Down Expand Up @@ -39,6 +39,8 @@
#include <d2d1.h>
#include <dwrite.h>

#include <private/win/fonts.h>

//-----------------------------------------------------------------------------
// Some specific definitions
#ifndef WM_MOUSEHWHEEL
Expand Down Expand Up @@ -102,6 +104,7 @@ namespace lsp
ATOM hClipClass; // Window class for the clipboard
LSPString sDflFontFamily; // Default font family name
MSG sPendingMessage; // Currently pending message
MSG sLastMouseMove; // Last mouse move message
HCURSOR vCursors[__MP_COUNT]; // Cursor handles (cached)
lltl::darray<MonitorInfo> vMonitors; // Monitor information
font_cache_t vFontCache; // Font cache
Expand All @@ -115,6 +118,7 @@ namespace lsp
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
volatile atomic_t nIdlePending; // Number of idle requests pending
LSPString sWindowClassName; // Window class name
LSPString sClipboardClassName; // Clipboard window class name

Expand All @@ -126,12 +130,15 @@ namespace lsp
IDWriteTextLayout *create_text_layout(const Font &f, const WCHAR *fname, IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *string, size_t length);
IDWriteFontFamily *get_font_family(const Font &f, LSPString *name, font_t **custom);
bool get_font_metrics(const Font &f, IDWriteFontFamily *ff, DWRITE_FONT_METRICS *metrics);
IDWriteFont *get_font(const Font &f, IDWriteFontFamily *ff);
IDWriteFontFace *get_font_face(const Font &f, IDWriteFontFamily *ff);
static void drop_font_cache(font_cache_t *cache);
bool create_font_cache();
void drop_font(font_t *f);
static font_t *alloc_font(const char *name);
font_t *get_custom_font_collection(const char *name);
bool try_get_text_parameters(const Font &f, const WCHAR *fname, IDWriteFontCollection *fc, IDWriteFontFamily *ff, text_parameters_t *tp, const WCHAR *text, ssize_t length);
bool try_get_text_parameters(const Font &f, const WCHAR *fname, IDWriteFontCollection *fc, IDWriteFontFamily *ff, text_parameters_t *tp, const UINT32 *text, size_t length);
win::glyph_run_t *make_glyph_run(const Font &f, IDWriteFontFace *face, const DWRITE_FONT_METRICS *fm, const UINT32 *text, size_t length);

status_t install_windows_hooks();
status_t uninstall_windows_hooks();
Expand Down
Loading

0 comments on commit b4732b3

Please sign in to comment.