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

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

Issue 1716523002: Update Skia's YUV API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Tweak the API to use arrays and named indices Created 4 years, 10 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 27 matching lines...) Expand all
38 * Recommend a set of destination dimensions given a requested scale 38 * Recommend a set of destination dimensions given a requested scale
39 */ 39 */
40 SkISize onGetScaledDimensions(float desiredScale) const override; 40 SkISize onGetScaledDimensions(float desiredScale) const override;
41 41
42 /* 42 /*
43 * Initiates the jpeg decode 43 * Initiates the jpeg decode
44 */ 44 */
45 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&, 45 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&,
46 SkPMColor*, int*, int*) override; 46 SkPMColor*, int*, int*) override;
47 47
48 bool onQueryYUV8(YUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const o verride; 48 bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const override;
49 49
50 Result onGetYUV8Planes(const YUVSizeInfo& sizeInfo, void* pixels[3]) overrid e; 50 Result onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo,
51 void* pixels[SkYUVSizeInfo::kPlaneCount]) override;
51 52
52 SkEncodedFormat onGetEncodedFormat() const override { 53 SkEncodedFormat onGetEncodedFormat() const override {
53 return kJPEG_SkEncodedFormat; 54 return kJPEG_SkEncodedFormat;
54 } 55 }
55 56
56 bool onRewind() override; 57 bool onRewind() override;
57 58
58 bool onDimensionsSupported(const SkISize&) override; 59 bool onDimensionsSupported(const SkISize&) override;
59 60
60 private: 61 private:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 // scanline decoding 116 // scanline decoding
116 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed 117 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed
117 uint8_t* fSrcRow; // Only used if sampling is needed 118 uint8_t* fSrcRow; // Only used if sampling is needed
118 SkAutoTDelete<SkSwizzler> fSwizzler; 119 SkAutoTDelete<SkSwizzler> fSwizzler;
119 120
120 typedef SkCodec INHERITED; 121 typedef SkCodec INHERITED;
121 }; 122 };
122 123
123 #endif 124 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698