зеркало из https://github.com/mozilla/pjs.git
186216 r=paper sr=tor image decoders don't need to #include "nsIImage.h"
This commit is contained in:
Родитель
6c35405455
Коммит
584af2d682
|
@ -36,7 +36,6 @@ MODULE_NAME = nsBMPModule
|
|||
REQUIRES = xpcom \
|
||||
gfx \
|
||||
imglib2 \
|
||||
string \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsBMPDecoder.cpp nsICODecoder.cpp
|
||||
|
|
|
@ -46,14 +46,11 @@
|
|||
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIImage.h"
|
||||
#include "nsMemory.h"
|
||||
#include "imgIContainerObserver.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
#include "imgILoad.h"
|
||||
|
||||
#include "ImageLogging.h"
|
||||
#include "prlog.h"
|
||||
|
||||
PRLogModuleInfo *gBMPLog = PR_NewLogModule("BMPDecoder");
|
||||
|
||||
|
|
|
@ -43,16 +43,10 @@
|
|||
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIImage.h"
|
||||
#include "nsMemory.h"
|
||||
#include "imgIContainerObserver.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#include "imgILoad.h"
|
||||
|
||||
#include "prcpucfg.h" // To get IS_LITTLE_ENDIAN / IS_BIG_ENDIAN
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsICODecoder, imgIDecoder)
|
||||
|
||||
#define ICONCOUNTOFFSET 4
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "nsGIFDecoder2.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIImage.h"
|
||||
#include "nsMemory.h"
|
||||
|
||||
#include "imgIContainerObserver.h"
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Tim Rowley.
|
||||
* Portions created by Tim Rowley are
|
||||
* Copyright (C) 2001 Tim Rowley. Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Tim Rowley <tor@cs.brown.edu>
|
||||
*/
|
||||
|
||||
#ifndef _nsMNGDecoder_h_
|
||||
#define _nsMNGDecoder_h_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "imgIDecoder.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "imgIDecoderObserver.h"
|
||||
#include "gfxIImageFrame.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "imgILoad.h"
|
||||
|
||||
#define NS_MNGDECODER_CID \
|
||||
{ /* d407782c-1dd1-11b2-9b49-dbe684d09cd8 */ \
|
||||
0xd407782c, \
|
||||
0x1dd1, \
|
||||
0x11b2, \
|
||||
{0x9b, 0x49, 0xdb, 0xe6, 0x84, 0xd0, 0x9c, 0xd8} \
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// MNG Decoder Definition
|
||||
|
||||
class nsMNGDecoder : public imgIDecoder
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IMGIDECODER
|
||||
|
||||
nsMNGDecoder();
|
||||
virtual ~nsMNGDecoder();
|
||||
|
||||
nsCOMPtr<imgIContainer> mImageContainer;
|
||||
nsCOMPtr<gfxIImageFrame> mImageFrame;
|
||||
nsCOMPtr<imgIDecoderObserver> mObserver; // this is just qi'd from mRequest for speed
|
||||
};
|
||||
|
||||
#endif
|
|
@ -36,7 +36,6 @@ MODULE_NAME = nsXBMModule
|
|||
REQUIRES = xpcom \
|
||||
gfx \
|
||||
imglib2 \
|
||||
string \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsXBMDecoder.cpp
|
||||
|
|
|
@ -40,16 +40,12 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "nsXBMDecoder.h"
|
||||
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIImage.h"
|
||||
#include "nsMemory.h"
|
||||
#include "imgIContainerObserver.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
#include "imgILoad.h"
|
||||
|
||||
|
@ -198,12 +194,6 @@ nsresult nsXBMDecoder::ProcessData(const char* aData, PRUint32 aCount) {
|
|||
}
|
||||
}
|
||||
if (mState == RECV_DATA) {
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
// bytes per pixel
|
||||
const PRUint32 bpp = 4;
|
||||
#else
|
||||
const PRUint32 bpp = 3;
|
||||
#endif
|
||||
PRUint32 bpr;
|
||||
mFrame->GetImageBytesPerRow(&bpr);
|
||||
PRUint32 abpr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче