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

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

Issue 1459473007: Updates the gyp file. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkRawCodec_DEFINED
9 #define SkRawCodec_DEFINED
10
11 #include "SkCodec.h"
12 #include "SkImageInfo.h"
13 #include "SkStream.h"
14
15 #include "dng_host.h"
16
17 /*
18 *
19 * This class implements the decoding for jpeg images
20 *
21 */
22 class SkRawCodec : public SkCodec {
23 public:
24
25 /*
26 * Checks the start of the stream to see if the image is a RAW
27 * Does not take ownership of the stream
28 */
29 static bool IsRaw(SkStream*);
30
31 /*
32 * Assumes IsRaw was called and returned true
33 * Creates a RAW decoder
34 * Takes ownership of the stream
35 */
36 static SkCodec* NewFromStream(SkStream*);
37
38 protected:
39
40 /*
41 * Recommend a set of destination dimensions given a requested scale
42 */
43 //SkISize onGetScaledDimensions(float desiredScale) const override;
scroggo 2015/11/19 22:16:55 This is only necessary if you support scales other
ebrauer 2015/11/20 11:43:44 Done.
44
45 /*
46 * Initiates the RAW decode
47 */
48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&,
49 SkPMColor*, int*, int*) override;
50
51 SkEncodedFormat onGetEncodedFormat() const override {
52 return kRAW_SkEncodedFormat;
53 }
54
55 /*bool onRewind() override;
56
57 bool onDimensionsSupported(const SkISize&) override;*/
scroggo 2015/11/19 22:16:55 Again, only necessary if you support scales other
ebrauer 2015/11/20 11:43:44 Done.
58
59 private:
60
61 /*
62 * Creates an instance of the decoder
63 * Called only by NewFromStream
64 *
65 * @param srcInfo contains the source width and height
66 * @param stream the encoded image data
67 */
68 SkRawCodec(const SkImageInfo& srcInfo, SkStream* stream);
69
70 // scanline decoding
71 /*void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options );
72 SkSampler* getSampler(bool createIfNecessary) override;
73 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons,
74 SkPMColor ctable[], int* ctableCount) override;
75 int onGetScanlines(void* dst, int count, size_t rowBytes) override;
76 bool onSkipScanlines(int count) override;*/
77
78 typedef SkCodec INHERITED;
79 };
80
81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698