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

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

Issue 1011343003: Enabling ico decoding with use of png and bmp decoders (Closed) Base URL: https://skia.googlesource.com/skia.git@swizzle
Patch Set: Removed additional blacklist items 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
77 virtual SkISize onGetScaledDimensions(float /* desiredScale */) const { 74 virtual SkISize onGetScaledDimensions(float /* desiredScale */) const {
78 // By default, scaling is not supported. 75 // By default, scaling is not supported.
79 return fInfo.dimensions(); 76 return fInfo.dimensions();
80 } 77 }
81 78
82 virtual SkEncodedFormat onGetEncodedFormat() const = 0; 79 virtual SkEncodedFormat onGetEncodedFormat() const = 0;
83 80
84 /** 81 /**
85 * If the stream was previously read, attempt to rewind. 82 * If the stream was previously read, attempt to rewind.
86 * @returns: 83 * @returns:
(...skipping 19 matching lines...) Expand all
106 } 103 }
107 104
108 private: 105 private:
109 const SkImageInfo fInfo; 106 const SkImageInfo fInfo;
110 SkAutoTDelete<SkStream> fStream; 107 SkAutoTDelete<SkStream> fStream;
111 bool fNeedsRewind; 108 bool fNeedsRewind;
112 109
113 typedef SkImageGenerator INHERITED; 110 typedef SkImageGenerator INHERITED;
114 }; 111 };
115 #endif // SkCodec_DEFINED 112 #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