Updated the libwebp with version 0.4.0-rc1
Updated the libwebp with the release 0.4.0-rc1 (change#I22be12d8).
Build & Ran following tests for Nexus N7 (Razor)
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/BitmapTest.java
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/BitmapFactoryTest.java
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/BitmapRegionDecoderTest.java
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/Bitmap_CompressFormatTest.java
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/Bitmap_ConfigTest.java
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/BitmapFactory_OptionsTest.java
runtest --path cts/tests/tests/graphics/src/android/graphics/cts/BitmapShaderTest.java
Also did the full Android build for following targets:
- flo
- grouper
- mako
- x86
Before this change is submitted, need to submit the change for cts/tests to update the threshold for WebP encoding for color-mode RGB565.
(Refer: https://googleplex-android-review.git.corp.google.com/#/c/403360/)
Change-Id: Ib2db2ebf0395276d45c3e8dc70d7b451e3678e6f
diff --git a/src/utils/thread.h b/src/utils/thread.h
index 13a61a4..aef33bd 100644
--- a/src/utils/thread.h
+++ b/src/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 @@
// 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 @@
// 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