mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
project: Fix up previous commit
This commit is contained in:
parent
0e350415b3
commit
9be02e6f2b
4 changed files with 17 additions and 24 deletions
|
@ -27,12 +27,12 @@ gfx::source_texture::~source_texture()
|
|||
_child.reset();
|
||||
}
|
||||
|
||||
gfx::source_texture::source_texture(obs_source_t* _parent)
|
||||
gfx::source_texture::source_texture(obs_source_t* parent)
|
||||
{
|
||||
if (!_parent) {
|
||||
if (!parent) {
|
||||
throw std::invalid_argument("_parent must not be null");
|
||||
}
|
||||
_parent = std::make_shared<obs::source>(_parent, false, false);
|
||||
_parent = std::make_shared<obs::source>(parent, false, false);
|
||||
_rt = std::make_shared<gs::rendertarget>(GS_RGBA, GS_ZS_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,65 +24,65 @@
|
|||
|
||||
void* util::vec2a::operator new(size_t count)
|
||||
{
|
||||
return aligned_alloc(count, 16);
|
||||
return util::malloc_aligned(16, count);
|
||||
}
|
||||
|
||||
void* util::vec2a::operator new[](size_t count)
|
||||
{
|
||||
return aligned_alloc(count, 16);
|
||||
return util::malloc_aligned(16, count);
|
||||
}
|
||||
|
||||
void util::vec2a::operator delete(void* p)
|
||||
{
|
||||
aligned_free(p);
|
||||
util::free_aligned(p);
|
||||
}
|
||||
|
||||
void util::vec2a::operator delete[](void* p)
|
||||
{
|
||||
aligned_free(p);
|
||||
util::free_aligned(p);
|
||||
}
|
||||
|
||||
void* util::vec3a::operator new(size_t count)
|
||||
{
|
||||
return aligned_alloc(count, 16);
|
||||
return util::malloc_aligned(16, count);
|
||||
}
|
||||
|
||||
void* util::vec3a::operator new[](size_t count)
|
||||
{
|
||||
return aligned_alloc(count, 16);
|
||||
return util::malloc_aligned(16, count);
|
||||
}
|
||||
|
||||
void util::vec3a::operator delete(void* p)
|
||||
{
|
||||
aligned_free(p);
|
||||
util::free_aligned(p);
|
||||
}
|
||||
|
||||
void util::vec3a::operator delete[](void* p)
|
||||
{
|
||||
aligned_free(p);
|
||||
util::free_aligned(p);
|
||||
}
|
||||
|
||||
void* util::vec4a::operator new(size_t count)
|
||||
{
|
||||
return aligned_alloc(count, 16);
|
||||
return util::malloc_aligned(16, count);
|
||||
}
|
||||
|
||||
void* util::vec4a::operator new[](size_t count)
|
||||
{
|
||||
return aligned_alloc(count, 16);
|
||||
return util::malloc_aligned(16, count);
|
||||
}
|
||||
|
||||
void util::vec4a::operator delete(void* p)
|
||||
{
|
||||
aligned_free(p);
|
||||
util::free_aligned(p);
|
||||
}
|
||||
|
||||
void util::vec4a::operator delete[](void* p)
|
||||
{
|
||||
aligned_free(p);
|
||||
util::free_aligned(p);
|
||||
}
|
||||
|
||||
std::pair<int64_t, int64_t> util::SizeFromString(std::string text, bool allowSquare)
|
||||
std::pair<int64_t, int64_t> util::size_from_string(std::string text, bool allowSquare)
|
||||
{
|
||||
int64_t width, height;
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace util {
|
|||
static void operator delete[](void* p);
|
||||
};
|
||||
|
||||
std::pair<int64_t, int64_t> SizeFromString(std::string text, bool allowSquare = true);
|
||||
std::pair<int64_t, int64_t> size_from_string(std::string text, bool allowSquare = true);
|
||||
|
||||
namespace math {
|
||||
// Proven by tests to be the fastest implementation on Intel and AMD CPUs.
|
||||
|
|
|
@ -20,13 +20,6 @@
|
|||
#pragma once
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define aligned_alloc(a, s) _aligned_malloc(s, a)
|
||||
#define aligned_free _aligned_free
|
||||
#else
|
||||
#define aligned_free free
|
||||
#endif
|
||||
|
||||
namespace util {
|
||||
inline size_t aligned_offset(size_t align, size_t pos)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue