mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-28 23:03:20 +02:00
apply clang-format
(Debian clang-format version 19.1.7 (3+build4)) with `--style=Google`. Manual changes: * clang-format disabled around macros with stringification (mostly assembly) * some inline assembly strings were adjusted to avoid awkward line breaks * trailing commas, `//` or suffixes (`ull`) added to help array formatting * thread_utils.c: parameter comments were changed to the more common /*...=*/ style to improve formatting The automatically generated code under swig/ was skipped. Bug: 433996651 Change-Id: Iea3f24160d78d2a2653971cdf13fa932e47ff1b3
This commit is contained in:
@@ -17,11 +17,10 @@
|
||||
|
||||
#if defined(WEBP_HAVE_SDL)
|
||||
|
||||
#include "webp_to_sdl.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "src/webp/decode.h"
|
||||
#include "webp_to_sdl.h"
|
||||
|
||||
#if defined(WEBP_HAVE_JUST_SDL_H)
|
||||
#include <SDL.h>
|
||||
@@ -67,11 +66,11 @@ int WebPToSDL(const char* data, unsigned int data_size) {
|
||||
}
|
||||
|
||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
output = WebPDecodeBGRA((const uint8_t*)data, (size_t)data_size, &width,
|
||||
&height);
|
||||
output =
|
||||
WebPDecodeBGRA((const uint8_t*)data, (size_t)data_size, &width, &height);
|
||||
#else
|
||||
output = WebPDecodeRGBA((const uint8_t*)data, (size_t)data_size, &width,
|
||||
&height);
|
||||
output =
|
||||
WebPDecodeRGBA((const uint8_t*)data, (size_t)data_size, &width, &height);
|
||||
#endif
|
||||
if (output == NULL) {
|
||||
fprintf(stderr, "Error decoding image (%d)\n", status);
|
||||
@@ -84,7 +83,7 @@ int WebPToSDL(const char* data, unsigned int data_size) {
|
||||
SDL_RenderPresent(renderer);
|
||||
ok = 1;
|
||||
|
||||
Error:
|
||||
Error:
|
||||
// We should call SDL_DestroyWindow(window) but that makes .js fail.
|
||||
SDL_DestroyRenderer(renderer);
|
||||
SDL_DestroyTexture(texture);
|
||||
|
Reference in New Issue
Block a user