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

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

Issue 12958002: Remove SK_ENABLE_LIBPNG define as it is no longer needed by Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/images/SkImageDecoder_Factory.cpp ('k') | src/images/SkImageEncoder_Factory.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 8
9 9
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 return true; 1079 return true;
1080 } 1080 }
1081 1081
1082 /////////////////////////////////////////////////////////////////////////////// 1082 ///////////////////////////////////////////////////////////////////////////////
1083 DEFINE_DECODER_CREATOR(PNGImageDecoder); 1083 DEFINE_DECODER_CREATOR(PNGImageDecoder);
1084 DEFINE_ENCODER_CREATOR(PNGImageEncoder); 1084 DEFINE_ENCODER_CREATOR(PNGImageEncoder);
1085 /////////////////////////////////////////////////////////////////////////////// 1085 ///////////////////////////////////////////////////////////////////////////////
1086 1086
1087 #include "SkTRegistry.h" 1087 #include "SkTRegistry.h"
1088 1088
1089 #ifdef SK_ENABLE_LIBPNG
1090 SkImageDecoder* sk_libpng_dfactory(SkStream*);
1091 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type);
1092 #endif
1093
1094 SkImageDecoder* sk_libpng_dfactory(SkStream* stream) { 1089 SkImageDecoder* sk_libpng_dfactory(SkStream* stream) {
1095 char buf[PNG_BYTES_TO_CHECK]; 1090 char buf[PNG_BYTES_TO_CHECK];
1096 if (stream->read(buf, PNG_BYTES_TO_CHECK) == PNG_BYTES_TO_CHECK && 1091 if (stream->read(buf, PNG_BYTES_TO_CHECK) == PNG_BYTES_TO_CHECK &&
1097 !png_sig_cmp((png_bytep) buf, (png_size_t)0, PNG_BYTES_TO_CHECK)) { 1092 !png_sig_cmp((png_bytep) buf, (png_size_t)0, PNG_BYTES_TO_CHECK)) {
1098 return SkNEW(SkPNGImageDecoder); 1093 return SkNEW(SkPNGImageDecoder);
1099 } 1094 }
1100 return NULL; 1095 return NULL;
1101 } 1096 }
1102 1097
1103 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) { 1098 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) {
1104 return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL; 1099 return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL;
1105 } 1100 }
1106 1101
1107 static SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> gEReg(sk_libpng_efacto ry); 1102 static SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> gEReg(sk_libpng_efacto ry);
1108 static SkTRegistry<SkImageDecoder*, SkStream*> gDReg(sk_libpng_dfactory); 1103 static SkTRegistry<SkImageDecoder*, SkStream*> gDReg(sk_libpng_dfactory);
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_Factory.cpp ('k') | src/images/SkImageEncoder_Factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698