Compare commits
4 Commits
8f1e872f1c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
478f2f112f | ||
|
|
9e9a270550 | ||
|
|
f9667430b9 | ||
|
|
9d7800bb4f |
12
.github/workflows/cd.yml
vendored
12
.github/workflows/cd.yml
vendored
@@ -204,8 +204,18 @@ jobs:
|
|||||||
#- uses: ilammy/setup-nasm@v1
|
#- uses: ilammy/setup-nasm@v1
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
|
env:
|
||||||
|
CXXFLAGS: "/D_MSVC_STL_HARDENING=1"
|
||||||
# TODO: og asan had this -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
|
# TODO: og asan had this -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
|
||||||
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON -DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DTOMATO_BREAKPAD=ON -DTOMATO_TOX_AV=ON -DTOMATO_ASAN=${{matrix.type == 'asan' && 'ON' || 'OFF'}}
|
run: cmake -G Ninja
|
||||||
|
-B ${{github.workspace}}/build
|
||||||
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||||
|
-DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON
|
||||||
|
-DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF
|
||||||
|
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
|
||||||
|
-DTOMATO_BREAKPAD=ON -DTOMATO_TOX_AV=ON
|
||||||
|
-DTOMATO_ASAN=${{matrix.type == 'asan' && 'ON' || 'OFF'}}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t tomato
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t tomato
|
||||||
|
|||||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -179,7 +179,15 @@ jobs:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON -DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
|
env:
|
||||||
|
CXXFLAGS: "/D_MSVC_STL_HARDENING=1"
|
||||||
|
run: cmake -G Ninja
|
||||||
|
-B ${{github.workspace}}/build
|
||||||
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||||
|
-DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON
|
||||||
|
-DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF
|
||||||
|
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||||
|
|||||||
8
flake.lock
generated
8
flake.lock
generated
@@ -21,17 +21,17 @@
|
|||||||
"imgui": {
|
"imgui": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752080038,
|
"lastModified": 1758128722,
|
||||||
"narHash": "sha256-m5h/H8k/CZ5Qwr3L9+Elt8XT/Tgwr3s4HuhVtI4wkwE=",
|
"narHash": "sha256-J+h7jJ+4wqr6RivtzyTDMXKxFoGs7dQbzqdu51XgEbc=",
|
||||||
"owner": "ocornut",
|
"owner": "ocornut",
|
||||||
"repo": "imgui",
|
"repo": "imgui",
|
||||||
"rev": "5d4126876bc10396d4c6511853ff10964414c776",
|
"rev": "bf75bfec48fc00f532af8926130b70c0e26eb099",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "ocornut",
|
"owner": "ocornut",
|
||||||
"repo": "imgui",
|
"repo": "imgui",
|
||||||
"rev": "5d4126876bc10396d4c6511853ff10964414c776",
|
"rev": "bf75bfec48fc00f532af8926130b70c0e26eb099",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
imgui = {
|
imgui = {
|
||||||
url = "github:ocornut/imgui/5d4126876bc10396d4c6511853ff10964414c776";
|
url = "github:ocornut/imgui/bf75bfec48fc00f532af8926130b70c0e26eb099";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
plutosvg = {
|
plutosvg = {
|
||||||
|
|||||||
@@ -70,7 +70,10 @@ ImageLoaderWebP::ImageResult ImageLoaderWebP::loadFromMemoryRGBA(const uint8_t*
|
|||||||
while (WebPAnimDecoderHasMoreFrames(dec.get())) {
|
while (WebPAnimDecoderHasMoreFrames(dec.get())) {
|
||||||
uint8_t* buf;
|
uint8_t* buf;
|
||||||
int timestamp;
|
int timestamp;
|
||||||
WebPAnimDecoderGetNext(dec.get(), &buf, ×tamp);
|
if (WebPAnimDecoderGetNext(dec.get(), &buf, ×tamp) == 0 || buf == nullptr) {
|
||||||
|
// error out with empty res
|
||||||
|
return {};
|
||||||
|
}
|
||||||
// ... (Render 'buf' based on 'timestamp').
|
// ... (Render 'buf' based on 'timestamp').
|
||||||
// ... (Do NOT free 'buf', as it is owned by 'dec').
|
// ... (Do NOT free 'buf', as it is owned by 'dec').
|
||||||
|
|
||||||
|
|||||||
@@ -103,10 +103,17 @@ TextureLoaderResult MessageImageLoader::load(TextureUploaderI& tu, Message3Handl
|
|||||||
new_entry.current_texture = 0;
|
new_entry.current_texture = 0;
|
||||||
for (const auto& [ms, data] : res.frames) {
|
for (const auto& [ms, data] : res.frames) {
|
||||||
const auto n_t = tu.upload(data.data(), res.width, res.height);
|
const auto n_t = tu.upload(data.data(), res.width, res.height);
|
||||||
|
if (n_t == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
new_entry.textures.push_back(n_t);
|
new_entry.textures.push_back(n_t);
|
||||||
new_entry.frame_duration.push_back(ms);
|
new_entry.frame_duration.push_back(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (new_entry.textures.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
new_entry.width = res.width;
|
new_entry.width = res.width;
|
||||||
new_entry.height = res.height;
|
new_entry.height = res.height;
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,9 @@ struct TextureCache {
|
|||||||
_tu.destroy(tex_id);
|
_tu.destroy(tex_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (const auto& tex_id : _default_texture.textures) {
|
||||||
|
_tu.destroy(tex_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GetInfo {
|
struct GetInfo {
|
||||||
|
|||||||
Reference in New Issue
Block a user