OLD | NEW |
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 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 bool onRewind() override; | 68 bool onRewind() override; |
69 | 69 |
70 private: | 70 private: |
71 | 71 |
72 /* | 72 /* |
73 * Read enough of the stream to initialize the SkJpegCodec. | 73 * Read enough of the stream to initialize the SkJpegCodec. |
74 * Returns a bool representing success or failure. | 74 * Returns a bool representing success or failure. |
75 * | 75 * |
76 * @param codecOut | 76 * @param codecOut |
77 * If this returns true, and codecOut was not NULL, | 77 * If this returns true, and codecOut was not nullptr, |
78 * codecOut will be set to a new SkJpegCodec. | 78 * codecOut will be set to a new SkJpegCodec. |
79 * | 79 * |
80 * @param decoderMgrOut | 80 * @param decoderMgrOut |
81 * If this returns true, and codecOut was NULL, | 81 * If this returns true, and codecOut was nullptr, |
82 * decoderMgrOut must be non-NULL and decoderMgrOut will be set to a new | 82 * decoderMgrOut must be non-nullptr and decoderMgrOut will be set to a new |
83 * JpegDecoderMgr pointer. | 83 * JpegDecoderMgr pointer. |
84 * | 84 * |
85 * @param stream | 85 * @param stream |
86 * Deleted on failure. | 86 * Deleted on failure. |
87 * codecOut will take ownership of it in the case where we created a codec. | 87 * codecOut will take ownership of it in the case where we created a codec. |
88 * Ownership is unchanged when we set decoderMgrOut. | 88 * Ownership is unchanged when we set decoderMgrOut. |
89 * | 89 * |
90 */ | 90 */ |
91 static bool ReadHeader(SkStream* stream, SkCodec** codecOut, | 91 static bool ReadHeader(SkStream* stream, SkCodec** codecOut, |
92 JpegDecoderMgr** decoderMgrOut); | 92 JpegDecoderMgr** decoderMgrOut); |
(...skipping 23 matching lines...) Expand all Loading... |
116 bool nativelyScaleToDimensions(uint32_t width, uint32_t height); | 116 bool nativelyScaleToDimensions(uint32_t width, uint32_t height); |
117 | 117 |
118 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; | 118 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; |
119 | 119 |
120 friend class SkJpegScanlineDecoder; | 120 friend class SkJpegScanlineDecoder; |
121 | 121 |
122 typedef SkCodec INHERITED; | 122 typedef SkCodec INHERITED; |
123 }; | 123 }; |
124 | 124 |
125 #endif | 125 #endif |
OLD | NEW |