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

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

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Stop DM from running large interlaced images on 32-bit Ubuntu GCE bots b/c they are running out of … 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
« no previous file with comments | « gyp/codec.gyp ('k') | include/codec/SkScaledCodec.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
54 */ 56 */
55 SkISize getScaledDimensions(float desiredScale) const { 57 SkISize getScaledDimensions(float desiredScale) const {
56 return this->onGetScaledDimensions(desiredScale); 58 return this->onGetScaledDimensions(desiredScale);
57 } 59 }
58 60
59 /** 61 /**
60 * Return (via desiredSubset) a subset which can decoded from this codec, 62 * Return (via desiredSubset) a subset which can decoded from this codec,
61 * 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
62 * desiredSubset. 64 * desiredSubset.
63 * 65 *
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 SkStream* stream() { 263 SkStream* stream() {
262 return fStream.get(); 264 return fStream.get();
263 } 265 }
264 266
265 private: 267 private:
266 const SkImageInfo fInfo; 268 const SkImageInfo fInfo;
267 SkAutoTDelete<SkStream> fStream; 269 SkAutoTDelete<SkStream> fStream;
268 bool fNeedsRewind; 270 bool fNeedsRewind;
269 }; 271 };
270 #endif // SkCodec_DEFINED 272 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « gyp/codec.gyp ('k') | include/codec/SkScaledCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698