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

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

Issue 1516833003: Switch SkAutoMalloc to SkAutoTMalloc to avoid cast (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Go back to patch set 3 Created 5 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 unified diff | Download patch
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 #ifndef SkJpegCodec_DEFINED 8 #ifndef SkJpegCodec_DEFINED
9 #define SkJpegCodec_DEFINED 9 #define SkJpegCodec_DEFINED
10 10
11 #include "SkCodec.h" 11 #include "SkCodec.h"
12 #include "SkImageInfo.h" 12 #include "SkImageInfo.h"
13 #include "SkJpegDecoderMgr.h" 13 #include "SkJpegDecoderMgr.h"
14 #include "SkJpegUtility_codec.h" 14 #include "SkJpegUtility_codec.h"
15 #include "SkStream.h" 15 #include "SkStream.h"
16 #include "SkTemplates.h"
16 17
17 extern "C" { 18 extern "C" {
18 #include "jpeglib.h" 19 #include "jpeglib.h"
19 } 20 }
20 21
21 /* 22 /*
22 * 23 *
23 * This class implements the decoding for jpeg images 24 * This class implements the decoding for jpeg images
24 * 25 *
25 */ 26 */
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 SkPMColor ctable[], int* ctableCount) override; 105 SkPMColor ctable[], int* ctableCount) override;
105 int onGetScanlines(void* dst, int count, size_t rowBytes) override; 106 int onGetScanlines(void* dst, int count, size_t rowBytes) override;
106 bool onSkipScanlines(int count) override; 107 bool onSkipScanlines(int count) override;
107 108
108 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 109 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
109 // We will save the state of the decompress struct after reading the header. 110 // We will save the state of the decompress struct after reading the header.
110 // This allows us to safely call onGetScaledDimensions() at any time. 111 // This allows us to safely call onGetScaledDimensions() at any time.
111 const int fReadyState; 112 const int fReadyState;
112 113
113 // scanline decoding 114 // scanline decoding
114 SkAutoMalloc fStorage; // Only used if sampling is needed 115 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed
115 uint8_t* fSrcRow; // Only used if sampling is needed 116 uint8_t* fSrcRow; // Only used if sampling is needed
116 SkAutoTDelete<SkSwizzler> fSwizzler; 117 SkAutoTDelete<SkSwizzler> fSwizzler;
117 118
118 typedef SkCodec INHERITED; 119 typedef SkCodec INHERITED;
119 }; 120 };
120 121
121 #endif 122 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698