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

Unified Diff: src/images/SkJpegUtility.cpp

Issue 23464068: Use the default resync_to_restart in jpeg. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkJpegUtility.cpp
diff --git a/src/images/SkJpegUtility.cpp b/src/images/SkJpegUtility.cpp
index 1ec9f00d9562e2b5cd4466bea2e0a62c98181906..bb499e83959404f9498bf9788cc5d950953b00a6 100644
--- a/src/images/SkJpegUtility.cpp
+++ b/src/images/SkJpegUtility.cpp
@@ -90,21 +90,6 @@ static void sk_skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
}
}
-static boolean sk_resync_to_restart(j_decompress_ptr cinfo, int desired) {
- skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src;
-
- // what is the desired param for???
-
- if (!src->fStream->rewind()) {
- SkDebugf("xxxxxxxxxxxxxx failure to rewind\n");
- cinfo->err->error_exit((j_common_ptr)cinfo);
- return FALSE;
- }
- src->next_input_byte = (const JOCTET*)src->fBuffer;
- src->bytes_in_buffer = 0;
- return TRUE;
-}
-
static void sk_term_source(j_decompress_ptr /*cinfo*/) {}
@@ -117,7 +102,7 @@ skjpeg_source_mgr::skjpeg_source_mgr(SkStream* stream, SkImageDecoder* decoder)
init_source = sk_init_source;
fill_input_buffer = sk_fill_input_buffer;
skip_input_data = sk_skip_input_data;
- resync_to_restart = sk_resync_to_restart;
+ resync_to_restart = jpeg_resync_to_restart;
term_source = sk_term_source;
#ifdef SK_BUILD_FOR_ANDROID
seek_input_data = sk_seek_input_data;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698