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

Side by Side Diff: include/core/SkImageEncoder.h

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reed+scroggo Created 7 years, 3 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 | « include/core/SkImageDecoder.h ('k') | include/core/SkTRegistry.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkImageEncoder_DEFINED 8 #ifndef SkImageEncoder_DEFINED
9 #define SkImageEncoder_DEFINED 9 #define SkImageEncoder_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 #include "SkTRegistry.h"
12 13
13 class SkBitmap; 14 class SkBitmap;
14 class SkData; 15 class SkData;
15 class SkWStream; 16 class SkWStream;
16 17
17 class SkImageEncoder { 18 class SkImageEncoder {
18 public: 19 public:
19 enum Type { 20 enum Type {
20 kUnknown_Type, 21 kUnknown_Type,
21 kBMP_Type, 22 kBMP_Type,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // not all of these will be available 91 // not all of these will be available
91 /** An ARGBImageEncoder will always write out 92 /** An ARGBImageEncoder will always write out
92 * bitmap.width() * bitmap.height() * 4 93 * bitmap.width() * bitmap.height() * 4
93 * bytes. 94 * bytes.
94 */ 95 */
95 DECLARE_ENCODER_CREATOR(ARGBImageEncoder); 96 DECLARE_ENCODER_CREATOR(ARGBImageEncoder);
96 DECLARE_ENCODER_CREATOR(JPEGImageEncoder); 97 DECLARE_ENCODER_CREATOR(JPEGImageEncoder);
97 DECLARE_ENCODER_CREATOR(PNGImageEncoder); 98 DECLARE_ENCODER_CREATOR(PNGImageEncoder);
98 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); 99 DECLARE_ENCODER_CREATOR(WEBPImageEncoder);
99 100
101 // Typedef to make registering encoder callback easier
102 // This has to be defined outside SkImageEncoder. :(
103 typedef SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> SkImageEncoder_Enc odeReg;
100 #endif 104 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/core/SkTRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698