Skip to content

Commit

Permalink
Make Skia build as a dynamic library by fixing up the imports.
Browse files Browse the repository at this point in the history
The define in the SCons file / vsprops was unused in the Skia source; I imagine
usage of it was removed in the recent Skia merge.

Review URL: http://codereview.chromium.org/16263


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7471 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
evanm@google.com committed Dec 26, 2008
1 parent f0bf605 commit dc6ed80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion skia/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env.Prepend(

env.Append(
CPPDEFINES = [
'SKIA_DISABLE_SUPPORT_FOR_DECODERS',
'SK_BUILD_NO_IMAGE_ENCODE',
],
)

Expand Down Expand Up @@ -303,6 +303,7 @@ input_files = ChromeFileList([
'sgl/SkTSearch.cpp',
'sgl/SkTSort.h',
'sgl/SkTypeface_fake.cpp',
'sgl/SkUnPreMultiply.cpp',
'sgl/SkUtils.cpp',
'sgl/SkWriter32.cpp',
'sgl/SkXfermode.cpp',
Expand Down Expand Up @@ -415,6 +416,7 @@ if env.Bit('linux'):

if env.Bit('posix'):
input_files.append('ports/SkThread_pthread.cpp')
input_files.append('ports/SkTime_Unix.cpp')

if env.Bit('mac'):
input_files.append('ext/bitmap_platform_device_mac.cc')
Expand Down
6 changes: 6 additions & 0 deletions skia/ports/SkImageDecoder_Factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ struct CodecFormat {
};

static const CodecFormat gPairs[] = {
#ifdef SK_SUPPORT_IMAGE_DECODE
{ SkImageDecoder_GIF_Factory, SkImageDecoder::kGIF_Format },
{ SkImageDecoder_PNG_Factory, SkImageDecoder::kPNG_Format },
{ SkImageDecoder_ICO_Factory, SkImageDecoder::kICO_Format },
{ SkImageDecoder_WBMP_Factory, SkImageDecoder::kWBMP_Format },
{ SkImageDecoder_BMP_Factory, SkImageDecoder::kBMP_Format },
{ SkImageDecoder_JPEG_Factory, SkImageDecoder::kJPEG_Format }
#endif
};

SkImageDecoder* SkImageDecoder::Factory(SkStream* stream) {
Expand Down Expand Up @@ -73,11 +75,15 @@ extern SkMovie* SkMovie_GIF_StreamFactory(SkStream*);
extern SkMovie* SkMovie_GIF_MemoryFactory(const void*, size_t);

static const SkMovieStreamProc gStreamProc[] = {
#ifdef SK_SUPPORT_IMAGE_DECODE
SkMovie_GIF_StreamFactory
#endif
};

static const SkMovieMemoryProc gMemoryProc[] = {
#ifdef SK_SUPPORT_IMAGE_DECODE
SkMovie_GIF_MemoryFactory
#endif
};

SkMovie* SkMovie::DecodeStream(SkStream* stream) {
Expand Down
2 changes: 1 addition & 1 deletion skia/skia.vsprops
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include;include\corecg;corecg;sgl;picture"
PreprocessorDefinitions="SKIA_DISABLE_SUPPORT_FOR_DECODERS"
PreprocessorDefinitions="SK_BUILD_NO_IMAGE_ENCODE"
DisableSpecificWarnings="4244; 4267; 4345; 4390; 4554; 4800"
/>
</VisualStudioPropertySheet>

0 comments on commit dc6ed80

Please sign in to comment.