Bug 591145 - Remove option to not clobber when changing encoder. r=khuey a=bsmedberg

This commit is contained in:
Jory A. Pratt 2010-11-05 18:22:56 +01:00
Родитель c4b75eb411
Коммит 96aa8c245e
2 изменённых файлов: 0 добавлений и 46 удалений

Просмотреть файл

@ -82,21 +82,5 @@ EXTRA_DSO_LDOPTS = \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
# Force a rebuild of nsImageModule when either of MOZ_IMG_{DE,EN}CODERS changes
GARBAGE += _img_list nsImgBuildDefines.h
export::
{ \
$(foreach d,$(MOZ_IMG_ENCODERS), \
echo "#define IMG_BUILD_ENCODER_${d}" ; ) \
} > nsImgBuildDefines.tmp
@if `cmp -s nsImgBuildDefines.h nsImgBuildDefines.tmp`; then \
rm -f nsImgBuildDefines.tmp; \
else \
rm -f nsImgBuildDefines.h; \
mv nsImgBuildDefines.tmp nsImgBuildDefines.h; \
fi
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -37,8 +37,6 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsImgBuildDefines.h"
#include "nsIDeviceContext.h"
#include "mozilla/ModuleUtils.h"
#include "nsXPCOMCID.h"
@ -60,14 +58,8 @@
#include "imgTools.h"
#include "DiscardTracker.h"
#ifdef IMG_BUILD_ENCODER_png
// png
#include "nsPNGEncoder.h"
#endif
#ifdef IMG_BUILD_ENCODER_jpeg
// jpeg
#include "nsJPEGEncoder.h"
#endif
// objects that just require generic constructors
namespace mozilla {
@ -80,40 +72,22 @@ using namespace mozilla::imagelib;
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(imgLoader, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(imgRequestProxy)
NS_GENERIC_FACTORY_CONSTRUCTOR(imgTools)
#ifdef IMG_BUILD_ENCODER_jpeg
// jpeg
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJPEGEncoder)
#endif
#ifdef IMG_BUILD_ENCODER_png
// png
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPNGEncoder)
#endif
NS_DEFINE_NAMED_CID(NS_IMGLOADER_CID);
NS_DEFINE_NAMED_CID(NS_IMGREQUESTPROXY_CID);
NS_DEFINE_NAMED_CID(NS_IMGTOOLS_CID);
NS_DEFINE_NAMED_CID(NS_RASTERIMAGE_CID);
#ifdef IMG_BUILD_ENCODER_jpeg
NS_DEFINE_NAMED_CID(NS_JPEGENCODER_CID);
#endif
#ifdef IMG_BUILD_ENCODER_png
NS_DEFINE_NAMED_CID(NS_PNGENCODER_CID);
#endif
static const mozilla::Module::CIDEntry kImageCIDs[] = {
{ &kNS_IMGLOADER_CID, false, NULL, imgLoaderConstructor, },
{ &kNS_IMGREQUESTPROXY_CID, false, NULL, imgRequestProxyConstructor, },
{ &kNS_IMGTOOLS_CID, false, NULL, imgToolsConstructor, },
{ &kNS_RASTERIMAGE_CID, false, NULL, RasterImageConstructor, },
#ifdef IMG_BUILD_ENCODER_jpeg
{ &kNS_JPEGENCODER_CID, false, NULL, nsJPEGEncoderConstructor, },
#endif
#ifdef IMG_BUILD_ENCODER_png
{ &kNS_PNGENCODER_CID, false, NULL, nsPNGEncoderConstructor, },
#endif
{ NULL }
};
@ -123,12 +97,8 @@ static const mozilla::Module::ContractIDEntry kImageContracts[] = {
{ "@mozilla.org/image/request;1", &kNS_IMGREQUESTPROXY_CID },
{ "@mozilla.org/image/tools;1", &kNS_IMGTOOLS_CID },
{ "@mozilla.org/image/rasterimage;1", &kNS_RASTERIMAGE_CID },
#ifdef IMG_BUILD_ENCODER_jpeg
{ "@mozilla.org/image/encoder;2?type=image/jpeg", &kNS_JPEGENCODER_CID },
#endif
#ifdef IMG_BUILD_ENCODER_png
{ "@mozilla.org/image/encoder;2?type=image/png", &kNS_PNGENCODER_CID },
#endif
{ NULL }
};