Bug 579517 follow-up: Remove NSPR types that crept in

This commit is contained in:
Ehsan Akhgari 2013-09-22 19:14:24 -04:00
parent 515ab47d2d
commit 5c26e8ed2c
2 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@
#include "RasterImage.h"
#include "nsComponentManagerUtils.h"
#include "nsISupportsPrimitives.h"
#include "nsXPCOMCID.h"
using namespace mozilla::image;
@ -16,8 +17,8 @@ void
ImageMetadata::SetOnImage(RasterImage* image)
{
if (mHotspotX != -1 && mHotspotY != -1) {
nsCOMPtr<nsISupportsPRUint32> intwrapx = do_CreateInstance("@mozilla.org/supports-PRUint32;1");
nsCOMPtr<nsISupportsPRUint32> intwrapy = do_CreateInstance("@mozilla.org/supports-PRUint32;1");
nsCOMPtr<nsISupportsPRUint32> intwrapx = do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID);
nsCOMPtr<nsISupportsPRUint32> intwrapy = do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID);
intwrapx->SetData(mHotspotX);
intwrapy->SetData(mHotspotY);
image->Set("hotspotX", intwrapx);

View File

@ -2257,7 +2257,7 @@ nsWindow::UpdateAlpha(gfxPattern* aPattern, nsIntRect aBoundsRect)
int32_t stride = GetAlignedStride<4>(BytesPerPixel(FORMAT_A8) *
aBoundsRect.width);
int32_t bufferSize = stride * aBoundsRect.height;
nsAutoArrayPtr<PRUint8> imageBuffer(new (std::nothrow) PRUint8[bufferSize]);
nsAutoArrayPtr<uint8_t> imageBuffer(new (std::nothrow) uint8_t[bufferSize]);
RefPtr<DrawTarget> drawTarget = gfxPlatform::GetPlatform()->
CreateDrawTargetForData(imageBuffer, ToIntSize(aBoundsRect.Size()),
stride, FORMAT_A8);