diff options
author | 2013-09-25 21:17:41 +0000 | |
---|---|---|
committer | 2013-09-25 21:17:41 +0000 | |
commit | a93489986789bdf109064884bb940ced71110349 (patch) | |
tree | 9dd4839aea73c6a872545ec85427dab13608125b | |
parent | 4382330a15e13b9ef54010606eb758c0c66e1868 (diff) |
Use the default resync_to_restart in jpeg.
Our version requires rewinding the stream, which is not always
supported. Instead, depend on jpeg's default version.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/23464068
git-svn-id: http://skia.googlecode.com/svn/trunk@11458 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/images/SkJpegUtility.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/images/SkJpegUtility.cpp b/src/images/SkJpegUtility.cpp index 1ec9f00d95..bb499e8395 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; |