OLD | NEW |
---|---|
(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" | |
scroggo
2016/01/06 22:30:21
I think you can forward declare this instead.
yujieqin
2016/01/07 09:22:26
Done.
| |
14 #include "SkStreamPriv.h" | |
scroggo
2016/01/06 22:30:20
Nit: I don't think you need to include this here.
yujieqin
2016/01/07 09:22:26
Done.
| |
15 #include "SkTypes.h" | |
16 | |
17 /* | |
18 * | |
19 * This class implements the decoding for RAW images | |
20 * | |
21 */ | |
22 class SkRawCodec : public SkCodec { | |
23 public: | |
24 | |
25 /* | |
26 * Assumes IsRaw was called and returned true | |
scroggo
2016/01/06 22:30:21
IsRaw no longer exists
yujieqin
2016/01/07 09:22:26
Done.
| |
27 * Creates a RAW decoder | |
28 * Takes ownership of the stream | |
29 */ | |
30 static SkCodec* NewFromStream(SkStream*); | |
31 | |
32 ~SkRawCodec() override; | |
33 | |
34 protected: | |
35 | |
36 /* | |
37 * Initiates the RAW decode | |
38 */ | |
39 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&, | |
40 SkPMColor*, int*, int*) override; | |
41 | |
42 SkEncodedFormat onGetEncodedFormat() const override { | |
43 return kRAW_SkEncodedFormat; | |
44 } | |
45 | |
46 private: | |
47 | |
48 /* | |
49 * Creates an instance of the decoder | |
50 * Called only by NewFromStream | |
51 */ | |
52 SkRawCodec(const SkImageInfo& srcInfo, size_t length, void* storage); | |
53 | |
54 size_t fDngLength = 0; | |
scroggo
2016/01/06 22:30:20
We typically do not assign values to member variab
yujieqin
2016/01/07 09:22:26
Done.
| |
55 void* fDngStorage = nullptr; | |
56 | |
57 typedef SkCodec INHERITED; | |
58 }; | |
59 | |
60 #endif | |
OLD | NEW |