| Index: third_party/libwebp/utils/thread.h
|
| diff --git a/third_party/libwebp/utils/thread.h b/third_party/libwebp/utils/thread.h
|
| index 13a61a4c84194c3374080cbf03d881d3cd6af40d..aef33bdaf21f18fe896485e4818b1e851bb10b52 100644
|
| --- a/third_party/libwebp/utils/thread.h
|
| +++ b/third_party/libwebp/utils/thread.h
|
| @@ -18,11 +18,11 @@
|
| #include "config.h"
|
| #endif
|
|
|
| -#if defined(__cplusplus) || defined(c_plusplus)
|
| +#ifdef __cplusplus
|
| extern "C" {
|
| #endif
|
|
|
| -#if WEBP_USE_THREAD
|
| +#ifdef WEBP_USE_THREAD
|
|
|
| #if defined(_WIN32)
|
|
|
| @@ -55,7 +55,7 @@ typedef int (*WebPWorkerHook)(void*, void*);
|
|
|
| // Synchronize object used to launch job in the worker thread
|
| typedef struct {
|
| -#if WEBP_USE_THREAD
|
| +#ifdef WEBP_USE_THREAD
|
| pthread_mutex_t mutex_;
|
| pthread_cond_t condition_;
|
| pthread_t thread_;
|
| @@ -79,13 +79,18 @@ int WebPWorkerSync(WebPWorker* const worker);
|
| // hook/data1/data2 can be changed at any time before calling this function,
|
| // but not be changed afterward until the next call to WebPWorkerSync().
|
| void WebPWorkerLaunch(WebPWorker* const worker);
|
| +// This function is similar to WebPWorkerLaunch() except that it calls the
|
| +// hook directly instead of using a thread. Convenient to bypass the thread
|
| +// mechanism while still using the WebPWorker structs. WebPWorkerSync() must
|
| +// still be called afterward (for error reporting).
|
| +void WebPWorkerExecute(WebPWorker* const worker);
|
| // Kill the thread and terminate the object. To use the object again, one
|
| // must call WebPWorkerReset() again.
|
| void WebPWorkerEnd(WebPWorker* const worker);
|
|
|
| //------------------------------------------------------------------------------
|
|
|
| -#if defined(__cplusplus) || defined(c_plusplus)
|
| +#ifdef __cplusplus
|
| } // extern "C"
|
| #endif
|
|
|
|
|