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

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

Issue 1549473003: Add getYUV8Planes() API to SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 12 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
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 30 matching lines...) Expand all
41 * Recommend a set of destination dimensions given a requested scale 41 * Recommend a set of destination dimensions given a requested scale
42 */ 42 */
43 SkISize onGetScaledDimensions(float desiredScale) const override; 43 SkISize onGetScaledDimensions(float desiredScale) const override;
44 44
45 /* 45 /*
46 * Initiates the jpeg decode 46 * Initiates the jpeg decode
47 */ 47 */
48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&, 48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&,
49 SkPMColor*, int*, int*) override; 49 SkPMColor*, int*, int*) override;
50 50
51 bool onGetYUV8Sizes(SkISize sizes[3]) const override;
52
53 Result onGetYUV8Planes(SkISize sizes[3], void* pixels[3], size_t rowBytes[3] ,
54 SkYUVColorSpace* colorSpace) override;
55
51 SkEncodedFormat onGetEncodedFormat() const override { 56 SkEncodedFormat onGetEncodedFormat() const override {
52 return kJPEG_SkEncodedFormat; 57 return kJPEG_SkEncodedFormat;
53 } 58 }
54 59
55 bool onRewind() override; 60 bool onRewind() override;
56 61
57 bool onDimensionsSupported(const SkISize&) override; 62 bool onDimensionsSupported(const SkISize&) override;
58 63
59 private: 64 private:
60 65
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 118
114 // scanline decoding 119 // scanline decoding
115 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed 120 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed
116 uint8_t* fSrcRow; // Only used if sampling is needed 121 uint8_t* fSrcRow; // Only used if sampling is needed
117 SkAutoTDelete<SkSwizzler> fSwizzler; 122 SkAutoTDelete<SkSwizzler> fSwizzler;
118 123
119 typedef SkCodec INHERITED; 124 typedef SkCodec INHERITED;
120 }; 125 };
121 126
122 #endif 127 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698