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

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

Issue 1624513003: Add RAW decoding support to Skia (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix sample_dng in resources, Treat less warnings as errors 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/SkRawAdapterCodec.cpp ('k') | src/codec/SkRawCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 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 "SkTypes.h"
14
15 class SkDngImage;
16 class SkStream;
17
18 /*
19 *
20 * This class implements the decoding for RAW images
21 *
22 */
23 class SkRawCodec : public SkCodec {
24 public:
25
26 /*
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 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes , const Options&,
37 SkPMColor*, int*, int*) override;
38
39 SkEncodedFormat onGetEncodedFormat() const override {
40 return kRAW_SkEncodedFormat;
41 }
42
43 SkISize onGetScaledDimensions(float desiredScale) const override;
44
45 bool onDimensionsSupported(const SkISize&) override;
46
47 private:
48
49 /*
50 * Creates an instance of the decoder
51 * Called only by NewFromStream, takes ownership of dngImage.
52 */
53 SkRawCodec(SkDngImage* dngImage);
54
55 SkAutoTDelete<SkDngImage> fDngImage;
56
57 typedef SkCodec INHERITED;
58 };
59
60 #endif
OLDNEW
« no previous file with comments | « src/codec/SkRawAdapterCodec.cpp ('k') | src/codec/SkRawCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698