Remove the nsDrawingSurface typedef and replace it with nsIDrawingSurface*. b=64023 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2004-07-18 17:36:03 +00:00
Родитель b557974d80
Коммит 9477e33c6b
68 изменённых файлов: 280 добавлений и 291 удалений

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

@ -96,7 +96,7 @@ public:
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext){return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext);
NS_IMETHOD GetCanonicalPixelScale(float &aScale) const;
@ -138,7 +138,7 @@ public:
private:
/* Helper methods for |CreateRenderingContext|&co. */
nsresult InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWindow);
nsresult InitRenderingContext(nsIRenderingContext *aContext, nsDrawingSurface aSurface);
nsresult InitRenderingContext(nsIRenderingContext *aContext, nsIDrawingSurface* aSurface);
protected:
virtual ~DeviceContextImpl();

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

@ -85,9 +85,9 @@ public:
* @param aSecondSrcBackColor color of pixels in aSrc that should be
* considered "background" color
*/
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsDrawingSurface aSrc,
nsDrawingSurface aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsDrawingSurface aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsIDrawingSurface* aSrc,
nsIDrawingSurface* aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsIDrawingSurface* aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0)) = 0;
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIRenderingContext *aSrc,
@ -101,8 +101,8 @@ public:
returned in a new'ed array of aRect.width*aRect.height elements, in row-major
order. This array must be freed by the caller.
*/
NS_IMETHOD GetAlphas(const nsRect& aRect, nsDrawingSurface aBlack,
nsDrawingSurface aWhite, PRUint8** aAlphas) = 0;
NS_IMETHOD GetAlphas(const nsRect& aRect, nsIDrawingSurface* aBlack,
nsIDrawingSurface* aWhite, PRUint8** aAlphas) = 0;
};
#endif

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

@ -229,12 +229,12 @@ public:
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) = 0;
/**
* Create a rendering context and initialize it from an nsDrawingSurface
* @param nsDrawingSurface widget to initialize context from
* Create a rendering context and initialize it from an nsIDrawingSurface*
* @param nsIDrawingSurface* widget to initialize context from
* @param aContext out parameter for new rendering context
* @return error status
*/
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext) = 0;
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext) = 0;
/**
* Create a rendering context and initialize it from an nsIWidget

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

@ -185,7 +185,7 @@ public:
* @param aHeight The destination height of the pixelmap
* @return if TRUE, no errors
*/
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
/**
* BitBlit the nsIImage to a device, the source and dest can be scaled
@ -201,12 +201,12 @@ public:
* @param aDHeight The destination height of the pixelmap
* @return if TRUE, no errors
*/
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect) = 0;

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

