Add Chromium-only Blender WebEngine parity work

This commit is contained in:
mes123456
2026-08-12 04:47:48 -04:00
commit 9fd26010f6
18225 changed files with 11622124 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#include "util/defines.h"
#include "util/types_int2.h"
CCL_NAMESPACE_BEGIN
#if !defined(__KERNEL_METAL__)
ccl_device_inline bool operator==(const int2 a, const int2 b)
{
return (a.x == b.x && a.y == b.y);
}
ccl_device_inline int2 operator+(const int2 &a, const int2 &b)
{
return make_int2(a.x + b.x, a.y + b.y);
}
ccl_device_inline int2 operator+=(int2 &a, const int2 &b)
{
return a = a + b;
}
ccl_device_inline int2 operator-(const int2 &a, const int2 &b)
{
return make_int2(a.x - b.x, a.y - b.y);
}
ccl_device_inline int2 operator*(const int2 &a, const int2 &b)
{
return make_int2(a.x * b.x, a.y * b.y);
}
ccl_device_inline int2 operator/(const int2 &a, const int2 &b)
{
return make_int2(a.x / b.x, a.y / b.y);
}
ccl_device_inline int2 operator>>(const int2 a, const int i)
{
return make_int2(a.x >> i, a.y >> i);
}
ccl_device_inline int2 operator&(const int2 a, const int2 b)
{
return make_int2(a.x & b.x, a.y & b.y);
}
ccl_device_inline int2 operator^(const int2 a, const int2 b)
{
return make_int2(a.x ^ b.x, a.y ^ b.y);
}
#endif /* !__KERNEL_METAL__ */
CCL_NAMESPACE_END