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

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, 11 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/SkCodecImageGenerator.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 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 onQueryYUV8(YUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const o verride;
52
53 Result onGetYUV8Planes(const YUVSizeInfo& sizeInfo, void* pixels[3]) overrid e;
54
51 SkEncodedFormat onGetEncodedFormat() const override { 55 SkEncodedFormat onGetEncodedFormat() const override {
52 return kJPEG_SkEncodedFormat; 56 return kJPEG_SkEncodedFormat;
53 } 57 }
54 58
55 bool onRewind() override; 59 bool onRewind() override;
56 60
57 bool onDimensionsSupported(const SkISize&) override; 61 bool onDimensionsSupported(const SkISize&) override;
58 62
59 private: 63 private:
60 64
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 117
114 // scanline decoding 118 // scanline decoding
115 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed 119 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed
116 uint8_t* fSrcRow; // Only used if sampling is needed 120 uint8_t* fSrcRow; // Only used if sampling is needed
117 SkAutoTDelete<SkSwizzler> fSwizzler; 121 SkAutoTDelete<SkSwizzler> fSwizzler;
118 122
119 typedef SkCodec INHERITED; 123 typedef SkCodec INHERITED;
120 }; 124 };
121 125
122 #endif 126 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodecImageGenerator.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698