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

Side by Side Diff: include/core/SkImageDecoder.h

Issue 99473004: Remove deprecated setPrefConfigTable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/images/SkImageDecoder.cpp » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkImageDecoder_DEFINED 10 #ifndef SkImageDecoder_DEFINED
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 virtual int choose() = 0; 152 virtual int choose() = 0;
153 153
154 private: 154 private:
155 typedef SkRefCnt INHERITED; 155 typedef SkRefCnt INHERITED;
156 }; 156 };
157 157
158 Chooser* getChooser() const { return fChooser; } 158 Chooser* getChooser() const { return fChooser; }
159 Chooser* setChooser(Chooser*); 159 Chooser* setChooser(Chooser*);
160 160
161 /** 161 /**
162 @Deprecated. Use the struct version instead.
163
164 This optional table describes the caller's preferred config based on
165 information about the src data. For this table, the src attributes are
166 described in terms of depth (index (8), 16, 32/24) and if there is
167 per-pixel alpha. These inputs combine to create an index into the
168 pref[] table, which contains the caller's preferred config for that
169 input, or kNo_Config if there is no preference.
170
171 To specify no preference, call setPrefConfigTable(NULL), which is
172 the default.
173
174 Note, it is still at the discretion of the codec as to what output
175 config is actually returned, as it may not be able to support the
176 caller's preference.
177
178 Here is how the index into the table is computed from the src:
179 depth [8, 16, 32/24] -> 0, 2, 4
180 alpha [no, yes] -> 0, 1
181 The two index values are OR'd together.
182 src: 8-index, no-alpha -> 0
183 src: 8-index, yes-alpha -> 1
184 src: 16bit, no-alpha -> 2 // e.g. 565
185 src: 16bit, yes-alpha -> 3 // e.g. 1555
186 src: 32/24, no-alpha -> 4
187 src: 32/24, yes-alpha -> 5
188 */
189 void setPrefConfigTable(const SkBitmap::Config pref[5]);
190
191 /**
192 * Optional table describing the caller's preferred config based on 162 * Optional table describing the caller's preferred config based on
193 * information about the src data. Each field should be set to the 163 * information about the src data. Each field should be set to the
194 * preferred config for a src described in the name of the field. The 164 * preferred config for a src described in the name of the field. The
195 * src attributes are described in terms of depth (8-index, 165 * src attributes are described in terms of depth (8-index,
196 * 8bit-grayscale, or 8-bits/component) and whether there is per-pixel 166 * 8bit-grayscale, or 8-bits/component) and whether there is per-pixel
197 * alpha (does not apply to grayscale). If the caller has no preference 167 * alpha (does not apply to grayscale). If the caller has no preference
198 * for a particular src type, its slot should be set to kNo_Config. 168 * for a particular src type, its slot should be set to kNo_Config.
199 * 169 *
200 * NOTE ABOUT PREFERRED CONFIGS: 170 * NOTE ABOUT PREFERRED CONFIGS:
201 * If a config is preferred, either using a pref table or as a parameter 171 * If a config is preferred, either using a pref table or as a parameter
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 DECLARE_DECODER_CREATOR(WBMPImageDecoder); 547 DECLARE_DECODER_CREATOR(WBMPImageDecoder);
578 DECLARE_DECODER_CREATOR(WEBPImageDecoder); 548 DECLARE_DECODER_CREATOR(WEBPImageDecoder);
579 549
580 550
581 // Typedefs to make registering decoder and formatter callbacks easier. 551 // Typedefs to make registering decoder and formatter callbacks easier.
582 // These have to be defined outside SkImageDecoder. :( 552 // These have to be defined outside SkImageDecoder. :(
583 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod er_DecodeReg; 553 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod er_DecodeReg;
584 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod er_FormatReg; 554 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod er_FormatReg;
585 555
586 #endif 556 #endif
OLDNEW
« no previous file with comments | « no previous file | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698