mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
loaders: explicit variable scope to improve portability
issue: https://github.com/godotengine/godot/pull/105093
This commit is contained in:
parent
126265feb9
commit
55c0849746
3 changed files with 3 additions and 3 deletions
|
@ -132,7 +132,7 @@ bool JpgLoader::read()
|
||||||
|
|
||||||
//determine the image format
|
//determine the image format
|
||||||
TJPF format;
|
TJPF format;
|
||||||
if (cs == ColorSpace::ARGB8888 || cs == ColorSpace::ARGB8888S) {
|
if (ImageLoader::cs == ColorSpace::ARGB8888 || ImageLoader::cs == ColorSpace::ARGB8888S) {
|
||||||
format = TJPF_BGRX;
|
format = TJPF_BGRX;
|
||||||
surface.cs = ColorSpace::ARGB8888;
|
surface.cs = ColorSpace::ARGB8888;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -88,7 +88,7 @@ bool PngLoader::read()
|
||||||
|
|
||||||
if (w == 0 || h == 0) return false;
|
if (w == 0 || h == 0) return false;
|
||||||
|
|
||||||
if (cs == ColorSpace::ARGB8888 || cs == ColorSpace::ARGB8888S) {
|
if (ImageLoader::cs == ColorSpace::ARGB8888 || ImageLoader::cs == ColorSpace::ARGB8888S) {
|
||||||
image->format = PNG_FORMAT_BGRA;
|
image->format = PNG_FORMAT_BGRA;
|
||||||
surface.cs = ColorSpace::ARGB8888S;
|
surface.cs = ColorSpace::ARGB8888S;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -138,7 +138,7 @@ bool WebpLoader::read()
|
||||||
|
|
||||||
if (!data || w == 0 || h == 0) return false;
|
if (!data || w == 0 || h == 0) return false;
|
||||||
|
|
||||||
surface.cs = this->cs;
|
surface.cs = ImageLoader::cs;
|
||||||
|
|
||||||
TaskScheduler::request(this);
|
TaskScheduler::request(this);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue