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

Side by Side Diff: src/images/SkForceLinking.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/image/SkImage_Codec.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkForceLinking.h"
9 #include "SkImageDecoder.h"
10
11 // This method is required to fool the linker into not discarding the pre-main
12 // initialization and registration of the decoder classes. Passing true will
13 // cause memory leaks.
14 int SkForceLinking(bool doNotPassTrue) {
15 if (doNotPassTrue) {
16 SkASSERT(false);
17 CreateJPEGImageDecoder();
18 CreateWEBPImageDecoder();
19 CreateBMPImageDecoder();
20 CreateICOImageDecoder();
21 CreateWBMPImageDecoder();
22 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_WIN)
23 CreateDefaultDecoder();
24 #endif
25 // Only link GIF and PNG on platforms that build them. See images.gyp
26 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUIL D_FOR_NACL)
27 CreateGIFImageDecoder();
28 #endif
29 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN)
30 CreatePNGImageDecoder();
31 #endif
32 return -1;
33 }
34 return 0;
35 }
OLDNEW
« no previous file with comments | « src/image/SkImage_Codec.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698