diff --git a/gfx/macbuild/gfx.mcp b/gfx/macbuild/gfx.mcp index 0b03d58d439f..a0ac163f50f4 100644 Binary files a/gfx/macbuild/gfx.mcp and b/gfx/macbuild/gfx.mcp differ diff --git a/gfx/src/mac/nsGfxFactoryMac.cpp b/gfx/src/mac/nsGfxFactoryMac.cpp index c22d76f6485c..4b5d27c64dc0 100644 --- a/gfx/src/mac/nsGfxFactoryMac.cpp +++ b/gfx/src/mac/nsGfxFactoryMac.cpp @@ -33,6 +33,7 @@ #include "nsIImageManager.h" #include "nsDeviceContextSpecMac.h" #include "nsDeviceContextSpecFactoryM.h" +#include "nsBlender.h" #include "nsCOMPtr.h" static NS_DEFINE_IID(kCFontMetrics, NS_FONT_METRICS_CID); @@ -44,6 +45,7 @@ static NS_DEFINE_IID(kCScriptableRegion, NS_SCRIPTABLE_REGION_CID); static NS_DEFINE_IID(kCDeviceContextSpec, NS_DEVICE_CONTEXT_SPEC_CID); static NS_DEFINE_IID(kCDeviceContextSpecFactory, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID); static NS_DEFINE_IID(kImageManagerImpl, NS_IMAGEMANAGER_CID); +static NS_DEFINE_IID(kCBlender, NS_BLENDER_CID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); @@ -106,6 +108,9 @@ nsresult nsGfxFactoryMac::CreateInstance(nsISupports *aOuter, else if (mClassID.Equals(kCRegion)) { NS_NEWXPCOM(inst, nsRegionMac); } + else if (mClassID.Equals(kCBlender)) { + NS_NEWXPCOM(inst, nsBlender); + } else if (mClassID.Equals(kCScriptableRegion)) { nsCOMPtr rgn; NS_NEWXPCOM(rgn, nsRegionMac); diff --git a/gfx/src/mac/nsRenderingContextMac.cpp b/gfx/src/mac/nsRenderingContextMac.cpp index f9f9cd1947b4..1eb33cea1cce 100644 --- a/gfx/src/mac/nsRenderingContextMac.cpp +++ b/gfx/src/mac/nsRenderingContextMac.cpp @@ -361,14 +361,22 @@ NS_IMETHODIMP nsRenderingContextMac::LockDrawingSurface(PRInt32 aX, PRInt32 aY, void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes, PRUint32 aFlags) { - return NS_OK; + PushState(); + + return mCurrentSurface->Lock(aX, aY, aWidth, aHeight, + aBits, aStride, aWidthBytes, aFlags); } //------------------------------------------------------------------------ NS_IMETHODIMP nsRenderingContextMac::UnlockDrawingSurface(void) { - return NS_OK; + PRBool clipstate; + PopState(clipstate); + + mCurrentSurface->Unlock(); + + return NS_OK; } //------------------------------------------------------------------------