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

Unified Diff: third_party/woff2/src/woff2_dec.cc

Issue 2537133002: Update brotli to v1.0.0-snapshot. (Closed)
Patch Set: Fixed typo Created 4 years 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/woff2/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/woff2/src/woff2_dec.cc
diff --git a/third_party/woff2/src/woff2_dec.cc b/third_party/woff2/src/woff2_dec.cc
index 7a00f8a718425a19c506a6e95cf6b504f39b5188..6f26a305ffdab453e7dfe017f4957edb9d9e427d 100644
--- a/third_party/woff2/src/woff2_dec.cc
+++ b/third_party/woff2/src/woff2_dec.cc
@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <algorithm>
+#include <brotli/decode.h>
#include <complex>
#include <cstring>
#include <limits>
@@ -27,7 +28,6 @@
#include <memory>
#include <utility>
-#include "./decode.h"
#include "./buffer.h"
#include "./port.h"
#include "./round.h"
@@ -736,9 +736,10 @@ bool ReconstructTransformedHmtx(const uint8_t* transformed_buf,
bool Woff2Uncompress(uint8_t* dst_buf, size_t dst_size,
const uint8_t* src_buf, size_t src_size) {
size_t uncompressed_size = dst_size;
- int ok = BrotliDecompressBuffer(src_size, src_buf,
- &uncompressed_size, dst_buf);
- if (PREDICT_FALSE(!ok || uncompressed_size != dst_size)) {
+ BrotliDecoderResult result = BrotliDecoderDecompress(
+ src_size, src_buf, &uncompressed_size, dst_buf);
+ if (PREDICT_FALSE(result != BROTLI_DECODER_RESULT_SUCCESS ||
+ uncompressed_size != dst_size)) {
return FONT_COMPRESSION_FAILURE();
}
return true;
« no previous file with comments | « third_party/woff2/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698