| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 44 | 44 | 
| 45     /** | 45     /** | 
| 46      *  Return the ImageInfo associated with this codec. | 46      *  Return the ImageInfo associated with this codec. | 
| 47      */ | 47      */ | 
| 48     const SkImageInfo& getInfo() const { return fInfo; } | 48     const SkImageInfo& getInfo() const { return fInfo; } | 
| 49 | 49 | 
| 50     /** | 50     /** | 
| 51      *  Return a size that approximately supports the desired scale factor. | 51      *  Return a size that approximately supports the desired scale factor. | 
| 52      *  The codec may not be able to scale efficiently to the exact scale | 52      *  The codec may not be able to scale efficiently to the exact scale | 
| 53      *  factor requested, so return a size that approximates that scale. | 53      *  factor requested, so return a size that approximates that scale. | 
| 54      *  The returned value is the codec's suggestion for the closest valid |  | 
| 55      *  scale that it can natively support |  | 
| 56      */ | 54      */ | 
| 57     SkISize getScaledDimensions(float desiredScale) const { | 55     SkISize getScaledDimensions(float desiredScale) const { | 
| 58         return this->onGetScaledDimensions(desiredScale); | 56         return this->onGetScaledDimensions(desiredScale); | 
| 59     } | 57     } | 
| 60 | 58 | 
| 61     /** | 59     /** | 
| 62      *  Return (via desiredSubset) a subset which can decoded from this codec, | 60      *  Return (via desiredSubset) a subset which can decoded from this codec, | 
| 63      *  or false if this codec cannot decode subsets or anything similar to | 61      *  or false if this codec cannot decode subsets or anything similar to | 
| 64      *  desiredSubset. | 62      *  desiredSubset. | 
| 65      * | 63      * | 
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 263     SkStream* stream() { | 261     SkStream* stream() { | 
| 264         return fStream.get(); | 262         return fStream.get(); | 
| 265     } | 263     } | 
| 266 | 264 | 
| 267 private: | 265 private: | 
| 268     const SkImageInfo       fInfo; | 266     const SkImageInfo       fInfo; | 
| 269     SkAutoTDelete<SkStream> fStream; | 267     SkAutoTDelete<SkStream> fStream; | 
| 270     bool                    fNeedsRewind; | 268     bool                    fNeedsRewind; | 
| 271 }; | 269 }; | 
| 272 #endif // SkCodec_DEFINED | 270 #endif // SkCodec_DEFINED | 
| OLD | NEW | 
|---|