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

Side by Side Diff: src/codec/SkJpegUtility_codec.h

Issue 1836493002: Rename encoders to Sk*ImageEncoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/codec/SkJpegUtility.cpp ('k') | src/codec/SkJpegUtility_codec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8
9 #ifndef SkJpegUtility_codec_DEFINED
10 #define SkJpegUtility_codec_DEFINED
11
12 #include "SkStream.h"
13
14 #include <setjmp.h>
15 // stdio is needed for jpeglib
16 #include <stdio.h>
17
18 extern "C" {
19 #include "jpeglib.h"
20 #include "jerror.h"
21 }
22
23 /*
24 * Error handling struct
25 */
26 struct skjpeg_error_mgr : jpeg_error_mgr {
27 jmp_buf fJmpBuf;
28 };
29
30 /*
31 * Error handling function
32 */
33 void skjpeg_err_exit(j_common_ptr cinfo);
34
35 /*
36 * Source handling struct for that allows libjpeg to use our stream object
37 */
38 struct skjpeg_source_mgr : jpeg_source_mgr {
39 skjpeg_source_mgr(SkStream* stream);
40
41 SkStream* fStream; // unowned
42 enum {
43 // TODO (msarett): Experiment with different buffer sizes.
44 // This size was chosen because it matches SkImageDecoder.
45 kBufferSize = 1024
46 };
47 uint8_t fBuffer[kBufferSize];
48 };
49
50 #endif
OLDNEW
« no previous file with comments | « src/codec/SkJpegUtility.cpp ('k') | src/codec/SkJpegUtility_codec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698