Update from https://crrev.com/303153
This updates from chromium https://crrev.com/303153 aka
f9567f85788355bf3da8df030cbc232421d00b7d with the following additional
changes:
Update skia_build.patch and cc_strip_video.patch with trivial changes.
Update gpu::CommandBuffer state serialization for upstream changes.
Update ui/compositor/layer for upstream cc::SurfaceLayer changes.
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/706203003
diff --git a/third_party/zlib/crc32.c b/third_party/zlib/crc32.c
index 91be372..75f2290 100644
--- a/third_party/zlib/crc32.c
+++ b/third_party/zlib/crc32.c
@@ -26,6 +26,8 @@
# endif /* !DYNAMIC_CRC_TABLE */
#endif /* MAKECRCH */
+#include "deflate.h"
+#include "x86.h"
#include "zutil.h" /* for STDC and FAR definitions */
#define local static
@@ -440,3 +442,28 @@
{
return crc32_combine_(crc1, crc2, len2);
}
+
+ZLIB_INTERNAL void crc_reset(deflate_state *const s)
+{
+ if (x86_cpu_enable_simd) {
+ crc_fold_init(s);
+ return;
+ }
+ s->strm->adler = crc32(0L, Z_NULL, 0);
+}
+
+ZLIB_INTERNAL void crc_finalize(deflate_state *const s)
+{
+ if (x86_cpu_enable_simd)
+ s->strm->adler = crc_fold_512to32(s);
+}
+
+ZLIB_INTERNAL void copy_with_crc(z_streamp strm, Bytef *dst, long size)
+{
+ if (x86_cpu_enable_simd) {
+ crc_fold_copy(strm->state, dst, strm->next_in, size);
+ return;
+ }
+ zmemcpy(dst, strm->next_in, size);
+ strm->adler = crc32(strm->adler, dst, size);
+}