mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 579517 follow-up: Remove NSPR types that crept in
This commit is contained in:
parent
515ab47d2d
commit
5c26e8ed2c
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user