mirror of
https://github.com/whoahq/whoa.git
synced 2026-08-05 00:14:31 +03:00
chore(gx): fix style nits in Blit functions
Some checks failed
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Has been cancelled
Some checks failed
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Has been cancelled
This commit is contained in:
parent
684e293452
commit
7fcf8a2584
@ -33,8 +33,8 @@ void Blit_uint16_uint16(const C2iVector& size, const void* in, uint32_t inStride
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* in_ = reinterpret_cast<const char*>(in);
|
auto in_ = static_cast<const char*>(in);
|
||||||
char* out_ = reinterpret_cast<char*>(out);
|
auto out_ = static_cast<char*>(out);
|
||||||
|
|
||||||
for (int32_t i = 0; i < size.y; i++) {
|
for (int32_t i = 0; i < size.y; i++) {
|
||||||
memcpy(out_, in_, 2 * size.x);
|
memcpy(out_, in_, 2 * size.x);
|
||||||
@ -49,8 +49,8 @@ void Blit_uint32_uint32(const C2iVector& size, const void* in, uint32_t inStride
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* in_ = reinterpret_cast<const char*>(in);
|
auto in_ = static_cast<const char*>(in);
|
||||||
char* out_ = reinterpret_cast<char*>(out);
|
auto out_ = static_cast<char*>(out);
|
||||||
|
|
||||||
for (int32_t i = 0; i < size.y; i++) {
|
for (int32_t i = 0; i < size.y; i++) {
|
||||||
memcpy(out_, in_, 4 * size.x);
|
memcpy(out_, in_, 4 * size.x);
|
||||||
@ -180,13 +180,10 @@ void Blit_Dxt1_Rgb565(const C2iVector& size, const void* in, uint32_t inStride,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Blit_Dxt1_Dxt1(const C2iVector& size, const void* in, uint32_t inStride, void* out, uint32_t outStride) {
|
void Blit_Dxt1_Dxt1(const C2iVector& size, const void* in, uint32_t inStride, void* out, uint32_t outStride) {
|
||||||
const char* in_ = static_cast<const char*>(in);
|
|
||||||
char* out_ = static_cast<char*>(out);
|
|
||||||
|
|
||||||
int32_t v6 = std::max(size.x, 4);
|
int32_t v6 = std::max(size.x, 4);
|
||||||
int32_t v7 = std::max(size.y, 4);
|
int32_t v7 = std::max(size.y, 4);
|
||||||
|
|
||||||
memcpy(out_, in_, (4 * v6 * v7) >> 3);
|
memcpy(out, in, (4 * v6 * v7) >> 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Blit_Dxt3_Argb8888(const C2iVector& size, const void* in, uint32_t inStride, void* out, uint32_t outStride) {
|
void Blit_Dxt3_Argb8888(const C2iVector& size, const void* in, uint32_t inStride, void* out, uint32_t outStride) {
|
||||||
@ -201,14 +198,14 @@ void Blit_Dxt35_Dxt35(const C2iVector& size, const void* in, uint32_t inStride,
|
|||||||
int32_t v5 = std::max(size.x, 4);
|
int32_t v5 = std::max(size.x, 4);
|
||||||
int32_t v6 = std::max(size.y / 4, 1);
|
int32_t v6 = std::max(size.y / 4, 1);
|
||||||
|
|
||||||
const char* in_ = static_cast<const char*>(in);
|
|
||||||
char* out_ = static_cast<char*>(out);
|
|
||||||
|
|
||||||
if (inStride == v5 * 4 && outStride == v5 * 4) {
|
if (inStride == v5 * 4 && outStride == v5 * 4) {
|
||||||
memcpy(out_, in_, v5 * v6 * 4);
|
memcpy(out, in, v5 * v6 * 4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto in_ = static_cast<const char*>(in);
|
||||||
|
auto out_ = static_cast<char*>(out);
|
||||||
|
|
||||||
for (int32_t i = v6; i > 0; i--) {
|
for (int32_t i = v6; i > 0; i--) {
|
||||||
memcpy(out_, in_, v5 * 4);
|
memcpy(out_, in_, v5 * 4);
|
||||||
in_ += inStride;
|
in_ += inStride;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user