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

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

Issue 2170793004: Remove unnecessary getColorSpace() API from SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Pass refs more efficiently Created 4 years, 5 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 | « dm/DMSrcSink.cpp ('k') | include/codec/SkEncodedInfo.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
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 virtual ~SkCodec(); 103 virtual ~SkCodec();
104 104
105 /** 105 /**
106 * Return the ImageInfo associated with this codec. 106 * Return the ImageInfo associated with this codec.
107 */ 107 */
108 const SkImageInfo& getInfo() const { return fSrcInfo; } 108 const SkImageInfo& getInfo() const { return fSrcInfo; }
109 109
110 const SkEncodedInfo& getEncodedInfo() const { return fEncodedInfo; } 110 const SkEncodedInfo& getEncodedInfo() const { return fEncodedInfo; }
111 111
112 /**
113 * Returns the color space associated with the codec.
114 * Does not affect ownership.
115 * Might be NULL.
116 */
117 SkColorSpace* getColorSpace() const { return fColorSpace.get(); }
118
119 enum Origin { 112 enum Origin {
120 kTopLeft_Origin = 1, // Default 113 kTopLeft_Origin = 1, // Default
121 kTopRight_Origin = 2, // Reflected across y-axis 114 kTopRight_Origin = 2, // Reflected across y-axis
122 kBottomRight_Origin = 3, // Rotated 180 115 kBottomRight_Origin = 3, // Rotated 180
123 kBottomLeft_Origin = 4, // Reflected across x-axis 116 kBottomLeft_Origin = 4, // Reflected across x-axis
124 kLeftTop_Origin = 5, // Reflected across x-axis, Rotated 90 CCW 117 kLeftTop_Origin = 5, // Reflected across x-axis, Rotated 90 CCW
125 kRightTop_Origin = 6, // Rotated 90 CW 118 kRightTop_Origin = 6, // Rotated 90 CW
126 kRightBottom_Origin = 7, // Reflected across x-axis, Rotated 90 CW 119 kRightBottom_Origin = 7, // Reflected across x-axis, Rotated 90 CW
127 kLeftBottom_Origin = 8, // Rotated 90 CCW 120 kLeftBottom_Origin = 8, // Rotated 90 CCW
128 kDefault_Origin = kTopLeft_Origin, 121 kDefault_Origin = kTopLeft_Origin,
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 /** 648 /**
656 * Used for testing with qcms. 649 * Used for testing with qcms.
657 * FIXME: Remove this when we are done comparing with qcms. 650 * FIXME: Remove this when we are done comparing with qcms.
658 */ 651 */
659 virtual sk_sp<SkData> getICCData() const { return nullptr; } 652 virtual sk_sp<SkData> getICCData() const { return nullptr; }
660 private: 653 private:
661 const SkEncodedInfo fEncodedInfo; 654 const SkEncodedInfo fEncodedInfo;
662 const SkImageInfo fSrcInfo; 655 const SkImageInfo fSrcInfo;
663 SkAutoTDelete<SkStream> fStream; 656 SkAutoTDelete<SkStream> fStream;
664 bool fNeedsRewind; 657 bool fNeedsRewind;
665 sk_sp<SkColorSpace> fColorSpace;
666 const Origin fOrigin; 658 const Origin fOrigin;
667 659
668 // These fields are only meaningful during scanline decodes. 660 // These fields are only meaningful during scanline decodes.
669 SkImageInfo fDstInfo; 661 SkImageInfo fDstInfo;
670 SkCodec::Options fOptions; 662 SkCodec::Options fOptions;
671 int fCurrScanline; 663 int fCurrScanline;
672 664
673 /** 665 /**
674 * Return whether these dimensions are supported as a scale. 666 * Return whether these dimensions are supported as a scale.
675 * 667 *
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 714
723 // For testing with qcms 715 // For testing with qcms
724 // FIXME: Remove these when we are done comparing with qcms. 716 // FIXME: Remove these when we are done comparing with qcms.
725 friend class DM::ColorCodecSrc; 717 friend class DM::ColorCodecSrc;
726 friend class ColorCodecBench; 718 friend class ColorCodecBench;
727 719
728 friend class SkSampledCodec; 720 friend class SkSampledCodec;
729 friend class SkIcoCodec; 721 friend class SkIcoCodec;
730 }; 722 };
731 #endif // SkCodec_DEFINED 723 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | include/codec/SkEncodedInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698