@ -99,9 +99,6 @@ typedef enum
//----------------------------------------------------------------------
//a cross platform way of specifying a native rendering context
typedef void * nsDrawingSurface;
// RenderingContext interface
class nsIRenderingContext : public nsISupports
{
@ -125,7 +122,7 @@ public:
* @param aSurface the surface to draw into
* @result The result of the initialization, NS_Ok if no errors
*/
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface) = 0;
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface) = 0;
/**
* Reset the rendering context
@ -165,13 +162,13 @@ public:
* if nsnull, the original drawing surface obtained at initialization
* should be selected.
*/
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface) = 0;
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface) = 0;
/**
* Get the currently selected drawing surface
* @param aSurface out parameter for the current drawing surface
*/
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface) = 0;
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface) = 0;
/**
* Returns in aResult any rendering hints that the context has.
@ -330,15 +327,15 @@ public:
* if nsnull then a bitmap will not be created and associated
* with the new drawing surface
* @param aSurfFlags see bottom of nsIRenderingContext.h
* @return A nsDrawingSurface
* @return A nsIDrawingSurface*
*/
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface) = 0;
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface) = 0;
/**
* Destroy a drawing surface created by CreateDrawingSurface()
* @param aDS A drawing surface to destroy
*/
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS) = 0;
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS) = 0;
/**
* Draw a line
@ -680,7 +677,7 @@ public:
* @param aDestBounds Destination rectangle to copy to
* @param aCopyFlags see below
*/
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags) = 0;
//~~~
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd) = 0;
@ -698,7 +695,7 @@ public:
* @param aMaxSize maximum size that may be requested for the backbuffer
* @param aBackbuffer drawing surface used as the backbuffer
*/
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer) = 0;
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer) = 0;
/**
* Release a drawing surface used as the backbuffer

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

@ -155,7 +155,7 @@ void nsImageBeOS::ImageUpdated(nsIDeviceContext *aContext, PRUint8 aFlags, nsRec
}
// Draw the bitmap, this method has a source and destination coordinates
NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
@ -234,7 +234,7 @@ NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface
}
// Draw the bitmap, this draw just has destination coordinates
NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
//Don't bother to draw nothing
@ -300,7 +300,7 @@ NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface
return NS_OK;
}
NS_IMETHODIMP nsImageBeOS::DrawTile(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImageBeOS::DrawTile(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset, PRInt32 aPadX, PRInt32 aPadY, const nsRect &aTileRect)
{
// Don't bother to draw nothing
@ -459,7 +459,7 @@ NS_IMETHODIMP nsImageBeOS::UnlockImagePixels(PRBool aMaskPixels)
return NS_OK;
}
nsresult nsImageBeOS::BuildImage(nsDrawingSurface aDrawingSurface)
nsresult nsImageBeOS::BuildImage(nsIDrawingSurface* aDrawingSurface)
{
CreateImage(aDrawingSurface);
return NS_OK;
@ -469,7 +469,7 @@ nsresult nsImageBeOS::BuildImage(nsDrawingSurface aDrawingSurface)
// and mAlphaBits) into a BBitmap so it can be drawn using the Be APIs. Since it is
// expensive to create and destroy a BBitmap for this purpose, we will keep this bitmap
// around, which also prevents the need to copy the bits if they have not changed.
void nsImageBeOS::CreateImage(nsDrawingSurface aSurface)
void nsImageBeOS::CreateImage(nsIDrawingSurface* aSurface)
{
PRInt32 validX = 0, validY = 0, validMostX = mWidth, validMostY = mHeight;

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

@ -63,16 +63,16 @@ public:
virtual nsColorMap *GetColorMap() { return nsnull; }
// The heavy lifting
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
NS_IMETHOD DrawToImage(nsIImage *aDstImage, nscoord aDX, nscoord aDY,
nscoord aDWidth, nscoord aDHeight);
NS_IMETHOD DrawTile(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHOD DrawTile(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset, PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
@ -97,8 +97,8 @@ private:
void ComputePaletteSize(PRIntn nBitCount);
protected:
void CreateImage(nsDrawingSurface aSurface);
nsresult BuildImage(nsDrawingSurface aDrawingSurface);
void CreateImage(nsIDrawingSurface* aSurface);
nsresult BuildImage(nsIDrawingSurface* aDrawingSurface);
private:
BBitmap *mImage;

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

@ -102,7 +102,7 @@ NS_IMETHODIMP nsRenderingContextBeOS::Init(nsIDeviceContext *aContext, nsIWidget
return (CommonInit());
}
NS_IMETHODIMP nsRenderingContextBeOS::Init(nsIDeviceContext *aContext, nsDrawingSurface aSurface) {
NS_IMETHODIMP nsRenderingContextBeOS::Init(nsIDeviceContext *aContext, nsIDrawingSurface* aSurface) {
mContext = aContext;
NS_IF_ADDREF(mContext);
mSurface = (nsDrawingSurfaceBeOS *)aSurface;
@ -144,13 +144,13 @@ NS_IMETHODIMP nsRenderingContextBeOS::UnlockDrawingSurface() {
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextBeOS::SelectOffScreenDrawingSurface(nsDrawingSurface aSurface) {
NS_IMETHODIMP nsRenderingContextBeOS::SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface) {
if (nsnull == aSurface) mSurface = mOffscreenSurface;
else mSurface = (nsDrawingSurfaceBeOS *)aSurface;
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextBeOS::GetDrawingSurface(nsDrawingSurface *aSurface) {
NS_IMETHODIMP nsRenderingContextBeOS::GetDrawingSurface(nsIDrawingSurface* *aSurface) {
*aSurface = mSurface;
return NS_OK;
}
@ -458,7 +458,7 @@ NS_IMETHODIMP nsRenderingContextBeOS::GetCurrentTransform(nsTransform2D *&aTrans
}
NS_IMETHODIMP nsRenderingContextBeOS::CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags,
nsDrawingSurface &aSurface) {
nsIDrawingSurface* &aSurface) {
if (nsnull == mSurface) {
aSurface = nsnull;
@ -479,11 +479,11 @@ NS_IMETHODIMP nsRenderingContextBeOS::CreateDrawingSurface(const nsRect& aBounds
}
surf->Init(mView, aBounds.width, aBounds.height, aSurfFlags);
}
aSurface = (nsDrawingSurface)surf;
aSurface = surf;
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextBeOS::DestroyDrawingSurface(nsDrawingSurface aDS) {
NS_IMETHODIMP nsRenderingContextBeOS::DestroyDrawingSurface(nsIDrawingSurface* aDS) {
nsDrawingSurfaceBeOS *surf = (nsDrawingSurfaceBeOS *)aDS;
if (surf == nsnull) return NS_ERROR_FAILURE;
NS_IF_RELEASE(surf);
@ -1247,7 +1247,7 @@ NS_IMETHODIMP nsRenderingContextBeOS::DrawString(const PRUnichar *aString, PRUin
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextBeOS::CopyOffScreenBits(nsDrawingSurface aSrcSurf,
NS_IMETHODIMP nsRenderingContextBeOS::CopyOffScreenBits(nsIDrawingSurface* aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY, const nsRect &aDestBounds, PRUint32 aCopyFlags) {
PRInt32 srcX = aSrcX;

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

@ -65,7 +65,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext *aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext *aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext *aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD Reset();
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext);
@ -74,8 +74,8 @@ public:
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes, PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface();
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32 &aResult);
NS_IMETHOD PushState();
@ -104,8 +104,8 @@ public:
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
@ -172,7 +172,7 @@ public:
NS_IMETHOD DrawString(const nsString &aString, nscoord aX, nscoord aY, PRInt32 aFontID,
const nscoord *aSpacing);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 *ngd);

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

@ -60,7 +60,7 @@ public:
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext);
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aSurface, aContext));}
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aSurface, aContext));}
NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext);
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);

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

@ -629,7 +629,7 @@ XlibStretchHorizontal(long x1, long x2, long y1, long y2,
// Draw the bitmap, this method has a source and destination coordinates
NS_IMETHODIMP
nsImageGTK::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
nsImageGTK::Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
@ -1258,7 +1258,7 @@ nsImageGTK::DrawCompositedGeneral(PRBool isLSB, PRBool flipBytes,
void
nsImageGTK::DrawComposited(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 srcWidth, PRInt32 srcHeight,
PRInt32 dstWidth, PRInt32 dstHeight,
PRInt32 dstOrigX, PRInt32 dstOrigY,
@ -1397,7 +1397,7 @@ nsImageGTK::DrawComposited(nsIRenderingContext &aContext,
void
nsImageGTK::DrawCompositeTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY,
@ -1632,7 +1632,7 @@ void nsImageGTK::SetupGCForAlpha(GdkGC *aGC, PRInt32 aX, PRInt32 aY)
// Draw the bitmap, this draw just has destination coordinates
NS_IMETHODIMP
nsImageGTK::Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight)
{
@ -1686,7 +1686,7 @@ void nsImageGTK::TilePixmap(GdkPixmap *src, GdkPixmap *dest,
NS_IMETHODIMP nsImageGTK::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect)

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

@ -69,11 +69,11 @@ public:
virtual nsColorMap* GetColorMap();
NS_IMETHOD Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
@ -81,7 +81,7 @@ public:
nscoord aDWidth, nscoord aDHeight);
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
@ -156,14 +156,14 @@ private:
unsigned width, unsigned height,
XImage *ximage, unsigned char *readData, unsigned char *srcData);
inline void DrawComposited(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 srcWidth, PRInt32 srcHeight,
PRInt32 dstWidth, PRInt32 dstHeight,
PRInt32 dstOrigX, PRInt32 dstOrigY,
PRInt32 aDX, PRInt32 aDY,
PRInt32 aDWidth, PRInt32 aDHeight);
inline void DrawCompositeTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY,

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

@ -469,7 +469,7 @@ nsNativeThemeGTK::DrawWidgetBackground(nsIRenderingContext* aContext,
return NS_OK;
nsDrawingSurfaceGTK* surface;
aContext->GetDrawingSurface((nsDrawingSurface*)&surface);
aContext->GetDrawingSurface((nsIDrawingSurface**)&surface);
GdkWindow* window = (GdkWindow*) surface->GetDrawable();
nsTransform2D* transformMatrix;

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

@ -185,7 +185,7 @@ NS_IMETHODIMP nsRenderingContextGTK::Init(nsIDeviceContext* aContext,
}
NS_IMETHODIMP nsRenderingContextGTK::Init(nsIDeviceContext* aContext,
nsDrawingSurface aSurface)
nsIDrawingSurface* aSurface)
{
mContext = aContext;
NS_IF_ADDREF(mContext);
@ -246,7 +246,7 @@ NS_IMETHODIMP nsRenderingContextGTK::UnlockDrawingSurface(void)
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextGTK::SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
NS_IMETHODIMP nsRenderingContextGTK::SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{
if (nsnull == aSurface)
mSurface = mOffscreenSurface;
@ -256,7 +256,7 @@ NS_IMETHODIMP nsRenderingContextGTK::SelectOffScreenDrawingSurface(nsDrawingSurf
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextGTK::GetDrawingSurface(nsDrawingSurface *aSurface)
NS_IMETHODIMP nsRenderingContextGTK::GetDrawingSurface(nsIDrawingSurface* *aSurface)
{
*aSurface = mSurface;
return NS_OK;
@ -794,7 +794,7 @@ NS_IMETHODIMP nsRenderingContextGTK::GetCurrentTransform(nsTransform2D *&aTransf
NS_IMETHODIMP nsRenderingContextGTK::CreateDrawingSurface(const nsRect &aBounds,
PRUint32 aSurfFlags,
nsDrawingSurface &aSurface)
nsIDrawingSurface* &aSurface)
{
if (nsnull == mSurface) {
aSurface = nsnull;
@ -818,12 +818,12 @@ NS_IMETHODIMP nsRenderingContextGTK::CreateDrawingSurface(const nsRect &aBounds,
rv = NS_ERROR_FAILURE;
}
aSurface = (nsDrawingSurface)surf;
aSurface = surf;
return rv;
}
NS_IMETHODIMP nsRenderingContextGTK::DestroyDrawingSurface(nsDrawingSurface aDS)
NS_IMETHODIMP nsRenderingContextGTK::DestroyDrawingSurface(nsIDrawingSurface* aDS)
{
nsDrawingSurfaceGTK *surf = (nsDrawingSurfaceGTK *) aDS;
@ -1334,7 +1334,7 @@ nsRenderingContextGTK::DrawString(const nsString& aString,
}
NS_IMETHODIMP
nsRenderingContextGTK::CopyOffScreenBits(nsDrawingSurface aSrcSurf,
nsRenderingContextGTK::CopyOffScreenBits(nsIDrawingSurface* aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds,
PRUint32 aCopyFlags)
@ -1446,7 +1446,7 @@ NS_IMETHODIMP nsRenderingContextGTK::DrawImage(imgIContainer *aImage, const nsRe
return nsRenderingContextImpl::DrawImage(aImage, aSrcRect, aDestRect);
}
NS_IMETHODIMP nsRenderingContextGTK::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer)
NS_IMETHODIMP nsRenderingContextGTK::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer)
{
// Do not cache the backbuffer. On GTK it is more efficient to allocate
// the backbuffer as needed and it doesn't cause a performance hit. @see bug 95952

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

@ -68,7 +68,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD Reset(void);
@ -79,8 +79,8 @@ public:
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
#if 0
@ -112,8 +112,8 @@ public:
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
@ -188,13 +188,13 @@ public:
nsTextDimensions& aLastWordDimensions,
PRInt32* aFontID);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
NS_IMETHOD DrawImage(imgIContainer *aImage, const nsRect & aSrcRect, const nsRect & aDestRect);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer);
NS_IMETHOD ReleaseBackbuffer(void);
#ifdef MOZ_MATHML

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

@ -67,7 +67,7 @@ public:
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
void SetDrawingSurface(nsDrawingSurface aSurface) { mSurface = aSurface; }
void SetDrawingSurface(nsIDrawingSurface* aSurface) { mSurface = aSurface; }
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
NS_IMETHOD GetDepth(PRUint32& aDepth);
@ -99,7 +99,7 @@ protected:
void FindScreenForSurface ( nsIScreen** outScreen ) ;
nsDrawingSurface mSurface;
nsIDrawingSurface* mSurface;
Rect mPageRect;
nsCOMPtr<nsIDeviceContextSpec> mSpec;
GrafPtr mOldPort;

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

@ -214,7 +214,7 @@ NS_IMETHODIMP nsDrawingSurfaceMac::GetPixelFormat(nsPixelFormat *aFormat)
* @update 3/02/99 dwc
* @return error status
*/
NS_IMETHODIMP nsDrawingSurfaceMac::Init(nsDrawingSurface aDS)
NS_IMETHODIMP nsDrawingSurfaceMac::Init(nsIDrawingSurface* aDS)
{
nsDrawingSurfaceMac* surface = static_cast<nsDrawingSurfaceMac*>(aDS);
surface->GetGrafPtr(&mPort);

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

@ -66,7 +66,7 @@ public:
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat);
//nsIDrawingSurfaceMac interface
NS_IMETHOD Init(nsDrawingSurface aDS);
NS_IMETHOD Init(nsIDrawingSurface* aDS);
NS_IMETHOD Init(CGrafPtr aThePort);
NS_IMETHOD Init(nsIWidget *aTheWidget);
NS_IMETHOD Init(PRUint32 aDepth,PRUint32 aWidth, PRUint32 aHeight,PRUint32 aFlags);

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

