OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "SkJpegUtility.h" | 9 #include "SkJPEGWriteUtility.h" |
10 | 10 |
11 /////////////////////////////////////////////////////////////////////////////// | 11 /////////////////////////////////////////////////////////////////////////////// |
12 | 12 |
13 static void sk_init_destination(j_compress_ptr cinfo) { | 13 static void sk_init_destination(j_compress_ptr cinfo) { |
14 skjpeg_destination_mgr* dest = (skjpeg_destination_mgr*)cinfo->dest; | 14 skjpeg_destination_mgr* dest = (skjpeg_destination_mgr*)cinfo->dest; |
15 | 15 |
16 dest->next_output_byte = dest->fBuffer; | 16 dest->next_output_byte = dest->fBuffer; |
17 dest->free_in_buffer = skjpeg_destination_mgr::kBufferSize; | 17 dest->free_in_buffer = skjpeg_destination_mgr::kBufferSize; |
18 } | 18 } |
19 | 19 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void skjpeg_error_exit(j_common_ptr cinfo) { | 55 void skjpeg_error_exit(j_common_ptr cinfo) { |
56 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; | 56 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; |
57 | 57 |
58 (*error->output_message) (cinfo); | 58 (*error->output_message) (cinfo); |
59 | 59 |
60 /* Let the memory manager delete any temp files before we die */ | 60 /* Let the memory manager delete any temp files before we die */ |
61 jpeg_destroy(cinfo); | 61 jpeg_destroy(cinfo); |
62 | 62 |
63 longjmp(error->fJmpBuf, -1); | 63 longjmp(error->fJmpBuf, -1); |
64 } | 64 } |
OLD | NEW |