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

Side by Side Diff: src/images/SkDecodingImageGenerator.h

Issue 171723007: add new copyTo version to SkBitmap, which takes SkColorType (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/image/SkImage_Raster.cpp ('k') | src/images/SkDecodingImageGenerator.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 2013 Google Inc. 2 * Copyright 2013 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 SkDecodingImageGenerator_DEFINED 8 #ifndef SkDecodingImageGenerator_DEFINED
9 #define SkDecodingImageGenerator_DEFINED 9 #define SkDecodingImageGenerator_DEFINED
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 * SkImageGenerator constructor and and unref()ed on deletion. 106 * SkImageGenerator constructor and and unref()ed on deletion.
107 */ 107 */
108 static SkImageGenerator* Create(SkData* data, const Options& opt); 108 static SkImageGenerator* Create(SkData* data, const Options& opt);
109 109
110 private: 110 private:
111 SkData* fData; 111 SkData* fData;
112 SkStreamRewindable* fStream; 112 SkStreamRewindable* fStream;
113 const SkImageInfo fInfo; 113 const SkImageInfo fInfo;
114 const int fSampleSize; 114 const int fSampleSize;
115 const bool fDitherImage; 115 const bool fDitherImage;
116 const SkBitmap::Config fRequestedConfig; 116
117 SkDecodingImageGenerator(SkData* data, 117 SkDecodingImageGenerator(SkData* data,
118 SkStreamRewindable* stream, 118 SkStreamRewindable* stream,
119 const SkImageInfo& info, 119 const SkImageInfo& info,
120 int sampleSize, 120 int sampleSize,
121 bool ditherImage, 121 bool ditherImage);
122 SkBitmap::Config requestedConfig);
123 static SkImageGenerator* Create(SkData*, SkStreamRewindable*, 122 static SkImageGenerator* Create(SkData*, SkStreamRewindable*,
124 const Options&); 123 const Options&);
125 typedef SkImageGenerator INHERITED; 124 typedef SkImageGenerator INHERITED;
126 }; 125 };
127 126
128 // // Example of most basic use case: 127 // // Example of most basic use case:
129 // 128 //
130 // bool install_data(SkData* data, SkBitmap* dst) { 129 // bool install_data(SkData* data, SkBitmap* dst) {
131 // return SkInstallDiscardablePixelRef( 130 // return SkInstallDiscardablePixelRef(
132 // SkDecodingImageGenerator::Create( 131 // SkDecodingImageGenerator::Create(
133 // data, SkDecodingImageGenerator::Options()), dst, NULL); 132 // data, SkDecodingImageGenerator::Options()), dst, NULL);
134 // } 133 // }
135 // bool install_stream(SkStreamRewindable* stream, SkBitmap* dst) { 134 // bool install_stream(SkStreamRewindable* stream, SkBitmap* dst) {
136 // return SkInstallDiscardablePixelRef( 135 // return SkInstallDiscardablePixelRef(
137 // SkDecodingImageGenerator::Create( 136 // SkDecodingImageGenerator::Create(
138 // stream, SkDecodingImageGenerator::Options()), dst, NULL); 137 // stream, SkDecodingImageGenerator::Options()), dst, NULL);
139 // } 138 // }
140 139
141 #endif // SkDecodingImageGenerator_DEFINED 140 #endif // SkDecodingImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « src/image/SkImage_Raster.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698