@ -132,7 +132,7 @@ void nsGraphicState::Clear()
//------------------------------------------------------------------------
void nsGraphicState::Init(nsDrawingSurface aSurface)
void nsGraphicState::Init(nsIDrawingSurface* aSurface)
{
// retrieve the grafPort
nsDrawingSurfaceMac* surface = static_cast<nsDrawingSurfaceMac*>(aSurface);

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

@ -58,7 +58,7 @@ public:
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void Clear();
void Init(nsDrawingSurface aSurface);
void Init(nsIDrawingSurface* aSurface);
void Init(CGrafPtr aPort);
void Init(nsIWidget* aWindow);
void Duplicate(nsGraphicState* aGS); // would you prefer an '=' operator? <anonymous>

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

@ -60,7 +60,7 @@ public:
* @param aPort GrafPtr to initialize drawing surface with
* @return error status
**/
NS_IMETHOD Init(nsDrawingSurface aDS) = 0;
NS_IMETHOD Init(nsIDrawingSurface* aDS) = 0;
/**
* Initialize a drawing surface using a Macintosh GrafPtr.

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

@ -226,7 +226,7 @@ void nsImageMac::ImageUpdated(nsIDeviceContext *aContext, PRUint8 aFlags, nsRect
* See documentation in nsImageMac.h
* @update
*/
NS_IMETHODIMP nsImageMac::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY,
NS_IMETHODIMP nsImageMac::Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
Rect srcRect, dstRect, maskRect;
@ -430,7 +430,7 @@ NS_IMETHODIMP nsImageMac::Draw(nsIRenderingContext &aContext, nsDrawingSurface a
* @update
*/
NS_IMETHODIMP nsImageMac::Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight)
{
@ -1393,7 +1393,7 @@ nsImageMac::MakeIconType(PRInt32 aHeight, PRInt32 aDepth, PRBool aMask)
}
nsresult nsImageMac::SlowTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect)
@ -1452,7 +1452,7 @@ nsresult nsImageMac::SlowTile(nsIRenderingContext &aContext,
// work when printing).
nsresult nsImageMac::DrawTileQuickly(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
const nsRect &aTileRect)
{
@ -1728,7 +1728,7 @@ nsresult nsImageMac::DrawTileQuickly(nsIRenderingContext &aContext,
NS_IMETHODIMP nsImageMac::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect)

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

@ -71,15 +71,15 @@ public:
virtual nsresult Optimize(nsIDeviceContext* aContext);
virtual nsColorMap* GetColorMap() { return nsnull; }
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
@ -128,13 +128,13 @@ protected:
nsresult SlowTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
nsresult DrawTileQuickly(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
const nsRect &aTileRect);

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

@ -292,7 +292,7 @@ nsNativeThemeMac::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame*
PRUint8 aWidgetType, const nsRect& aRect, const nsRect& aClipRect)
{
// setup to draw into the correct port
nsDrawingSurface surf;
nsIDrawingSurface* surf;
aContext->GetDrawingSurface(&surf);
nsDrawingSurfaceMac* macSurface = (nsDrawingSurfaceMac*)surf;
CGrafPtr port = nsnull;

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

@ -146,7 +146,7 @@ NS_IMETHODIMP nsRenderingContextMac::Init(nsIDeviceContext* aContext, nsIWidget*
//------------------------------------------------------------------------
// should only be called for an offscreen drawing surface, without an offset or clip region
NS_IMETHODIMP nsRenderingContextMac::Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface)
NS_IMETHODIMP nsRenderingContextMac::Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface)
{
// make sure all allocations in the constructor succeeded.
if (nsnull == mFrontSurface)
@ -374,7 +374,7 @@ NS_IMETHODIMP nsRenderingContextMac::UnlockDrawingSurface(void)
//------------------------------------------------------------------------
NS_IMETHODIMP nsRenderingContextMac::SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
NS_IMETHODIMP nsRenderingContextMac::SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{
nsDrawingSurfaceMac* surface = static_cast<nsDrawingSurfaceMac*>(aSurface);
@ -388,7 +388,7 @@ NS_IMETHODIMP nsRenderingContextMac::SelectOffScreenDrawingSurface(nsDrawingSurf
//------------------------------------------------------------------------
NS_IMETHODIMP nsRenderingContextMac::GetDrawingSurface(nsDrawingSurface *aSurface)
NS_IMETHODIMP nsRenderingContextMac::GetDrawingSurface(nsIDrawingSurface* *aSurface)
{
*aSurface = mCurrentSurface;
// on Mac, select it too, to ensure that the port gets set correct for
@ -399,7 +399,7 @@ NS_IMETHODIMP nsRenderingContextMac::GetDrawingSurface(nsDrawingSurface *aSurfac
//------------------------------------------------------------------------
NS_IMETHODIMP nsRenderingContextMac::CopyOffScreenBits(nsDrawingSurface aSrcSurf,
NS_IMETHODIMP nsRenderingContextMac::CopyOffScreenBits(nsIDrawingSurface* aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds,
PRUint32 aCopyFlags)
@ -493,7 +493,7 @@ NS_IMETHODIMP nsRenderingContextMac::CopyOffScreenBits(nsDrawingSurface aSrcSurf
//------------------------------------------------------------------------
NS_IMETHODIMP nsRenderingContextMac::CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface)
NS_IMETHODIMP nsRenderingContextMac::CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface)
{
aSurface = nsnull;
@ -522,7 +522,7 @@ NS_IMETHODIMP nsRenderingContextMac::CreateDrawingSurface(const nsRect& aBounds,
//------------------------------------------------------------------------
NS_IMETHODIMP nsRenderingContextMac::DestroyDrawingSurface(nsDrawingSurface aSurface)
NS_IMETHODIMP nsRenderingContextMac::DestroyDrawingSurface(nsIDrawingSurface* aSurface)
{
if (!aSurface)
return NS_ERROR_FAILURE;

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

@ -70,7 +70,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD Reset(void);
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext);
@ -78,8 +78,8 @@ public:
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
NS_IMETHOD PushState(void);
NS_IMETHOD PopState(void);
@ -99,8 +99,8 @@ public:
NS_IMETHOD Translate(nscoord aX, nscoord aY);
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
NS_IMETHOD DrawRect(const nsRect& aRect);
@ -143,7 +143,7 @@ public:
NS_IMETHOD GetTextDimensions(const PRUnichar *aString, PRUint32 aLength,
nsTextDimensions& aDimensions, PRInt32 *aFontID);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);

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

@ -134,9 +134,9 @@ static void rangeCheck(nsIDrawingSurface* surface, PRInt32& aX, PRInt32& aY, PRI
* @update 2/25/00 dwc
*/
NS_IMETHODIMP
nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsDrawingSurface aSrc,
nsDrawingSurface aDst, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsDrawingSurface aSecondSrc, nscolor aSrcBackColor,
nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIDrawingSurface* aSrc,
nsIDrawingSurface* aDst, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsIDrawingSurface* aSecondSrc, nscolor aSrcBackColor,
nscolor aSecondSrcBackColor)
{
NS_ASSERTION(aSrc, "nsBlender::Blend() called with nsnull aSrc");
@ -160,13 +160,9 @@ nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsDr
nsresult result = NS_ERROR_FAILURE;
nsIDrawingSurface* srcSurface = (nsIDrawingSurface *)aSrc;
nsIDrawingSurface* destSurface = (nsIDrawingSurface *)aDst;
nsIDrawingSurface* secondSrcSurface = (nsIDrawingSurface *)aSecondSrc;
// range check the coordinates in both the source and destination buffers.
rangeCheck(srcSurface, aSX, aSY, aWidth, aHeight);
rangeCheck(destSurface, aDX, aDY, aWidth, aHeight);
rangeCheck(aSrc, aSX, aSY, aWidth, aHeight);
rangeCheck(aDst, aDX, aDY, aWidth, aHeight);
PRUint8* srcBytes = nsnull;
PRUint8* secondSrcBytes = nsnull;
@ -174,14 +170,14 @@ nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsDr
PRInt32 srcSpan, destSpan, secondSrcSpan;
PRInt32 srcRowBytes, destRowBytes, secondSrcRowBytes;
result = srcSurface->Lock(aSX, aSY, aWidth, aHeight, (void**)&srcBytes, &srcRowBytes, &srcSpan, NS_LOCK_SURFACE_READ_ONLY);
result = aSrc->Lock(aSX, aSY, aWidth, aHeight, (void**)&srcBytes, &srcRowBytes, &srcSpan, NS_LOCK_SURFACE_READ_ONLY);
if (NS_SUCCEEDED(result)) {
result = destSurface->Lock(aDX, aDY, aWidth, aHeight, (void**)&destBytes, &destRowBytes, &destSpan, 0);
result = aDst->Lock(aDX, aDY, aWidth, aHeight, (void**)&destBytes, &destRowBytes, &destSpan, 0);
if (NS_SUCCEEDED(result)) {
NS_ASSERTION(srcSpan == destSpan, "Mismatched bitmap formats (src/dest) in Blender");
if (srcSpan == destSpan) {
if (secondSrcSurface) {
result = secondSrcSurface->Lock(aSX, aSY, aWidth, aHeight, (void**)&secondSrcBytes, &secondSrcRowBytes, &secondSrcSpan, NS_LOCK_SURFACE_READ_ONLY);
if (aSecondSrc) {
result = aSecondSrc->Lock(aSX, aSY, aWidth, aHeight, (void**)&secondSrcBytes, &secondSrcRowBytes, &secondSrcSpan, NS_LOCK_SURFACE_READ_ONLY);
if (NS_SUCCEEDED(result)) {
NS_ASSERTION(srcSpan == secondSrcSpan && srcRowBytes == secondSrcRowBytes,
"Mismatched bitmap formats (src/secondSrc) in Blender");
@ -192,7 +188,7 @@ nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsDr
srcSpan, aHeight, aSrcOpacity);
}
secondSrcSurface->Unlock();
aSecondSrc->Unlock();
}
}
else
@ -204,10 +200,10 @@ nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsDr
}
}
destSurface->Unlock();
aDst->Unlock();
}
srcSurface->Unlock();
aSrc->Unlock();
}
return result;
@ -223,7 +219,7 @@ NS_IMETHODIMP nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32
nscolor aSecondSrcBackColor)
{
// just hand off to the drawing surface blender, to make code easier to maintain.
nsDrawingSurface srcSurface, destSurface, secondSrcSurface = nsnull;
nsIDrawingSurface* srcSurface, *destSurface, *secondSrcSurface = nsnull;
aSrc->GetDrawingSurface(&srcSurface);
aDest->GetDrawingSurface(&destSurface);
if (aSecondSrc != nsnull)
@ -234,8 +230,8 @@ NS_IMETHODIMP nsBlender::Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32
}
#ifndef MOZ_XUL
NS_IMETHODIMP nsBlender::GetAlphas(const nsRect& aRect, nsDrawingSurface aBlack,
nsDrawingSurface aWhite, PRUint8** aAlphas) {
NS_IMETHODIMP nsBlender::GetAlphas(const nsRect& aRect, nsIDrawingSurface* aBlack,
nsIDrawingSurface* aWhite, PRUint8** aAlphas) {
NS_ERROR("GetAlphas not implemented because XUL support not built");
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -350,8 +346,8 @@ static void ComputeAlphas(PRInt32 aNumLines, PRInt32 aBytesPerLine,
}
}
NS_IMETHODIMP nsBlender::GetAlphas(const nsRect& aRect, nsDrawingSurface aBlack,
nsDrawingSurface aWhite, PRUint8** aAlphas) {
NS_IMETHODIMP nsBlender::GetAlphas(const nsRect& aRect, nsIDrawingSurface* aBlack,
nsIDrawingSurface* aWhite, PRUint8** aAlphas) {
nsresult result;
nsIDrawingSurface* blackSurface = (nsIDrawingSurface *)aBlack;

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

@ -67,17 +67,17 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext *aContext);
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsDrawingSurface aSrc,
nsDrawingSurface aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsDrawingSurface aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsIDrawingSurface* aSrc,
nsIDrawingSurface* aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsIDrawingSurface* aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0));
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIRenderingContext *aSrc,
nsIRenderingContext *aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
nsIRenderingContext *aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0));
NS_IMETHOD GetAlphas(const nsRect& aRect, nsDrawingSurface aBlack,
nsDrawingSurface aWhite, PRUint8** aAlphas);
NS_IMETHOD GetAlphas(const nsRect& aRect, nsIDrawingSurface* aBlack,
nsIDrawingSurface* aWhite, PRUint8** aAlphas);
protected:

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

@ -166,7 +166,7 @@ NS_IMETHODIMP DeviceContextImpl::CreateRenderingContext(nsIView *aView, nsIRende
return rv;
}
NS_IMETHODIMP DeviceContextImpl::CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext)
NS_IMETHODIMP DeviceContextImpl::CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext)
{
#ifdef NS_PRINT_PREVIEW
// AltDC NEVER use widgets to create their DCs
@ -246,7 +246,7 @@ nsresult DeviceContextImpl::InitRenderingContext(nsIRenderingContext *aContext,
#endif
}
nsresult DeviceContextImpl::InitRenderingContext(nsIRenderingContext *aContext, nsDrawingSurface aSurface)
nsresult DeviceContextImpl::InitRenderingContext(nsIRenderingContext *aContext, nsIDrawingSurface* aSurface)
{
#ifdef NS_PRINT_PREVIEW
// there are a couple of cases where the kUseAltDCFor_CREATERC_xxx flag has been turned off

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

@ -90,7 +90,7 @@ public:
*/
NS_IMETHOD SetPenMode(nsPenMode aPenMode) { return NS_ERROR_FAILURE;};
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer);
NS_IMETHOD ReleaseBackbuffer(void);
NS_IMETHOD DestroyCachedBackbuffer(void);
NS_IMETHOD UseBackbuffer(PRBool* aUseBackbuffer);
@ -159,14 +159,14 @@ protected:
* @param aBackbuffer drawing surface used as the backbuffer
* @param aCacheBackbuffer PR_TRUE then the backbuffer will be cached, if PR_FALSE it is created each time
*/
nsresult AllocateBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer, PRBool aCacheBackbuffer);
nsresult AllocateBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer, PRBool aCacheBackbuffer);
public:
protected:
nsPenMode mPenMode;
private:
static nsDrawingSurface gBackbuffer; //singleton backbuffer
static nsIDrawingSurface* gBackbuffer; //singleton backbuffer
static nsRect gBackbufferBounds; //backbuffer bounds
// Largest requested offscreen size if larger than a full screen.
static nsSize gLargestRequestedSize;

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

