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

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

Issue 15806010: Separate core and images project. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Change FORCE_LINKING to be more specific. Created 7 years, 6 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/SkForceLinking.cpp ('k') | src/ports/SkImageDecoder_empty.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 2006 The Android Open Source Project 2 * Copyright 2006 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 "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 if (kUnknown_Format == *format) { 443 if (kUnknown_Format == *format) {
444 if (stream->rewind()) { 444 if (stream->rewind()) {
445 *format = GetStreamFormat(stream); 445 *format = GetStreamFormat(stream);
446 } 446 }
447 } 447 }
448 } 448 }
449 delete codec; 449 delete codec;
450 } 450 }
451 return success; 451 return success;
452 } 452 }
453
454 /**
455 * This function leaks, but that is okay because it is not intended
456 * to be called. It is only here so that the linker will include the
457 * decoders.
458 * Make sure to keep it in sync with images.gyp, so only the encoders
459 * which are created on a platform are linked.
460 */
461 void force_linking();
462 void force_linking() {
463 SkASSERT(false);
464 CreateJPEGImageDecoder();
465 CreateWEBPImageDecoder();
466 CreateBMPImageDecoder();
467 CreateICOImageDecoder();
468 CreateWBMPImageDecoder();
469 // Only link GIF and PNG on platforms that build them. See images.gyp
470 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUIL D_FOR_NACL)
471 CreateGIFImageDecoder();
472 #endif
473 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN)
474 CreatePNGImageDecoder();
475 #endif
476 }
OLDNEW
« no previous file with comments | « src/images/SkForceLinking.cpp ('k') | src/ports/SkImageDecoder_empty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698