Chromium Code Reviews| 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 SkEncodedFormat_DEFINED | |
| 9 #define SkEncodedFormat_DEFINED | |
| 10 | |
| 11 /** | |
| 12 * Enum describing format of encoded data. | |
| 13 */ | |
| 14 enum SkEncodedFormat { | |
| 15 kUnknown_SkEncodedFormat, | |
|
reed1
2016/04/07 13:27:31
why do we have an unknown value. From the API, its
scroggo_chromium
2016/04/08 18:16:36
This is unchanged. But FWIW, it mirrors how we hav
scroggo_chromium
2016/04/12 14:41:19
Removed until we discover we need it.
| |
| 16 kBMP_SkEncodedFormat, | |
| 17 kGIF_SkEncodedFormat, | |
| 18 kICO_SkEncodedFormat, | |
| 19 kJPEG_SkEncodedFormat, | |
| 20 kPNG_SkEncodedFormat, | |
| 21 kWBMP_SkEncodedFormat, | |
| 22 kWEBP_SkEncodedFormat, | |
| 23 kPKM_SkEncodedFormat, // ETC1 | |
| 24 kKTX_SkEncodedFormat, | |
| 25 kASTC_SkEncodedFormat, | |
| 26 kDNG_SkEncodedFormat, | |
| 27 }; | |
| 28 | |
| 29 class SkEncodedFormatQuery { | |
|
reed1
2016/04/07 13:27:31
may need a block comment summarizing why we have t
scroggo_chromium
2016/04/08 18:16:36
Acknowledged.
scroggo_chromium
2016/04/12 14:41:19
I've moved this class into SkImageGenerator. I don
| |
| 30 public: | |
| 31 virtual ~SkEncodedFormatQuery() {} | |
| 32 | |
| 33 /** | |
| 34 * Returns true if the specified format is supported. | |
|
reed1
2016/04/07 13:27:31
... supported where/how?
scroggo_chromium
2016/04/08 18:16:36
Acknowledged.
| |
| 35 */ | |
| 36 virtual bool supportedFormat(SkEncodedFormat) = 0; | |
| 37 | |
| 38 /** | |
| 39 * Given the beginning of an encoded image, returns true if that format is supported. | |
| 40 * | |
| 41 * @param data points to the beginning of the encoded image. | |
| 42 * | |
| 43 * @param length The number of bytes available to read. It need not be the entire image, | |
| 44 * but if it is too small to make a format determination, the query may return | |
| 45 * false where if given more data, it might have returned tru e. | |
| 46 */ | |
| 47 virtual bool supportedFormatFromData(const void* data, size_t length) = 0; | |
|
reed1
2016/04/07 13:27:31
Not sure what supported means here. "I can encode
scroggo_chromium
2016/04/08 18:16:36
Acknowledged.
scroggo_chromium
2016/04/12 14:41:19
This version has been removed from the new class.
| |
| 48 }; | |
| 49 | |
| 50 | |
| 51 #endif // SkEncodedFormat_DEFINED | |
| OLD | NEW |