@ -98,7 +98,7 @@ protected:
PRBool mCachedFullRect;
PRBool mPrintingStarted;
nsDrawingSurface mSurface;
nsIDrawingSurface* mSurface;
PRUint32 mDepth; // bit depth of device
PRBool mIsPaletteDevice;
PRInt32 mWidth;

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

@ -64,8 +64,6 @@ class nsFontOS2;
// the palette when it's dying.
//
// This is rather unwieldy...
//
// Note: |nsDrawingSurface| == (void*)(nsDrawingSurfaceOS2*)surf
class nsDrawingSurfaceOS2 : public nsIDrawingSurface
{

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

@ -57,7 +57,7 @@ public:
* @param aSurface out parameter for new drawing surface
* @result error status
*/
NS_IMETHOD CreateDrawingSurface(HPS aPS, nsDrawingSurface &aSurface, nsIWidget *aWidget) = 0;
NS_IMETHOD CreateDrawingSurface(HPS aPS, nsIDrawingSurface* &aSurface, nsIWidget *aWidget) = 0;
};
#endif /* nsIRenderingContextOS2_h___ */

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

@ -258,7 +258,7 @@ void nsImageOS2::BuildBlenderLookup (void)
}
nsresult nsImageOS2::Draw( nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight)
{
@ -293,7 +293,7 @@ void nsImageOS2 :: DrawComposited24(unsigned char *aBits,
}
NS_IMETHODIMP
nsImageOS2 :: Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
nsImageOS2 :: Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
@ -713,7 +713,7 @@ nsImageOS2::BuildTile (HPS hpsTile, PRUint8* pImageBits, PBITMAPINFO2 pBitmapInf
* @update 3/16/00 dwc
*/
NS_IMETHODIMP nsImageOS2::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect)

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

@ -70,8 +70,8 @@ public:
virtual PRBool GetHasAlphaMask() { return mAlphaBits != nsnull; }
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
virtual nsColorMap* GetColorMap() {return mColorMap;}
virtual void ImageUpdated(nsIDeviceContext *aContext, PRUint8 aFlags, nsRect *aUpdateRect);
@ -89,7 +89,7 @@ public:
* @return if TRUE, no errors
*/
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
@ -160,7 +160,7 @@ public:
* @update dc - 10/29/98
* @param aSurface - The drawingsurface to create the DDB from.
*/
void CreateDDB(nsDrawingSurface aSurface);
void CreateDDB(nsIDrawingSurface* aSurface);
/**
@ -182,7 +182,7 @@ public:
* @param aWidth - width of DIB
* @param aHeight - height of DIB
*/
nsresult PrintDDB(nsDrawingSurface aSurface,PRInt32 aX,PRInt32 aY,PRInt32 aWidth,PRInt32 aHeight);
nsresult PrintDDB(nsIDrawingSurface* aSurface,PRInt32 aX,PRInt32 aY,PRInt32 aWidth,PRInt32 aHeight);
/**

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

@ -240,7 +240,7 @@ nsRenderingContextOS2::Init( nsIDeviceContext *aContext,
NS_IMETHODIMP
nsRenderingContextOS2::Init( nsIDeviceContext *aContext,
nsDrawingSurface aSurface)
nsIDrawingSurface* aSurface)
{
mContext = aContext;
NS_IF_ADDREF(mContext);
@ -332,7 +332,7 @@ NS_IMETHODIMP nsRenderingContextOS2::UnlockDrawingSurface()
}
NS_IMETHODIMP
nsRenderingContextOS2::SelectOffScreenDrawingSurface( nsDrawingSurface aSurface)
nsRenderingContextOS2::SelectOffScreenDrawingSurface( nsIDrawingSurface* aSurface)
{
if (aSurface != mSurface)
{
@ -359,10 +359,8 @@ nsRenderingContextOS2::SelectOffScreenDrawingSurface( nsDrawingSurface aSurface)
return NS_OK;
}
// !! This is a bit dodgy; nsDrawingSurface *really* needs to be XP-comified
// !! properly...
NS_IMETHODIMP
nsRenderingContextOS2::GetDrawingSurface( nsDrawingSurface *aSurface)
nsRenderingContextOS2::GetDrawingSurface( nsIDrawingSurface* *aSurface)
{
*aSurface = mSurface;
return NS_OK;
@ -784,7 +782,7 @@ NS_IMETHODIMP nsRenderingContextOS2::GetCurrentTransform( nsTransform2D *&aTrans
// position oughtn't to be ignored, but for all intents & purposes can be.
//
NS_IMETHODIMP nsRenderingContextOS2::CreateDrawingSurface(const nsRect& aBounds,
PRUint32 aSurfFlags, nsDrawingSurface &aSurface)
PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface)
{
nsresult rc = NS_ERROR_FAILURE;
@ -798,7 +796,7 @@ NS_IMETHODIMP nsRenderingContextOS2::CreateDrawingSurface(const nsRect& aBounds,
if(NS_SUCCEEDED(rc))
{
NS_ADDREF(surf);
aSurface = (void*)((nsDrawingSurfaceOS2 *) surf);
aSurface = surf;
}
else
delete surf;
@ -806,7 +804,7 @@ NS_IMETHODIMP nsRenderingContextOS2::CreateDrawingSurface(const nsRect& aBounds,
return rc;
}
NS_IMETHODIMP nsRenderingContextOS2::CreateDrawingSurface(HPS aPS, nsDrawingSurface &aSurface, nsIWidget *aWidget)
NS_IMETHODIMP nsRenderingContextOS2::CreateDrawingSurface(HPS aPS, nsIDrawingSurface* &aSurface, nsIWidget *aWidget)
{
nsWindowSurface *surf = new nsWindowSurface();
@ -816,12 +814,12 @@ NS_IMETHODIMP nsRenderingContextOS2::CreateDrawingSurface(HPS aPS, nsDrawingSurf
surf->Init(aPS, aWidget);
}
aSurface = (nsDrawingSurface)surf;
aSurface = surf;
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextOS2::DestroyDrawingSurface( nsDrawingSurface aDS)
NS_IMETHODIMP nsRenderingContextOS2::DestroyDrawingSurface( nsIDrawingSurface* aDS)
{
nsDrawingSurfaceOS2 *surf = (nsDrawingSurfaceOS2 *) aDS;
nsresult rc = NS_ERROR_NULL_POINTER;
@ -2254,7 +2252,7 @@ nsRenderingContextOS2::GetBoundingMetrics(const PRUnichar* aString,
#endif // MOZ_MATHML
NS_IMETHODIMP nsRenderingContextOS2::CopyOffScreenBits(
nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags)
{
NS_ASSERTION( aSrcSurf && mSurface && mMainSurface, "bad surfaces");

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

@ -80,7 +80,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD Reset(void);
@ -91,8 +91,8 @@ public:
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
NS_IMETHOD PushState(void);
@ -121,8 +121,8 @@ public:
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
@ -197,12 +197,12 @@ public:
PRInt32 aFontID,
const nscoord* aSpacing);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
//~~~
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
NS_IMETHOD CreateDrawingSurface(HPS aPS, nsDrawingSurface &aSurface, nsIWidget *aWidget);
NS_IMETHOD CreateDrawingSurface(HPS aPS, nsIDrawingSurface* &aSurface, nsIWidget *aWidget);
#ifdef MOZ_MATHML
NS_IMETHOD

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

@ -89,7 +89,7 @@ public:
//in the device context for re-use.
inline
NS_IMETHODIMP GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface)
NS_IMETHODIMP GetDrawingSurface(nsIRenderingContext &aContext, nsIDrawingSurface* &aSurface)
{
nsRect aRect;
GetClientRect( aRect );
@ -130,7 +130,7 @@ protected:
void CommonInit(nsNativeDeviceContext aDC);
void GetPrinterRect(int *width, int *height);
nsDrawingSurface mSurface;
nsIDrawingSurface* mSurface;
PRUint32 mDepth; // bit depth of device
float mPixelScale;
PRInt16 mScrollbarHeight;

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

@ -258,7 +258,7 @@ nsresult nsImagePh :: Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth,nsMas
* @param aDHeight - destination height
* @result NS_OK if the draw worked
*/
NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
@ -400,7 +400,7 @@ NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsDrawingSurface
return NS_OK;
}
NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
PhPoint_t pos = { aX, aY };
@ -441,7 +441,7 @@ NS_IMETHODIMP nsImagePh :: Draw(nsIRenderingContext &aContext, nsDrawingSurface
}
/* New Tile code *********************************************************************/
NS_IMETHODIMP nsImagePh::DrawTile( nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImagePh::DrawTile( nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset, PRInt32 aPadX, PRInt32 aPadY, const nsRect &aTileRect )
{
PhPoint_t pos, space, rep;

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

@ -86,14 +86,14 @@ public:
virtual nsColorMap* GetColorMap() { return nsnull; }
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, \
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, \
PRInt32 aSHeight, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
NS_IMETHOD DrawToImage(nsIImage* aDstImage, nscoord aDX, nscoord aDY,
nscoord aDWidth, nscoord aDHeight);
NS_IMETHOD DrawTile(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHOD DrawTile(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset, PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);

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

@ -429,7 +429,7 @@ NS_IMETHODIMP nsRenderingContextPh :: SetFont( nsIFontMetrics *aFontMetrics )
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextPh :: CreateDrawingSurface( const nsRect &aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface )
NS_IMETHODIMP nsRenderingContextPh :: CreateDrawingSurface( const nsRect &aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface )
{
if( nsnull == mSurface ) {
aSurface = nsnull;
@ -444,7 +444,7 @@ NS_IMETHODIMP nsRenderingContextPh :: CreateDrawingSurface( const nsRect &aBound
else
return NS_ERROR_FAILURE;
aSurface = (nsDrawingSurface) surf;
aSurface = surf;
return NS_OK;
}
@ -859,7 +859,7 @@ NS_IMETHODIMP nsRenderingContextPh::DrawImage( nsIImage *aImage, const nsRect& a
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP nsRenderingContextPh :: CopyOffScreenBits( nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY, const nsRect &aDestBounds, PRUint32 aCopyFlags )
NS_IMETHODIMP nsRenderingContextPh :: CopyOffScreenBits( nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY, const nsRect &aDestBounds, PRUint32 aCopyFlags )
{
PhArea_t darea, sarea;
PRInt32 srcX = aSrcX;

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

@ -75,7 +75,7 @@ public:
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
inline
NS_IMETHODIMP Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface)
NS_IMETHODIMP Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface)
{
mContext = aContext;
NS_IF_ADDREF(mContext);
@ -117,14 +117,14 @@ public:
}
inline
NS_IMETHODIMP SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
NS_IMETHODIMP SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{ mSurface = ( nsnull==aSurface ) ? mOffscreenSurface : (nsDrawingSurfacePh *) aSurface;
mSurfaceDC = mSurface->Select( );
return NS_OK;
}
inline
NS_IMETHODIMP GetDrawingSurface(nsDrawingSurface *aSurface) { *aSurface = (void *) mSurface; return NS_OK; }
NS_IMETHODIMP GetDrawingSurface(nsIDrawingSurface* *aSurface) { *aSurface = mSurface; return NS_OK; }
inline
NS_IMETHODIMP GetHints(PRUint32& aResult)
@ -203,10 +203,10 @@ public:
NS_IMETHODIMP GetCurrentTransform(nsTransform2D *&aTransform) { aTransform = mTranMatrix; return NS_OK; }
NS_IMETHOD CreateDrawingSurface(const nsRect &aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD CreateDrawingSurface(const nsRect &aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
inline
NS_IMETHODIMP DestroyDrawingSurface(nsDrawingSurface aDS)
NS_IMETHODIMP DestroyDrawingSurface(nsIDrawingSurface* aDS)
{ nsDrawingSurfacePh *surf = (nsDrawingSurfacePh *) aDS;
NS_IF_RELEASE(surf);
return NS_OK;
@ -345,7 +345,7 @@ public:
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
inline

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

@ -72,7 +72,7 @@ public:
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
/* PostScript module does not support offscreen drawing surfaces */
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext) {return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext) {return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext);
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);
@ -104,7 +104,7 @@ public:
protected:
virtual ~nsDeviceContextPS();
nsDrawingSurface mSurface;
nsIDrawingSurface* mSurface;
PRUint32 mDepth;
nsCOMPtr<nsIDeviceContextSpec> mSpec;
nsCOMPtr<nsIDeviceContext> mParentDeviceContext;

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

@ -225,7 +225,7 @@ NS_IMETHODIMP nsRenderingContextPS :: UnlockDrawingSurface(void)
* @update 12/21/98 dwc
*/
NS_IMETHODIMP
nsRenderingContextPS :: SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
nsRenderingContextPS :: SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{
return NS_OK;
}
@ -235,7 +235,7 @@ nsRenderingContextPS :: SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
* @update 12/21/98 dwc
*/
NS_IMETHODIMP
nsRenderingContextPS :: GetDrawingSurface(nsDrawingSurface *aSurface)
nsRenderingContextPS :: GetDrawingSurface(nsIDrawingSurface* *aSurface)
{
*aSurface = nsnull;
return NS_OK;
@ -565,7 +565,7 @@ nsRenderingContextPS :: GetCurrentTransform(nsTransform2D *&aTransform)
* @update 12/21/98 dwc
*/
NS_IMETHODIMP
nsRenderingContextPS :: CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface)
nsRenderingContextPS :: CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface)
{
return NS_OK; // offscreen test
}
@ -575,7 +575,7 @@ nsRenderingContextPS :: CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSu
* @update 12/21/98 dwc
*/
NS_IMETHODIMP
nsRenderingContextPS :: DestroyDrawingSurface(nsDrawingSurface aDS)
nsRenderingContextPS :: DestroyDrawingSurface(nsIDrawingSurface* aDS)
{
return NS_OK; // offscreen test
}
@ -1288,7 +1288,7 @@ nsRenderingContextPS::GetBoundingMetrics(const PRUnichar* aString,
* See documentation in nsIRenderingContext.h
* @update 12/21/98 dwc
*/
NS_IMETHODIMP nsRenderingContextPS :: CopyOffScreenBits(nsDrawingSurface aSrcSurf,
NS_IMETHODIMP nsRenderingContextPS :: CopyOffScreenBits(nsIDrawingSurface* aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds,
PRUint32 aCopyFlags)

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

@ -71,7 +71,7 @@ public:
// nsIRenderingContext
NS_IMETHOD Init(nsIDeviceContext* aContext);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWidget) {return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface) {return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface) {return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD Reset(void);
@ -82,8 +82,8 @@ public:
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
NS_IMETHOD PushState(void);
@ -112,8 +112,8 @@ public:
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
@ -208,7 +208,7 @@ public:
NS_IMETHOD DrawImage(imgIContainer *aImage,
const nsRect & aSrcRect, const nsRect & aDestRect);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);

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

@ -43,7 +43,7 @@
#include <stdlib.h>
nsDrawingSurface nsRenderingContextImpl::gBackbuffer = nsnull;
nsIDrawingSurface* nsRenderingContextImpl::gBackbuffer = nsnull;
nsRect nsRenderingContextImpl::gBackbufferBounds = nsRect(0, 0, 0, 0);
nsSize nsRenderingContextImpl::gLargestRequestedSize = nsSize(0, 0);
@ -72,7 +72,7 @@ nsRenderingContextImpl :: ~nsRenderingContextImpl()
}
NS_IMETHODIMP nsRenderingContextImpl::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer)
NS_IMETHODIMP nsRenderingContextImpl::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer)
{
// Default implementation assumes the backbuffer will be cached.
// If the platform implementation does not require the backbuffer to
@ -81,7 +81,7 @@ NS_IMETHODIMP nsRenderingContextImpl::GetBackbuffer(const nsRect &aRequestedSize
return AllocateBackbuffer(aRequestedSize, aMaxSize, aBackbuffer, PR_TRUE);
}
nsresult nsRenderingContextImpl::AllocateBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer, PRBool aCacheBackbuffer)
nsresult nsRenderingContextImpl::AllocateBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer, PRBool aCacheBackbuffer)
{
nsRect newBounds;
nsresult rv = NS_OK;
@ -284,7 +284,7 @@ NS_IMETHODIMP nsRenderingContextImpl::DrawImage(imgIContainer *aImage, const nsR
if (!img) return NS_ERROR_FAILURE;
nsIDrawingSurface *surface = nsnull;
GetDrawingSurface((void**)&surface);
GetDrawingSurface(&surface);
if (!surface) return NS_ERROR_FAILURE;
// For Bug 87819
@ -366,7 +366,7 @@ nsRenderingContextImpl::DrawTile(imgIContainer *aImage,
if (!img) return NS_ERROR_FAILURE;
nsIDrawingSurface *surface = nsnull;
GetDrawingSurface((void**)&surface);
GetDrawingSurface(&surface);
if (!surface) return NS_ERROR_FAILURE;
/* bug 113561 - frame can be smaller than container */

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

@ -571,7 +571,7 @@ NS_IMETHODIMP nsDeviceContextWin :: GetSystemFont(nsSystemFontID anID, nsFont *a
return status;
}
NS_IMETHODIMP nsDeviceContextWin :: GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface)
NS_IMETHODIMP nsDeviceContextWin :: GetDrawingSurface(nsIRenderingContext &aContext, nsIDrawingSurface* &aSurface)
{
if (NULL == mSurface) {
nsRect empty(0,0,0,0); // CreateDrawingSurface(null,...) used width=0,height=0

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

@ -66,7 +66,7 @@ public:
//that is passed in is used to create the drawing surface if there isn't
//already one in the device context. the drawing surface is then cached
//in the device context for re-use.
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface);
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsIDrawingSurface* &aSurface);
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
@ -108,7 +108,7 @@ protected:
PRBool mCachedClientRect;
PRBool mCachedFullRect;
nsDrawingSurface mSurface;
nsIDrawingSurface* mSurface;
PRUint32 mDepth; // bit depth of device
nsPaletteInfo mPaletteInfo;
float mPixelScale;

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

@ -57,7 +57,7 @@ public:
* @param aSurface out parameter for new drawing surface
* @result error status
*/
NS_IMETHOD CreateDrawingSurface(HDC aDC, nsDrawingSurface &aSurface) = 0;
NS_IMETHOD CreateDrawingSurface(HDC aDC, nsIDrawingSurface* &aSurface) = 0;
};
#endif /* nsIRenderingContextWin_h___ */

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

@ -413,7 +413,7 @@ void nsImageWin::CreateImageWithAlphaBits(HDC TheHDC)
* @update 3/27/00 dwc
*/
void
nsImageWin :: CreateDDB(nsDrawingSurface aSurface)
nsImageWin :: CreateDDB(nsIDrawingSurface* aSurface)
{
HDC TheHDC;
@ -452,7 +452,7 @@ nsImageWin :: CreateDDB(nsDrawingSurface aSurface)
* @update 3/27/00 dwc
*/
NS_IMETHODIMP
nsImageWin::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
nsImageWin::Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
@ -587,7 +587,7 @@ nsImageWin::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
nsIDeviceContext *dx;
aContext.GetDeviceContext(dx);
nsDrawingSurface ds;
nsIDrawingSurface* ds;
NS_STATIC_CAST(nsDeviceContextWin*, dx)->GetDrawingSurface(aContext, ds);
nsDrawingSurfaceWin *srcDS = (nsDrawingSurfaceWin *)ds;
@ -783,7 +783,7 @@ nsresult nsImageWin::DrawComposited(HDC TheHDC, int aDX, int aDY,
* See documentation in nsIImageWin.h
* @update 3/27/00 dwc
*/
NS_IMETHODIMP nsImageWin :: Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP nsImageWin :: Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
{
return Draw(aContext, aSurface, 0, 0, mBHead->biWidth, mBHead->biHeight, aX, aY, aWidth, aHeight);
@ -794,7 +794,7 @@ NS_IMETHODIMP nsImageWin :: Draw(nsIRenderingContext &aContext, nsDrawingSurface
* See documentation in nsIRenderingContext.h
*/
NS_IMETHODIMP nsImageWin::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aDestRect)
@ -977,7 +977,7 @@ NS_IMETHODIMP nsImageWin::DrawTile(nsIRenderingContext &aContext,
*/
PRBool
nsImageWin::ProgressiveDoubleBlit(nsIDeviceContext *aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
nsRect aDestRect)
{
@ -1562,7 +1562,7 @@ nsImageWin :: CleanUpDDB()
* @return the result of the operation, if NS_OK, then the pixelmap is unoptimized
*/
nsresult
nsImageWin::PrintDDB(nsDrawingSurface aSurface,PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight,PRUint32 aROP)
nsImageWin::PrintDDB(nsIDrawingSurface* aSurface,PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight,PRUint32 aROP)
{
HDC theHDC;
UINT palType;

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

@ -87,9 +87,9 @@ public:
virtual PRBool GetHasAlphaMask() { return mAlphaBits != nsnull; }
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY,
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface, PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
NS_IMETHOD DrawToImage(nsIImage* aDstImage, nscoord aDX, nscoord aDY,
@ -103,7 +103,7 @@ public:
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
@ -169,7 +169,7 @@ private:
* @update dc - 10/29/98
* @param aSurface - The drawingsurface to create the DDB from.
*/
void CreateDDB(nsDrawingSurface aSurface);
void CreateDDB(nsIDrawingSurface* aSurface);
void DrawComposited24(unsigned char *aBits,
PRUint8 *aImageRGB, PRUint32 aStrideRGB,
@ -197,7 +197,7 @@ private:
* @param aWidth - width of DIB
* @param aHeight - height of DIB
*/
nsresult PrintDDB(nsDrawingSurface aSurface,PRInt32 aX,PRInt32 aY,PRInt32 aWidth,PRInt32 aHeight,PRUint32 aROP);
nsresult PrintDDB(nsIDrawingSurface* aSurface,PRInt32 aX,PRInt32 aY,PRInt32 aWidth,PRInt32 aHeight,PRUint32 aROP);
/**
@ -205,7 +205,7 @@ private:
* @return if TRUE, no errors
*/
PRBool ProgressiveDoubleBlit(nsIDeviceContext *aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
nsRect aDestRect);

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

@ -399,7 +399,7 @@ nsRenderingContextWin :: Init(nsIDeviceContext* aContext,
NS_IMETHODIMP
nsRenderingContextWin :: Init(nsIDeviceContext* aContext,
nsDrawingSurface aSurface)
nsIDrawingSurface* aSurface)
{
NS_PRECONDITION(PR_FALSE == mInitialized, "double init");
@ -570,7 +570,7 @@ NS_IMETHODIMP nsRenderingContextWin :: UnlockDrawingSurface(void)
}
NS_IMETHODIMP
nsRenderingContextWin :: SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
nsRenderingContextWin :: SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{
nsresult rv;
@ -617,7 +617,7 @@ nsRenderingContextWin :: SelectOffScreenDrawingSurface(nsDrawingSurface aSurface
}
NS_IMETHODIMP
nsRenderingContextWin :: GetDrawingSurface(nsDrawingSurface *aSurface)
nsRenderingContextWin :: GetDrawingSurface(nsIDrawingSurface* *aSurface)
{
*aSurface = mSurface;
return NS_OK;
@ -1006,7 +1006,7 @@ NS_IMETHODIMP nsRenderingContextWin :: GetCurrentTransform(nsTransform2D *&aTran
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextWin :: CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface)
NS_IMETHODIMP nsRenderingContextWin :: CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface)
{
nsDrawingSurfaceWin *surf = new nsDrawingSurfaceWin();
@ -1017,12 +1017,12 @@ NS_IMETHODIMP nsRenderingContextWin :: CreateDrawingSurface(const nsRect& aBound
surf->Init(mMainDC, aBounds.width, aBounds.height, aSurfFlags);
}
aSurface = (nsDrawingSurface)surf;
aSurface = surf;
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextWin :: DestroyDrawingSurface(nsDrawingSurface aDS)
NS_IMETHODIMP nsRenderingContextWin :: DestroyDrawingSurface(nsIDrawingSurface* aDS)
{
nsDrawingSurfaceWin *surf = (nsDrawingSurfaceWin *)aDS;
@ -2369,7 +2369,7 @@ nsRenderingContextWin::GetBoundingMetrics(const PRUnichar* aString,
}
#endif // MOZ_MATHML
NS_IMETHODIMP nsRenderingContextWin :: CopyOffScreenBits(nsDrawingSurface aSrcSurf,
NS_IMETHODIMP nsRenderingContextWin :: CopyOffScreenBits(nsIDrawingSurface* aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds,
PRUint32 aCopyFlags)
@ -2734,7 +2734,7 @@ void nsRenderingContextWin :: PushClipState(void)
}
}
NS_IMETHODIMP nsRenderingContextWin :: CreateDrawingSurface(HDC aDC, nsDrawingSurface &aSurface)
NS_IMETHODIMP nsRenderingContextWin :: CreateDrawingSurface(HDC aDC, nsIDrawingSurface* &aSurface)
{
nsDrawingSurfaceWin *surf = new nsDrawingSurfaceWin();
@ -2744,7 +2744,7 @@ NS_IMETHODIMP nsRenderingContextWin :: CreateDrawingSurface(HDC aDC, nsDrawingSu
surf->Init(aDC);
}
aSurface = (nsDrawingSurface)surf;
aSurface = surf;
return NS_OK;
}
@ -2792,7 +2792,7 @@ nsRenderingContextWin::ConditionRect(nsRect& aSrcRect, RECT& aDestRect)
NS_IMETHODIMP
nsRenderingContextWin::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer)
nsRenderingContextWin::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer)
{
// Do not cache the backbuffer. On WIN32 it is faster to get allocate
// the backbuffer as needed. @see bug 95952

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

@ -71,7 +71,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD Reset(void);
@ -82,8 +82,8 @@ public:
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
NS_IMETHOD PushState(void);
@ -112,8 +112,8 @@ public:
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
@ -191,15 +191,15 @@ public:
PRInt32 aFontID,
const nscoord* aSpacing);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
//~~~
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
// nsIRenderingContextWin
NS_IMETHOD CreateDrawingSurface(HDC aDC, nsDrawingSurface &aSurface);
NS_IMETHOD CreateDrawingSurface(HDC aDC, nsIDrawingSurface* &aSurface);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer);
NS_IMETHOD ReleaseBackbuffer(void);

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

@ -55,7 +55,7 @@ public:
{return (DeviceContextImpl::CreateRenderingContext(aView, aContext)); }
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext)
{return (DeviceContextImpl::CreateRenderingContext(aWidget, aContext)); }
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext)
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext)
{return (DeviceContextImpl::CreateRenderingContext(aSurface, aContext));}
NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext);
@ -96,7 +96,7 @@ private:
nsresult CommonInit(void);
PRBool mWriteable;
PRUint32 mNumCells;
nsDrawingSurface mSurface;
nsIDrawingSurface* mSurface;
XlibRgbHandle *mXlibRgbHandle;
Display * mDisplay;
Screen * mScreen;

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

@ -383,7 +383,7 @@ void nsImageXlib::UpdateCachedImage()
NS_IMETHODIMP
nsImageXlib::DrawScaled(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY,
@ -559,7 +559,7 @@ nsImageXlib::DrawScaled(nsIRenderingContext &aContext,
// Draw the bitmap, this method has a source and destination coordinates
NS_IMETHODIMP
nsImageXlib::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
nsImageXlib::Draw(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
{
@ -958,7 +958,7 @@ nsImageXlib::DrawCompositedGeneral(PRBool isLSB, PRBool flipBytes,
void
nsImageXlib::DrawComposited(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY,
@ -1206,7 +1206,7 @@ void nsImageXlib::SetupGCForAlpha(GC aGC, PRInt32 aX, PRInt32 aY)
// Draw the bitmap. This draw just has destination coordinates
NS_IMETHODIMP
nsImageXlib::Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight)
{
@ -1329,7 +1329,7 @@ void nsImageXlib::TilePixmap(Pixmap src, Pixmap dest, PRInt32 aSXOffset,
}
NS_IMETHODIMP nsImageXlib::DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect)

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

@ -63,11 +63,11 @@ public:
virtual nsColorMap* GetColorMap();
NS_IMETHOD Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aX, PRInt32 aY,
PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD Draw(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
@ -75,7 +75,7 @@ public:
nscoord aDWidth, nscoord aDHeight);
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSXOffset, PRInt32 aSYOffset,
PRInt32 aPadX, PRInt32 aPadY,
const nsRect &aTileRect);
@ -118,7 +118,7 @@ private:
void ComputePaletteSize(PRIntn nBitCount);
private:
NS_IMETHODIMP DrawScaled(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
NS_IMETHODIMP DrawScaled(nsIRenderingContext &aContext, nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
@ -146,7 +146,7 @@ private:
unsigned width, unsigned height,
XImage *ximage, unsigned char *readData);
inline void DrawComposited(nsIRenderingContext &aContext,
nsDrawingSurface aSurface,
nsIDrawingSurface* aSurface,
PRInt32 aSX, PRInt32 aSY,
PRInt32 aSWidth, PRInt32 aSHeight,
PRInt32 aDX, PRInt32 aDY,

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

@ -199,7 +199,7 @@ nsRenderingContextXlib::Init(nsIDeviceContext* aContext, nsIWidget *aWindow)
}
NS_IMETHODIMP
nsRenderingContextXlib::Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface)
nsRenderingContextXlib::Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContxtXlib::Init(DeviceContext, DrawingSurface)\n"));
@ -342,7 +342,7 @@ nsRenderingContextXlib::UnlockDrawingSurface(void)
}
NS_IMETHODIMP
nsRenderingContextXlib::SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
nsRenderingContextXlib::SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::SelectOffScreenDrawingSurface()\n"));
if (nsnull == aSurface)
@ -354,7 +354,7 @@ nsRenderingContextXlib::SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
}
NS_IMETHODIMP
nsRenderingContextXlib::GetDrawingSurface(nsDrawingSurface *aSurface)
nsRenderingContextXlib::GetDrawingSurface(nsIDrawingSurface* *aSurface)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::GetDrawingSurface()\n"));
*aSurface = mSurface;
@ -758,7 +758,7 @@ nsRenderingContextXlib::GetCurrentTransform(nsTransform2D *&aTransform)
NS_IMETHODIMP
nsRenderingContextXlib::CreateDrawingSurface(const nsRect& aBounds,
PRUint32 aSurfFlags,
nsDrawingSurface &aSurface)
nsIDrawingSurface* &aSurface)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::CreateDrawingSurface()\n"));
@ -779,13 +779,13 @@ nsRenderingContextXlib::CreateDrawingSurface(const nsRect& aBounds,
rv = surf->Init(mXlibRgbHandle, mGC, aBounds.width, aBounds.height, aSurfFlags);
}
aSurface = (nsDrawingSurface)surf;
aSurface = surf;
return rv;
}
NS_IMETHODIMP
nsRenderingContextXlib::DestroyDrawingSurface(nsDrawingSurface aDS)
nsRenderingContextXlib::DestroyDrawingSurface(nsIDrawingSurface* aDS)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::DestroyDrawingSurface()\n"));
nsIDrawingSurfaceXlib *surf = NS_STATIC_CAST(nsIDrawingSurfaceXlib *, aDS);;
@ -2280,7 +2280,7 @@ nsRenderingContextXlib::DrawString(const nsString& aString,
}
NS_IMETHODIMP
nsRenderingContextXlib::CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
nsRenderingContextXlib::CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::CopyOffScreenBits()\n"));
@ -2517,7 +2517,7 @@ nsRenderingContextXlib::DrawImage(imgIContainer *aImage, const nsRect & aSrcRect
}
NS_IMETHODIMP
nsRenderingContextXlib::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer)
nsRenderingContextXlib::GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer)
{
PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::GetBackbuffer()\n"));
/* Do not cache the backbuffer. On X11 it is more efficient to allocate

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

@ -71,7 +71,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD Reset(void);
@ -82,8 +82,8 @@ public:
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD GetHints(PRUint32& aResult);
NS_IMETHOD PushState(void);
@ -112,8 +112,8 @@ public:
NS_IMETHOD Scale(float aSx, float aSy);
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DestroyDrawingSurface(nsIDrawingSurface* aDS);
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
@ -188,13 +188,13 @@ public:
nsTextDimensions& aLastWordDimensions,
PRInt32* aFontID = nsnull);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
NS_IMETHOD DrawImage(imgIContainer *aImage, const nsRect & aSrcRect, const nsRect & aDestRect);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer);
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsIDrawingSurface* &aBackbuffer);
NS_IMETHOD ReleaseBackbuffer(void);
#ifdef MOZ_MATHML

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

@ -67,9 +67,9 @@ public:
* them, see bug 124761 ("RFE: Make use of "offpaper" drawing surfaces in
* some printing APIs"))
*/
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aSurface, aContext));}
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aSurface, aContext));}
#else
NS_IMETHOD CreateRenderingContext(nsDrawingSurface aSurface, nsIRenderingContext *&aContext) {return NS_ERROR_NOT_IMPLEMENTED;}
NS_IMETHOD CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext) {return NS_ERROR_NOT_IMPLEMENTED;}
#endif /* NOT_NOW */
NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext);
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);

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

