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

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

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use SkTAbs, update comments Created 5 years, 4 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 * The returned value is the codec's suggestion for the closest valid
56 * scale that it can natively support
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 *
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 SkStream* stream() { 318 SkStream* stream() {
317 return fStream.get(); 319 return fStream.get();
318 } 320 }
319 321
320 private: 322 private:
321 const SkImageInfo fInfo; 323 const SkImageInfo fInfo;
322 SkAutoTDelete<SkStream> fStream; 324 SkAutoTDelete<SkStream> fStream;
323 bool fNeedsRewind; 325 bool fNeedsRewind;
324 }; 326 };
325 #endif // SkCodec_DEFINED 327 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « gyp/codec.gyp ('k') | include/codec/SkScaledCodec.h » ('j') | include/codec/SkScaledCodec.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698