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

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

Issue 1332053002: Fill incomplete images in SkCodec parent class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use aligned memory in swizzler test Created 5 years, 2 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/SkCodec_wbmp.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
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 /* 44 /*
45 * Recommend a set of destination dimensions given a requested scale 45 * Recommend a set of destination dimensions given a requested scale
46 */ 46 */
47 SkISize onGetScaledDimensions(float desiredScale) const override; 47 SkISize onGetScaledDimensions(float desiredScale) const override;
48 48
49 /* 49 /*
50 * Initiates the jpeg decode 50 * Initiates the jpeg decode
51 */ 51 */
52 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&, 52 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&,
53 SkPMColor*, int*) override; 53 SkPMColor*, int*, int*) override;
54 54
55 SkEncodedFormat onGetEncodedFormat() const override { 55 SkEncodedFormat onGetEncodedFormat() const override {
56 return kJPEG_SkEncodedFormat; 56 return kJPEG_SkEncodedFormat;
57 } 57 }
58 58
59 bool onRewind() override; 59 bool onRewind() override;
60 60
61 bool onDimensionsSupported(const SkISize&) override; 61 bool onDimensionsSupported(const SkISize&) override;
62 62
63 private: 63 private:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr); 96 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de coderMgr);
97 97
98 /* 98 /*
99 * Checks if the conversion between the input image and the requested output 99 * Checks if the conversion between the input image and the requested output
100 * image has been implemented 100 * image has been implemented
101 * Sets the output color space 101 * Sets the output color space
102 */ 102 */
103 bool setOutputColorSpace(const SkImageInfo& dst); 103 bool setOutputColorSpace(const SkImageInfo& dst);
104 104
105 // scanline decoding 105 // scanline decoding
106 SkSampler* getSampler() override; 106 SkSampler* getSampler(bool createIfNecessary) override;
107 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons, 107 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons,
108 SkPMColor ctable[], int* ctableCount) override; 108 SkPMColor ctable[], int* ctableCount) override;
109 Result onGetScanlines(void* dst, int count, size_t rowBytes) override; 109 int onGetScanlines(void* dst, int count, size_t rowBytes) override;
110 Result onSkipScanlines(int count) override; 110 bool onSkipScanlines(int count) override;
111 111
112 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 112 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
113 // We will save the state of the decompress struct after reading the header. 113 // We will save the state of the decompress struct after reading the header.
114 // This allows us to safely call onGetScaledDimensions() at any time. 114 // This allows us to safely call onGetScaledDimensions() at any time.
115 const int fReadyState; 115 const int fReadyState;
116 116
117 // scanline decoding 117 // scanline decoding
118 SkAutoMalloc fStorage; // Only used if sampling is needed 118 SkAutoMalloc fStorage; // Only used if sampling is needed
119 uint8_t* fSrcRow; // Only used if sampling is needed 119 uint8_t* fSrcRow; // Only used if sampling is needed
120 SkAutoTDelete<SkSwizzler> fSwizzler; 120 SkAutoTDelete<SkSwizzler> fSwizzler;
121 121
122 typedef SkCodec INHERITED; 122 typedef SkCodec INHERITED;
123 }; 123 };
124 124
125 #endif 125 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodec_wbmp.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698