Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Return the ImageInfo associated with this codec. | 47 * Return the ImageInfo associated with this codec. |
| 48 */ | 48 */ |
| 49 const SkImageInfo& getInfo() const { return fInfo; } | 49 const SkImageInfo& getInfo() const { return fInfo; } |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * Return a size that approximately supports the desired scale factor. | 52 * Return a size that approximately supports the desired scale factor. |
| 53 * The codec may not be able to scale efficiently to the exact scale | 53 * The codec may not be able to scale efficiently to the exact scale |
| 54 * factor requested, so return a size that approximates that scale. | 54 * factor requested, so return a size that approximates that scale. |
| 55 * This is a suggestion to the user. The dimensions getScanlineDecoder | |
|
scroggo
2015/07/30 17:53:01
The first sentence sounds good. For the second, I
emmaleer
2015/07/30 22:27:55
Yes that's what I was trying to say. I think menti
| |
| 56 * is called with may not be the same. | |
| 55 */ | 57 */ |
| 56 SkISize getScaledDimensions(float desiredScale) const { | 58 SkISize getScaledDimensions(float desiredScale) const { |
| 57 return this->onGetScaledDimensions(desiredScale); | 59 return this->onGetScaledDimensions(desiredScale); |
| 58 } | 60 } |
| 59 | 61 |
| 60 /** | 62 /** |
| 61 * Return (via desiredSubset) a subset which can decoded from this codec, | 63 * Return (via desiredSubset) a subset which can decoded from this codec, |
| 62 * or false if this codec cannot decode subsets or anything similar to | 64 * or false if this codec cannot decode subsets or anything similar to |
| 63 * desiredSubset. | 65 * desiredSubset. |
| 64 * | 66 * |
| 65 * @param desiredSubset In/out parameter. As input, a desired subset of | 67 * @param desiredSubset In/out parameter. As input, a desired subset of |
| 66 * the original bounds (as specified by getInfo). If true is returned, | 68 * the original bounds (as specified by getInfo). If true is returned, |
| 67 * desiredSubset may have been modified to a subset which is | 69 * desiredSubset may have been modified to a subset which is |
| 68 * supported. Although a particular change may have been made to | 70 * supported. Although a particular change may have been made to |
| 69 * desiredSubset to create something supported, it is possible other | 71 * desiredSubset to create something supported, it is possible other |
| 70 * changes could result in a valid subset. | 72 * changes could result in a valid subset. |
| 71 * If false is returned, desiredSubset's value is undefined. | 73 * If false is returned, desiredSubset's value is undefined. |
| 72 * @return true if this codec supports decoding desiredSubset (as | 74 * @return true if this codec supports decoding desiredSubset (as |
| 73 * returned, potentially modified) | 75 * returned, potentially modified) |
| 74 */ | 76 */ |
| 77 | |
|
msarett
2015/07/30 13:55:38
nit: I don't think we want this new line.
emmaleer
2015/07/30 17:50:39
Acknowledged.
scroggo
2015/07/30 17:53:01
nit: This extra line is not needed.
| |
| 75 bool getValidSubset(SkIRect* desiredSubset) const { | 78 bool getValidSubset(SkIRect* desiredSubset) const { |
| 76 return this->onGetValidSubset(desiredSubset); | 79 return this->onGetValidSubset(desiredSubset); |
| 77 } | 80 } |
| 78 | 81 |
| 79 /** | 82 /** |
| 80 * Format of the encoded data. | 83 * Format of the encoded data. |
| 81 */ | 84 */ |
| 82 SkEncodedFormat getEncodedFormat() const { return this->onGetEncodedFormat() ; } | 85 SkEncodedFormat getEncodedFormat() const { return this->onGetEncodedFormat() ; } |
| 83 | 86 |
| 84 /** | 87 /** |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 SkStream* stream() { | 319 SkStream* stream() { |
| 317 return fStream.get(); | 320 return fStream.get(); |
| 318 } | 321 } |
| 319 | 322 |
| 320 private: | 323 private: |
| 321 const SkImageInfo fInfo; | 324 const SkImageInfo fInfo; |
| 322 SkAutoTDelete<SkStream> fStream; | 325 SkAutoTDelete<SkStream> fStream; |
| 323 bool fNeedsRewind; | 326 bool fNeedsRewind; |
| 324 }; | 327 }; |
| 325 #endif // SkCodec_DEFINED | 328 #endif // SkCodec_DEFINED |
| OLD | NEW |