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

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

Issue 1022843005: Revert of Enabling ico decoding with use of png and bmp decoders (Closed) Base URL: https://skia.googlesource.com/skia.git@swizzle
Patch Set: Created 5 years, 9 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') | src/codec/SkCodec.cpp » ('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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 * initially returns a non-opaque answer, but completing the decode 64 * initially returns a non-opaque answer, but completing the decode
65 * reveals that the image is actually opaque. 65 * reveals that the image is actually opaque.
66 */ 66 */
67 #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO 67 #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
68 bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { 68 bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
69 *info = fInfo; 69 *info = fInfo;
70 return true; 70 return true;
71 } 71 }
72 #endif 72 #endif
73 73
74 // Helper for subclasses.
75 const SkImageInfo& getOriginalInfo() { return fInfo; }
76
74 virtual SkISize onGetScaledDimensions(float /* desiredScale */) const { 77 virtual SkISize onGetScaledDimensions(float /* desiredScale */) const {
75 // By default, scaling is not supported. 78 // By default, scaling is not supported.
76 return fInfo.dimensions(); 79 return fInfo.dimensions();
77 } 80 }
78 81
79 virtual SkEncodedFormat onGetEncodedFormat() const = 0; 82 virtual SkEncodedFormat onGetEncodedFormat() const = 0;
80 83
81 /** 84 /**
82 * If the stream was previously read, attempt to rewind. 85 * If the stream was previously read, attempt to rewind.
83 * @returns: 86 * @returns:
(...skipping 19 matching lines...) Expand all
103 } 106 }
104 107
105 private: 108 private:
106 const SkImageInfo fInfo; 109 const SkImageInfo fInfo;
107 SkAutoTDelete<SkStream> fStream; 110 SkAutoTDelete<SkStream> fStream;
108 bool fNeedsRewind; 111 bool fNeedsRewind;
109 112
110 typedef SkImageGenerator INHERITED; 113 typedef SkImageGenerator INHERITED;
111 }; 114 };
112 #endif // SkCodec_DEFINED 115 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « gyp/codec.gyp ('k') | src/codec/SkCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698