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

Side by Side Diff: src/images/SkImageDecoder_libjpeg.cpp

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 8
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkImageEncoder.h" 10 #include "SkImageEncoder.h"
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 return SkImageDecoder::kJPEG_Format; 1150 return SkImageDecoder::kJPEG_Format;
1151 } 1151 }
1152 return SkImageDecoder::kUnknown_Format; 1152 return SkImageDecoder::kUnknown_Format;
1153 } 1153 }
1154 1154
1155 static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) { 1155 static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) {
1156 return (SkImageEncoder::kJPEG_Type == t) ? SkNEW(SkJPEGImageEncoder) : NULL; 1156 return (SkImageEncoder::kJPEG_Type == t) ? SkNEW(SkJPEGImageEncoder) : NULL;
1157 } 1157 }
1158 1158
1159 1159
1160 static SkTRegistry<SkImageDecoder*, SkStream*> gDReg(sk_libjpeg_dfactory); 1160 static SkTRegistry<SkImageDecoder*(*)(SkStream*)> gDReg(sk_libjpeg_dfactory);
1161 static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_jpeg ); 1161 static SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> gFormatReg(get_format_j peg);
1162 static SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> gEReg(sk_libjpeg_efact ory); 1162 static SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> gEReg(sk_libjpeg_ef actory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698