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

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

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: changing scaleToDimensions() name to nativelyScaleToDimensions() 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 * This is a suggestion to the user.
djsollen 2015/08/03 13:13:58 what is "this"? Can you be more specific. Perhaps.
emmaleer 2015/08/03 14:29:41 Yes, that is true. I've updated the comment.
55 */ 56 */
56 SkISize getScaledDimensions(float desiredScale) const { 57 SkISize getScaledDimensions(float desiredScale) const {
57 return this->onGetScaledDimensions(desiredScale); 58 return this->onGetScaledDimensions(desiredScale);
58 } 59 }
59 60
60 /** 61 /**
61 * Return (via desiredSubset) a subset which can decoded from this codec, 62 * Return (via desiredSubset) a subset which can decoded from this codec,
62 * or false if this codec cannot decode subsets or anything similar to 63 * or false if this codec cannot decode subsets or anything similar to
63 * desiredSubset. 64 * desiredSubset.
64 * 65 *
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 SkStream* stream() { 317 SkStream* stream() {
317 return fStream.get(); 318 return fStream.get();
318 } 319 }
319 320
320 private: 321 private:
321 const SkImageInfo fInfo; 322 const SkImageInfo fInfo;
322 SkAutoTDelete<SkStream> fStream; 323 SkAutoTDelete<SkStream> fStream;
323 bool fNeedsRewind; 324 bool fNeedsRewind;
324 }; 325 };
325 #endif // SkCodec_DEFINED 326 #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