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

Side by Side Diff: include/codec/SkCodec.h

Issue 2023093004: Revert of Create SkColorSpaceXform to handle color conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « gyp/qcms.gyp ('k') | src/codec/SkJpegCodec.h » ('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 SkCodec_DEFINED 8 #ifndef SkCodec_DEFINED
9 #define SkCodec_DEFINED 9 #define SkCodec_DEFINED
10 10
11 #include "../private/SkTemplates.h" 11 #include "../private/SkTemplates.h"
12 #include "SkColor.h" 12 #include "SkColor.h"
13 #include "SkEncodedFormat.h" 13 #include "SkEncodedFormat.h"
14 #include "SkEncodedInfo.h" 14 #include "SkEncodedInfo.h"
15 #include "SkImageInfo.h" 15 #include "SkImageInfo.h"
16 #include "SkSize.h" 16 #include "SkSize.h"
17 #include "SkStream.h" 17 #include "SkStream.h"
18 #include "SkTypes.h" 18 #include "SkTypes.h"
19 #include "SkYUVSizeInfo.h" 19 #include "SkYUVSizeInfo.h"
20 20
21 class SkColorSpace; 21 class SkColorSpace;
22 class SkData; 22 class SkData;
23 class SkPngChunkReader; 23 class SkPngChunkReader;
24 class SkSampler; 24 class SkSampler;
25 25
26 namespace DM { 26 namespace DM {
27 class CodecSrc; 27 class CodecSrc;
28 class ColorCodecSrc;
29 } 28 }
30 29
31 /** 30 /**
32 * Abstraction layer directly on top of an image codec. 31 * Abstraction layer directly on top of an image codec.
33 */ 32 */
34 class SkCodec : SkNoncopyable { 33 class SkCodec : SkNoncopyable {
35 public: 34 public:
36 /** 35 /**
37 * Minimum number of bytes that must be buffered in SkStream input. 36 * Minimum number of bytes that must be buffered in SkStream input.
38 * 37 *
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 /** 688 /**
690 * Returns the number of scanlines that have been decoded so far. 689 * Returns the number of scanlines that have been decoded so far.
691 * This is unaffected by the SkScanlineOrder. 690 * This is unaffected by the SkScanlineOrder.
692 * 691 *
693 * Returns -1 if we have not started a scanline decode. 692 * Returns -1 if we have not started a scanline decode.
694 */ 693 */
695 int currScanline() const { return fCurrScanline; } 694 int currScanline() const { return fCurrScanline; }
696 695
697 virtual int onOutputScanline(int inputScanline) const; 696 virtual int onOutputScanline(int inputScanline) const;
698 697
699 /**
700 * Used for testing with qcms.
701 * FIXME: Remove this when we are done comparing with qcms.
702 */
703 virtual sk_sp<SkData> getICCData() const { return nullptr; }
704 private: 698 private:
705 const SkEncodedInfo fEncodedInfo; 699 const SkEncodedInfo fEncodedInfo;
706 const SkImageInfo fSrcInfo; 700 const SkImageInfo fSrcInfo;
707 SkAutoTDelete<SkStream> fStream; 701 SkAutoTDelete<SkStream> fStream;
708 bool fNeedsRewind; 702 bool fNeedsRewind;
709 sk_sp<SkColorSpace> fColorSpace; 703 sk_sp<SkColorSpace> fColorSpace;
710 const Origin fOrigin; 704 const Origin fOrigin;
711 705
712 // These fields are only meaningful during scanline decodes. 706 // These fields are only meaningful during scanline decodes.
713 SkImageInfo fDstInfo; 707 SkImageInfo fDstInfo;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 * Return an object which will allow forcing scanline decodes to sample in X. 763 * Return an object which will allow forcing scanline decodes to sample in X.
770 * 764 *
771 * May create a sampler, if one is not currently being used. Otherwise, doe s 765 * May create a sampler, if one is not currently being used. Otherwise, doe s
772 * not affect ownership. 766 * not affect ownership.
773 * 767 *
774 * Only valid during scanline decoding. 768 * Only valid during scanline decoding.
775 */ 769 */
776 virtual SkSampler* getSampler(bool /*createIfNecessary*/) { return nullptr; } 770 virtual SkSampler* getSampler(bool /*createIfNecessary*/) { return nullptr; }
777 771
778 friend class DM::CodecSrc; // for fillIncompleteImage 772 friend class DM::CodecSrc; // for fillIncompleteImage
779
780 // For testing with qcms
781 // FIXME: Remove this when we are done comparing with qcms.
782 friend class DM::ColorCodecSrc;
783
784 friend class SkSampledCodec; 773 friend class SkSampledCodec;
785 friend class SkIcoCodec; 774 friend class SkIcoCodec;
786 }; 775 };
787 #endif // SkCodec_DEFINED 776 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « gyp/qcms.gyp ('k') | src/codec/SkJpegCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698