mirror of
https://github.com/whoahq/whoa.git
synced 2026-08-05 00:14:31 +03:00
Compare commits
3 Commits
adb79d1742
...
0f8ab1d3af
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f8ab1d3af | ||
|
|
ea13456360 | ||
|
|
7fcf8a2584 |
10
.github/workflows/pr.yml
vendored
10
.github/workflows/pr.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: PR
|
||||
|
||||
on: [pull_request_target]
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -45,14 +45,10 @@ jobs:
|
||||
if: matrix.build.os == 'ubuntu-latest'
|
||||
|
||||
- name: Download Fixtures
|
||||
run: aws s3 cp --endpoint-url ${{ env.AWS_ENDPOINT_URL }} s3://reliquaryhq-whoa/fixture.tgz test/fixture/
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.STORAGE_AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.STORAGE_AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_ENDPOINT_URL: ${{ vars.STORAGE_AWS_ENDPOINT_URL }}
|
||||
run: curl -o test/fixture/whoa-fixture.tgz https://whoa.reliquaryhq.com/whoa-fixture.tgz
|
||||
|
||||
- name: Unpack Fixtures
|
||||
run: tar -xvzf fixture.tgz
|
||||
run: tar -xvzf whoa-fixture.tgz
|
||||
working-directory: test/fixture
|
||||
|
||||
- name: Prepare
|
||||
|
||||
8
.github/workflows/push.yml
vendored
8
.github/workflows/push.yml
vendored
@ -44,14 +44,10 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Download Fixtures
|
||||
run: aws s3 cp --endpoint-url ${{ env.AWS_ENDPOINT_URL }} s3://reliquaryhq-whoa/fixture.tgz test/fixture/
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.STORAGE_AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.STORAGE_AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_ENDPOINT_URL: ${{ vars.STORAGE_AWS_ENDPOINT_URL }}
|
||||
run: curl -o test/fixture/whoa-fixture.tgz https://whoa.reliquaryhq.com/whoa-fixture.tgz
|
||||
|
||||
- name: Unpack Fixtures
|
||||
run: tar -xvzf fixture.tgz
|
||||
run: tar -xvzf whoa-fixture.tgz
|
||||
working-directory: test/fixture
|
||||
|
||||
- name: Prepare
|
||||
|
||||
@ -33,8 +33,8 @@ void Blit_uint16_uint16(const C2iVector& size, const void* in, uint32_t inStride
|
||||
return;
|
||||
}
|
||||
|
||||
const char* in_ = reinterpret_cast<const char*>(in);
|
||||
char* out_ = reinterpret_cast<char*>(out);
|
||||
auto in_ = static_cast<const char*>(in);
|
||||
auto out_ = static_cast<char*>(out);
|
||||
|
||||
for (int32_t i = 0; i < size.y; i++) {
|
||||
memcpy(out_, in_, 2 * size.x);
|
||||
@ -49,8 +49,8 @@ void Blit_uint32_uint32(const C2iVector& size, const void* in, uint32_t inStride
|
||||
return;
|
||||
}
|
||||
|
||||
const char* in_ = reinterpret_cast<const char*>(in);
|
||||
char* out_ = reinterpret_cast<char*>(out);
|
||||
auto in_ = static_cast<const char*>(in);
|
||||
auto out_ = static_cast<char*>(out);
|
||||
|
||||
for (int32_t i = 0; i < size.y; i++) {
|
||||
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) {
|
||||
const char* in_ = static_cast<const char*>(in);
|
||||
char* out_ = static_cast<char*>(out);
|
||||
|
||||
int32_t v6 = std::max(size.x, 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) {
|
||||
@ -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 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) {
|
||||
memcpy(out_, in_, v5 * v6 * 4);
|
||||
memcpy(out, in, v5 * v6 * 4);
|
||||
return;
|
||||
}
|
||||
|
||||
auto in_ = static_cast<const char*>(in);
|
||||
auto out_ = static_cast<char*>(out);
|
||||
|
||||
for (int32_t i = v6; i > 0; i--) {
|
||||
memcpy(out_, in_, v5 * 4);
|
||||
in_ += inStride;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user