Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(928)

Unified Diff: third_party/libwebp/utils/thread.h

Issue 116213006: Update libwebp to 0.4.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: After Blink Roll Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/utils/rescaler.c ('k') | third_party/libwebp/utils/thread.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/libwebp/utils/rescaler.c ('k') | third_party/libwebp/utils/thread.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698