@ -101,9 +101,9 @@ NS_IMETHODIMP nsRenderingContextXp::Init(nsIDeviceContext* aContext, nsIWidget *
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsRenderingContextXp::Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface)
NS_IMETHODIMP nsRenderingContextXp::Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface)
{
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface)\n"));
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface)\n"));
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -129,14 +129,14 @@ nsRenderingContextXp::UnlockDrawingSurface(void)
}
NS_IMETHODIMP
nsRenderingContextXp::SelectOffScreenDrawingSurface(nsDrawingSurface aSurface)
nsRenderingContextXp::SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface)
{
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::SelectOffScreenDrawingSurface()\n"));
return NS_OK;
}
NS_IMETHODIMP
nsRenderingContextXp::GetDrawingSurface(nsDrawingSurface *aSurface)
nsRenderingContextXp::GetDrawingSurface(nsIDrawingSurface* *aSurface)
{
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::GetDrawingSurface()\n"));
*aSurface = nsnull;
@ -144,7 +144,7 @@ nsRenderingContextXp::GetDrawingSurface(nsDrawingSurface *aSurface)
}
NS_IMETHODIMP
nsRenderingContextXp::CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface)
nsRenderingContextXp::CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface)
{
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::CreateDrawingSurface()\n"));
aSurface = nsnull;
@ -185,7 +185,7 @@ NS_IMETHODIMP nsRenderingContextXp::DrawImage(imgIContainer *aImage, const nsRec
}
NS_IMETHODIMP
nsRenderingContextXp::CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
nsRenderingContextXp::CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags)
{
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::CopyOffScreenBits()\n"));

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

@ -56,21 +56,21 @@ class nsRenderingContextXp : public nsRenderingContextXlib
NS_IMETHOD Init(nsIDeviceContext* aContext);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIDrawingSurface* aSurface);
NS_IMETHOD LockDrawingSurface(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
PRUint32 aFlags);
NS_IMETHOD UnlockDrawingSurface(void);
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
NS_IMETHOD SelectOffScreenDrawingSurface(nsIDrawingSurface* aSurface);
NS_IMETHOD GetDrawingSurface(nsIDrawingSurface* *aSurface);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
NS_IMETHOD CreateDrawingSurface(const nsRect& aBounds, PRUint32 aSurfFlags, nsIDrawingSurface* &aSurface);
NS_IMETHOD DrawImage(imgIContainer *aImage, const nsRect & aSrcRect, const nsRect & aDestRect);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
NS_IMETHOD CopyOffScreenBits(nsIDrawingSurface* aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RenderPostScriptDataFragment(const unsigned char *aData, unsigned long aDatalen);

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

@ -111,7 +111,7 @@ nsSVGCairoCanvas::Init(nsIRenderingContext *ctx,
NS_ASSERTION(mMozContext, "empty rendering context");
nsDrawingSurfaceGTK *surface;
ctx->GetDrawingSurface((nsDrawingSurface*)&surface);
ctx->GetDrawingSurface((nsIDrawingSurface**)&surface);
surface->GetSize(&mWidth, &mHeight);
GdkDrawable *drawable = surface->GetDrawable();

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

@ -88,7 +88,7 @@ private:
Bitmap *mOffscreenBitmap;
Graphics *mOffscreenGraphics;
HDC mOffscreenHDC;
nsDrawingSurface mTempBuffer; // temp storage for during DC locking
nsIDrawingSurface* mTempBuffer; // temp storage for during DC locking
#endif
};

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

@ -82,7 +82,7 @@ private:
nsRect mBufferRect;
GdkPixbuf *mBuffer;
nsRect mLockRect;
nsDrawingSurface mTempSurface;
nsIDrawingSurface* mTempSurface;
};
/** @} */
@ -194,7 +194,7 @@ nsSVGLibartBitmapGdk::LockRenderingContext(const nsRect& rect, nsIRenderingConte
nsDrawingSurfaceGTK *surface=nsnull;
mRenderingContext->CreateDrawingSurface(rect, NS_CREATEDRAWINGSURFACE_FOR_PIXEL_ACCESS,
(nsDrawingSurface&)surface);
(nsIDrawingSurface*&)surface);
NS_ASSERTION(surface, "could not create drawing surface");
// copy from pixbuf to surface
@ -225,7 +225,7 @@ nsSVGLibartBitmapGdk::UnlockRenderingContext()
{
NS_ASSERTION(mTempSurface, "no temporary surface. multiple unlock calls?");
nsDrawingSurfaceGTK *surface=nsnull;
mRenderingContext->GetDrawingSurface((nsDrawingSurface*)&surface);
mRenderingContext->GetDrawingSurface((nsIDrawingSurface**)&surface);
NS_ASSERTION(surface, "null surface");
mRenderingContext->PopState();
@ -247,7 +247,7 @@ nsSVGLibartBitmapGdk::Flush()
{
nsDrawingSurfaceGTK *surface=nsnull;
mRenderingContext->GetDrawingSurface((nsDrawingSurface*)&surface);
mRenderingContext->GetDrawingSurface((nsIDrawingSurface**)&surface);
NS_ASSERTION(surface, "null drawing surface");
GdkDrawable *drawable = surface->GetDrawable();

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

@ -130,9 +130,9 @@ public:
PRBool mOwnBlackSurface;
// drawing surface for mBlackCX
nsDrawingSurface mBlack;
nsIDrawingSurface* mBlack;
// drawing surface for mWhiteCX
nsDrawingSurface mWhite;
nsIDrawingSurface* mWhite;
// The offset within the current widget at which this buffer will
// eventually be composited
@ -765,7 +765,7 @@ void nsViewManager::Refresh(nsView *aView, nsIRenderingContext *aContext,
}
nsCOMPtr<nsIRenderingContext> localcx;
nsDrawingSurface ds = nsnull;
nsIDrawingSurface* ds = nsnull;
if (nsnull == aContext)
{
@ -1242,7 +1242,7 @@ PRBool nsViewManager::BuildRenderingDisplayList(nsIView* aRootView,
blend directly into the double-buffer offscreen memory.
*/
void nsViewManager::RenderViews(nsView *aRootView, nsIRenderingContext& aRC,
const nsRegion& aRegion, nsDrawingSurface aRCSurface,
const nsRegion& aRegion, nsIDrawingSurface* aRCSurface,
const nsVoidArray& aDisplayList)
{
#ifdef DEBUG_roc
@ -1400,7 +1400,7 @@ void nsViewManager::PaintView(nsView *aView, nsIRenderingContext &aRC, nscoord x
aRC.PopState();
}
static nsresult NewOffscreenContext(nsIDeviceContext* deviceContext, nsDrawingSurface surface,
static nsresult NewOffscreenContext(nsIDeviceContext* deviceContext, nsIDrawingSurface* surface,
const nsRect& aRect, nsIRenderingContext* *aResult)
{
nsresult rv;
@ -1450,7 +1450,7 @@ BlendingBuffers::~BlendingBuffers() {
BlendingBuffers*
nsViewManager::CreateBlendingBuffers(nsIRenderingContext *aRC,
PRBool aBorrowContext,
nsDrawingSurface aBorrowSurface,
nsIDrawingSurface* aBorrowSurface,
PRBool aNeedAlpha,
const nsRect& aRect)
{

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

@ -255,7 +255,7 @@ private:
PRBool BuildRenderingDisplayList(nsIView* aRootView,
const nsRegion& aRegion, nsVoidArray* aDisplayList, PLArenaPool &aPool);
void RenderViews(nsView *aRootView, nsIRenderingContext& aRC,
const nsRegion& aRegion, nsDrawingSurface aRCSurface,
const nsRegion& aRegion, nsIDrawingSurface* aRCSurface,
const nsVoidArray& aDisplayList);
void RenderDisplayListElement(DisplayListElement2* element,
@ -269,7 +269,7 @@ private:
PRUint32 aUpdateFlags, nscoord aY1, nscoord aY2, PRBool aInCutOut);
BlendingBuffers* CreateBlendingBuffers(nsIRenderingContext *aRC, PRBool aBorrowContext,
nsDrawingSurface aBorrowSurface, PRBool aNeedAlpha,
nsIDrawingSurface* aBorrowSurface, PRBool aNeedAlpha,
const nsRect& aArea);
void ReparentViews(DisplayZTreeNode* aNode, nsHashtable &);

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

@ -2874,7 +2874,7 @@ PRBool nsWindow::OnPaint()
if (NS_OK == event.renderingContext->QueryInterface(NS_GET_IID(nsIRenderingContextOS2), (void **)&winrc))
{
nsDrawingSurface surf;
nsIDrawingSurface* surf;
//i know all of this seems a little backwards. i'll fix it, i swear. MMP

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

@ -5036,7 +5036,7 @@ PRBool nsWindow::OnPaint(HDC aDC)
if (NS_OK == event.renderingContext->QueryInterface(NS_GET_IID(nsIRenderingContextWin), (void **)&winrc))
{
nsDrawingSurface surf;
nsIDrawingSurface* surf;
//i know all of this seems a little backwards. i'll fix it, i swear. MMP