diff --git a/content/canvas/src/CanvasRenderingContext2D.cpp b/content/canvas/src/CanvasRenderingContext2D.cpp index d58c13f5f0f5..66be67f3b5d8 100644 --- a/content/canvas/src/CanvasRenderingContext2D.cpp +++ b/content/canvas/src/CanvasRenderingContext2D.cpp @@ -4080,7 +4080,7 @@ CanvasRenderingContext2D::MarkContextClean() bool CanvasRenderingContext2D::ShouldForceInactiveLayer(LayerManager *aManager) { - return !aManager->CanUseCanvasLayerForSize(gfxIntSize(mWidth, mHeight)); + return !aManager->CanUseCanvasLayerForSize(IntSize(mWidth, mHeight)); } } diff --git a/content/media/MediaDecoderReader.cpp b/content/media/MediaDecoderReader.cpp index 8baeefd4587e..346e4d4ceb63 100644 --- a/content/media/MediaDecoderReader.cpp +++ b/content/media/MediaDecoderReader.cpp @@ -18,6 +18,7 @@ namespace mozilla { +using namespace mozilla::gfx; using layers::ImageContainer; using layers::PlanarYCbCrImage; using layers::PlanarYCbCrData; @@ -242,18 +243,18 @@ VideoData* VideoData::Create(VideoInfo& aInfo, PlanarYCbCrData data; data.mYChannel = Y.mData + Y.mOffset; - data.mYSize = gfxIntSize(Y.mWidth, Y.mHeight); + data.mYSize = IntSize(Y.mWidth, Y.mHeight); data.mYStride = Y.mStride; data.mYSkip = Y.mSkip; data.mCbChannel = Cb.mData + Cb.mOffset; data.mCrChannel = Cr.mData + Cr.mOffset; - data.mCbCrSize = gfxIntSize(Cb.mWidth, Cb.mHeight); + data.mCbCrSize = IntSize(Cb.mWidth, Cb.mHeight); data.mCbCrStride = Cb.mStride; data.mCbSkip = Cb.mSkip; data.mCrSkip = Cr.mSkip; data.mPicX = aPicture.x; data.mPicY = aPicture.y; - data.mPicSize = gfxIntSize(aPicture.width, aPicture.height); + data.mPicSize = aPicture.Size().ToIntSize(); data.mStereoMode = aInfo.mStereoMode; videoImage->SetDelayedConversion(true); @@ -373,7 +374,7 @@ VideoData* VideoData::Create(VideoInfo& aInfo, GrallocImage* videoImage = static_cast(v->mImage.get()); GrallocImage::GrallocData data; - data.mPicSize = gfxIntSize(aPicture.width, aPicture.height); + data.mPicSize = aPicture.Size().ToIntSize(); data.mGraphicBuffer = aBuffer; videoImage->SetData(data); diff --git a/content/media/MediaStreamGraph.cpp b/content/media/MediaStreamGraph.cpp index db8fd8c577c3..8090f717cfa9 100644 --- a/content/media/MediaStreamGraph.cpp +++ b/content/media/MediaStreamGraph.cpp @@ -27,6 +27,7 @@ using namespace mozilla::layers; using namespace mozilla::dom; +using namespace mozilla::gfx; namespace mozilla { @@ -895,7 +896,7 @@ SetImageToBlackPixel(PlanarYCbCrImage* aImage) data.mCbChannel = blackPixel + 1; data.mCrChannel = blackPixel + 2; data.mYStride = data.mCbCrStride = 1; - data.mPicSize = data.mYSize = data.mCbCrSize = gfxIntSize(1, 1); + data.mPicSize = data.mYSize = data.mCbCrSize = IntSize(1, 1); aImage->SetData(data); } diff --git a/content/media/omx/OmxDecoder.cpp b/content/media/omx/OmxDecoder.cpp index 1d53cde4f766..2de1b34a8e97 100644 --- a/content/media/omx/OmxDecoder.cpp +++ b/content/media/omx/OmxDecoder.cpp @@ -38,6 +38,7 @@ PRLogModuleInfo *gOmxDecoderLog; using namespace MPAPI; using namespace mozilla; +using namespace mozilla::gfx; namespace mozilla { @@ -828,7 +829,7 @@ bool OmxDecoder::ReadVideo(VideoFrame *aFrame, int64_t aTimeUs, // GraphicBuffer's size and actual video size is different. // See Bug 850566. mozilla::layers::SurfaceDescriptorGralloc newDescriptor = descriptor->get_SurfaceDescriptorGralloc(); - newDescriptor.size() = nsIntSize(mVideoWidth, mVideoHeight); + newDescriptor.size() = IntSize(mVideoWidth, mVideoHeight); mozilla::layers::SurfaceDescriptor descWrapper(newDescriptor); aFrame->mGraphicBuffer = new mozilla::layers::VideoGraphicBuffer(this, mVideoBuffer, descWrapper); diff --git a/content/media/plugins/MediaPluginReader.cpp b/content/media/plugins/MediaPluginReader.cpp index 7f14dfce5af2..26435b47650a 100644 --- a/content/media/plugins/MediaPluginReader.cpp +++ b/content/media/plugins/MediaPluginReader.cpp @@ -17,6 +17,8 @@ namespace mozilla { +using namespace mozilla::gfx; + typedef mozilla::layers::Image Image; typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage; @@ -393,8 +395,8 @@ MediaPluginReader::ImageBufferCallback::CreateI420Image(size_t aWidth, frameDesc.mCbChannel = buffer + frameSize; frameDesc.mCrChannel = buffer + frameSize * 5 / 4; - frameDesc.mYSize = gfxIntSize(aWidth, aHeight); - frameDesc.mCbCrSize = gfxIntSize(aWidth / 2, aHeight / 2); + frameDesc.mYSize = IntSize(aWidth, aHeight); + frameDesc.mCbCrSize = IntSize(aWidth / 2, aHeight / 2); frameDesc.mYStride = aWidth; frameDesc.mCbCrStride = aWidth / 2; @@ -405,7 +407,7 @@ MediaPluginReader::ImageBufferCallback::CreateI420Image(size_t aWidth, frameDesc.mPicX = 0; frameDesc.mPicY = 0; - frameDesc.mPicSize = gfxIntSize(aWidth, aHeight); + frameDesc.mPicSize = IntSize(aWidth, aHeight); yuvImage->SetDataNoCopy(frameDesc); diff --git a/content/media/webrtc/MediaEngineDefault.cpp b/content/media/webrtc/MediaEngineDefault.cpp index 7d78456a02cf..d2fd578d72c1 100644 --- a/content/media/webrtc/MediaEngineDefault.cpp +++ b/content/media/webrtc/MediaEngineDefault.cpp @@ -25,6 +25,8 @@ #define AUDIO_FRAME_LENGTH ((AUDIO_RATE * MediaEngine::DEFAULT_AUDIO_TIMER_MS) / 1000) namespace mozilla { +using namespace mozilla::gfx; + NS_IMPL_ISUPPORTS1(MediaEngineDefaultVideoSource, nsITimerCallback) /** * Default video source. @@ -92,15 +94,15 @@ static void AllocateSolidColorFrame(layers::PlanarYCbCrData& aData, memset(frame+yLen+cbLen, aCr, crLen); aData.mYChannel = frame; - aData.mYSize = gfxIntSize(aWidth, aHeight); + aData.mYSize = IntSize(aWidth, aHeight); aData.mYStride = aWidth; aData.mCbCrStride = aWidth>>1; aData.mCbChannel = frame + yLen; aData.mCrChannel = aData.mCbChannel + cbLen; - aData.mCbCrSize = gfxIntSize(aWidth>>1, aHeight>>1); + aData.mCbCrSize = IntSize(aWidth>>1, aHeight>>1); aData.mPicX = 0; aData.mPicY = 0; - aData.mPicSize = gfxIntSize(aWidth, aHeight); + aData.mPicSize = IntSize(aWidth, aHeight); aData.mStereoMode = STEREO_MODE_MONO; } diff --git a/content/media/webrtc/MediaEngineTabVideoSource.cpp b/content/media/webrtc/MediaEngineTabVideoSource.cpp index e29216d41251..0ce8f36bf3ab 100644 --- a/content/media/webrtc/MediaEngineTabVideoSource.cpp +++ b/content/media/webrtc/MediaEngineTabVideoSource.cpp @@ -18,6 +18,8 @@ #include "nsIPrefService.h" namespace mozilla { +using namespace mozilla::gfx; + NS_IMPL_ISUPPORTS1(MediaEngineTabVideoSource, MediaEngineVideoSource) MediaEngineTabVideoSource::MediaEngineTabVideoSource() @@ -171,7 +173,7 @@ NotifyPull(MediaStreamGraph*, SourceMediaStream* aSource, mozilla::TrackID aID, void MediaEngineTabVideoSource::Draw() { - nsIntSize size(mBufW, mBufH); + IntSize size(mBufW, mBufH); nsresult rv; float scale = 1.0; @@ -241,8 +243,8 @@ MediaEngineTabVideoSource::Draw() { nsRefPtr container = layers::LayerManager::CreateImageContainer(); nsRefPtr surf; - surf = new gfxImageSurface(static_cast(mData), size, - stride, format); + surf = new gfxImageSurface(static_cast(mData), + ThebesIntSize(size), stride, format); if (surf->CairoStatus() != 0) { return; } diff --git a/content/media/webrtc/MediaEngineWebRTCVideo.cpp b/content/media/webrtc/MediaEngineWebRTCVideo.cpp index 2a34df7a2751..de768b5d19dc 100644 --- a/content/media/webrtc/MediaEngineWebRTCVideo.cpp +++ b/content/media/webrtc/MediaEngineWebRTCVideo.cpp @@ -11,6 +11,8 @@ namespace mozilla { +using namespace mozilla::gfx; + #ifdef PR_LOGGING extern PRLogModuleInfo* GetMediaManagerLog(); #define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg) @@ -77,15 +79,15 @@ MediaEngineWebRTCVideoSource::DeliverFrame( layers::PlanarYCbCrData data; data.mYChannel = frame; - data.mYSize = gfxIntSize(mWidth, mHeight); + data.mYSize = IntSize(mWidth, mHeight); data.mYStride = mWidth * lumaBpp/ 8; data.mCbCrStride = mWidth * chromaBpp / 8; data.mCbChannel = frame + mHeight * data.mYStride; data.mCrChannel = data.mCbChannel + mHeight * data.mCbCrStride / 2; - data.mCbCrSize = gfxIntSize(mWidth/ 2, mHeight/ 2); + data.mCbCrSize = IntSize(mWidth/ 2, mHeight/ 2); data.mPicX = 0; data.mPicY = 0; - data.mPicSize = gfxIntSize(mWidth, mHeight); + data.mPicSize = IntSize(mWidth, mHeight); data.mStereoMode = STEREO_MODE_MONO; videoImage->SetData(data); diff --git a/dom/camera/GonkCameraControl.cpp b/dom/camera/GonkCameraControl.cpp index 71cec72fb536..8e68d50cae8e 100644 --- a/dom/camera/GonkCameraControl.cpp +++ b/dom/camera/GonkCameraControl.cpp @@ -46,6 +46,7 @@ using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::layers; +using namespace mozilla::gfx; using namespace android; /** @@ -1693,7 +1694,7 @@ GonkFrameBuilder(Image* aImage, void* aBuffer, uint32_t aWidth, uint32_t aHeight GrallocImage* videoImage = static_cast(aImage); GrallocImage::GrallocData data; data.mGraphicBuffer = static_cast(aBuffer); - data.mPicSize = gfxIntSize(aWidth, aHeight); + data.mPicSize = IntSize(aWidth, aHeight); videoImage->SetData(data); } diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index cb5974fe7358..ef78fcf17a60 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -180,7 +180,7 @@ nsPluginInstanceOwner::GetImageContainer() data.mInverted = mInstance->Inverted(); LayoutDeviceRect r = GetPluginRect(); - data.mSize = gfxIntSize(r.width, r.height); + data.mSize = gfx::IntSize(r.width, r.height); SharedTextureImage* pluginImage = static_cast(img.get()); pluginImage->SetData(data); @@ -1512,7 +1512,7 @@ already_AddRefed nsPluginInstanceOwner::GetImageContainerForVide // The logic below for Honeycomb is just a guess, but seems to work. We don't have a separate // inverted flag for video. data.mInverted = AndroidBridge::Bridge()->IsHoneycomb() ? true : mInstance->Inverted(); - data.mSize = gfxIntSize(aVideoInfo->mDimensions.width, aVideoInfo->mDimensions.height); + data.mSize = gfx::IntSize(aVideoInfo->mDimensions.width, aVideoInfo->mDimensions.height); SharedTextureImage* pluginImage = static_cast(img.get()); pluginImage->SetData(data); diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index b51266985496..36036167cf7a 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -36,6 +36,7 @@ using namespace mozilla; using mozilla::ipc::ProcessChild; using namespace mozilla::plugins; using namespace mozilla::layers; +using namespace mozilla::gfx; using namespace std; #ifdef MOZ_WIDGET_GTK @@ -2578,7 +2579,7 @@ PluginInstanceChild::NPN_FinalizeAsyncSurface(NPAsyncSurface *surface) RemoteImageData *data = mRemoteImageData; if (data->mBitmap.mData == bitmapData->mRemotePtr) { data->mBitmap.mData = nullptr; - data->mSize = gfxIntSize(0, 0); + data->mSize = IntSize(0, 0); data->mWasUpdated = true; } } @@ -2593,7 +2594,7 @@ PluginInstanceChild::NPN_FinalizeAsyncSurface(NPAsyncSurface *surface) RemoteImageData *data = mRemoteImageData; if (data->mTextureHandle == surface->sharedHandle) { data->mTextureHandle = nullptr; - data->mSize = gfxIntSize(0, 0); + data->mSize = IntSize(0, 0); data->mWasUpdated = true; } } @@ -2619,7 +2620,7 @@ PluginInstanceChild::NPN_SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect if (!surface) { CrossProcessMutexAutoLock autoLock(*mRemoteImageDataMutex); data->mBitmap.mData = nullptr; - data->mSize = gfxIntSize(0, 0); + data->mSize = IntSize(0, 0); data->mWasUpdated = true; } else { switch (mDrawingModel) { @@ -2633,7 +2634,7 @@ PluginInstanceChild::NPN_SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect CrossProcessMutexAutoLock autoLock(*mRemoteImageDataMutex); data->mBitmap.mData = (unsigned char*)bitmapData->mRemotePtr; - data->mSize = gfxIntSize(surface->size.width, surface->size.height); + data->mSize = IntSize(surface->size.width, surface->size.height); data->mFormat = surface->format == NPImageFormatBGRX32 ? RemoteImageData::BGRX32 : RemoteImageData::BGRA32; data->mBitmap.mStride = surface->bitmap.stride; @@ -2645,7 +2646,7 @@ PluginInstanceChild::NPN_SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect { CrossProcessMutexAutoLock autoLock(*mRemoteImageDataMutex); data->mType = RemoteImageData::DXGI_TEXTURE_HANDLE; - data->mSize = gfxIntSize(surface->size.width, surface->size.height); + data->mSize = IntSize(surface->size.width, surface->size.height); data->mFormat = surface->format == NPImageFormatBGRX32 ? RemoteImageData::BGRX32 : RemoteImageData::BGRA32; data->mTextureHandle = surface->sharedHandle; diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 5e49cb9dcc35..c2651e10aaf9 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -644,7 +644,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, CairoImage* cairoImage = static_cast(image.get()); CairoImage::Data cairoData; cairoData.mSurface = surface; - cairoData.mSize = surface->GetSize(); + cairoData.mSize = surface->GetSize().ToIntSize(); cairoImage->SetData(cairoData); container->SetCurrentImage(cairoImage); diff --git a/gfx/gl/GLTextureImage.cpp b/gfx/gl/GLTextureImage.cpp index 1fba713c5dec..7f0f8f6b1673 100644 --- a/gfx/gl/GLTextureImage.cpp +++ b/gfx/gl/GLTextureImage.cpp @@ -59,15 +59,15 @@ TileGenFunc(GLContext* gl, return nullptr; } } -already_AddRefed +already_AddRefed TextureImage::Create(GLContext* gl, const nsIntSize& size, TextureImage::ContentType contentType, GLenum wrapMode, TextureImage::Flags flags) { - return CreateTextureImage(gl, size, contentType, wrapMode, flags); + return Create(gl, size.ToIntSize(), contentType, wrapMode, flags); } // Moz2D equivalent... @@ -78,7 +78,7 @@ TextureImage::Create(GLContext* gl, GLenum wrapMode, TextureImage::Flags flags) { - return Create(gl, ThebesIntSize(size), contentType, wrapMode, flags); + return CreateTextureImage(gl, size, contentType, wrapMode, flags); } bool @@ -275,7 +275,7 @@ gfx::IntSize TextureImage::GetSize() const { TextureImage::TextureImage(const gfx::IntSize& aSize, GLenum aWrapMode, ContentType aContentType, Flags aFlags) - : mSize(ThebesIntSize(aSize)) + : mSize(aSize) , mWrapMode(aWrapMode) , mContentType(aContentType) , mFilter(GraphicsFilter::FILTER_GOOD) diff --git a/gfx/gl/GLTextureImage.h b/gfx/gl/GLTextureImage.h index 6f434b6f262e..c4ed590f2f00 100644 --- a/gfx/gl/GLTextureImage.h +++ b/gfx/gl/GLTextureImage.h @@ -223,7 +223,7 @@ protected: GLenum aWrapMode, ContentType aContentType, Flags aFlags = NoFlags, ImageFormat aImageFormat = gfxImageFormatUnknown) - : mSize(aSize) + : mSize(aSize.ToIntSize()) , mWrapMode(aWrapMode) , mContentType(aContentType) , mImageFormat(aImageFormat) diff --git a/gfx/gl/SharedSurfaceGralloc.cpp b/gfx/gl/SharedSurfaceGralloc.cpp index d34044a1ad61..d27c4557e8f9 100644 --- a/gfx/gl/SharedSurfaceGralloc.cpp +++ b/gfx/gl/SharedSurfaceGralloc.cpp @@ -75,7 +75,7 @@ SharedSurface_Gralloc::Create(GLContext* prodGL, gfxContentType type = hasAlpha ? GFX_CONTENT_COLOR_ALPHA : GFX_CONTENT_COLOR; - if (!allocator->AllocSurfaceDescriptorWithCaps(size, type, USING_GL_RENDERING_ONLY, &baseDesc)) + if (!allocator->AllocSurfaceDescriptorWithCaps(size.ToIntSize(), type, USING_GL_RENDERING_ONLY, &baseDesc)) return false; if (baseDesc.type() != SurfaceDescriptor::TSurfaceDescriptorGralloc) { diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index a4747fb198c8..d6c8b8e0a002 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -317,7 +317,7 @@ ImageContainer::LockCurrentAsSurface(gfx::IntSize *aSize, Image** aCurrentImage) gfxImageFormatARGB32 : gfxImageFormatRGB24); - *aSize = newSurf->GetSize(); + *aSize = newSurf->GetSize().ToIntSize(); return newSurf.forget(); } @@ -382,7 +382,7 @@ ImageContainer::GetCurrentSize() } if (!mActiveImage) { - return gfx::IntSize(0,0); + return gfx::IntSize(0, 0); } return mActiveImage->GetSize(); diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp index 72cd6a654ac6..f853fc6a5475 100644 --- a/gfx/layers/client/ClientLayerManager.cpp +++ b/gfx/layers/client/ClientLayerManager.cpp @@ -273,7 +273,7 @@ ClientLayerManager::MakeSnapshotIfRequired() nsIntRect bounds; mWidget->GetBounds(bounds); SurfaceDescriptor inSnapshot, snapshot; - if (mForwarder->AllocSurfaceDescriptor(bounds.Size(), + if (mForwarder->AllocSurfaceDescriptor(bounds.Size().ToIntSize(), GFX_CONTENT_COLOR_ALPHA, &inSnapshot) && // The compositor will usually reuse |snapshot| and return diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 544784812d91..ea7e54715d05 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -1147,8 +1147,8 @@ ContentClientIncremental::BeginPaintBuffer(ThebesLayer* aLayer, FillSurface(onBlack, result.mRegionToDraw, nsIntPoint(drawBounds.x, drawBounds.y), gfxRGBA(0.0, 0.0, 0.0, 1.0)); FillSurface(onWhite, result.mRegionToDraw, nsIntPoint(drawBounds.x, drawBounds.y), gfxRGBA(1.0, 1.0, 1.0, 1.0)); MOZ_ASSERT(gfxPlatform::GetPlatform()->SupportsAzureContent()); - RefPtr onBlackDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onBlack, onBlack->GetSize()); - RefPtr onWhiteDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onWhite, onWhite->GetSize()); + RefPtr onBlackDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onBlack, onBlack->GetSize().ToIntSize()); + RefPtr onWhiteDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onWhite, onWhite->GetSize().ToIntSize()); RefPtr dt = Factory::CreateDualDrawTarget(onBlackDT, onWhiteDT); result.mContext = new gfxContext(dt); } else { @@ -1157,7 +1157,7 @@ ContentClientIncremental::BeginPaintBuffer(ThebesLayer* aLayer, } else { nsRefPtr surf = GetUpdateSurface(BUFFER_BLACK, result.mRegionToDraw); MOZ_ASSERT(gfxPlatform::GetPlatform()->SupportsAzureContent()); - RefPtr dt = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(surf, surf->GetSize()); + RefPtr dt = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(surf, surf->GetSize().ToIntSize()); result.mContext = new gfxContext(dt); } if (!result.mContext) { @@ -1226,7 +1226,7 @@ ContentClientIncremental::GetUpdateSurface(BufferType aType, return nullptr; } SurfaceDescriptor desc; - if (!mForwarder->AllocSurfaceDescriptor(gfxIntSize(rgnSize.width, rgnSize.height), + if (!mForwarder->AllocSurfaceDescriptor(rgnSize.Size().ToIntSize(), mContentType, &desc)) { NS_WARNING("creating SurfaceDescriptor failed!"); diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index 696b3ec86735..9c5a598b0bc7 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -533,8 +533,8 @@ BufferTextureClient::UpdateYCbCr(const PlanarYCbCrData& aData) YCbCrImageDataSerializer serializer(GetBuffer()); MOZ_ASSERT(serializer.IsValid()); if (!serializer.CopyData(aData.mYChannel, aData.mCbChannel, aData.mCrChannel, - ThebesIntSize(aData.mYSize), aData.mYStride, - ThebesIntSize(aData.mCbCrSize), aData.mCbCrStride, + aData.mYSize, aData.mYStride, + aData.mCbCrSize, aData.mCbCrStride, aData.mYSkip, aData.mCbSkip)) { NS_WARNING("Failed to copy image data!"); return false; @@ -635,8 +635,8 @@ DeprecatedTextureClientShmem::EnsureAllocated(gfx::IntSize aSize, mContentType = aContentType; mSize = aSize; - if (!mForwarder->AllocSurfaceDescriptor(gfxIntSize(mSize.width, mSize.height), - mContentType, &mDescriptor)) { + if (!mForwarder->AllocSurfaceDescriptor(mSize, mContentType, + &mDescriptor)) { NS_WARNING("creating SurfaceDescriptor failed!"); } if (mContentType == GFX_CONTENT_COLOR_ALPHA) { @@ -885,8 +885,8 @@ AutoLockYCbCrClient::Update(PlanarYCbCrImage* aImage) YCbCrImageDataSerializer serializer(shmem.get()); if (!serializer.CopyData(data->mYChannel, data->mCbChannel, data->mCrChannel, - ThebesIntSize(data->mYSize), data->mYStride, - ThebesIntSize(data->mCbCrSize), data->mCbCrStride, + data->mYSize, data->mYStride, + data->mCbCrSize, data->mCbCrStride, data->mYSkip, data->mCbSkip)) { NS_WARNING("Failed to copy image data!"); return false; diff --git a/gfx/layers/composite/ContentHost.cpp b/gfx/layers/composite/ContentHost.cpp index 39f057ecffa7..403694de2963 100644 --- a/gfx/layers/composite/ContentHost.cpp +++ b/gfx/layers/composite/ContentHost.cpp @@ -523,7 +523,7 @@ ContentHostSingleBuffered::UpdateThebes(const ThebesBufferData& aData, // Correct for rotation destRegion.MoveBy(aData.rotation()); - IntSize size = aData.rect().Size(); + IntSize size = aData.rect().Size().ToIntSize(); nsIntRect destBounds = destRegion.GetBounds(); destRegion.MoveBy((destBounds.x >= size.width) ? -size.width : 0, (destBounds.y >= size.height) ? -size.height : 0); @@ -620,7 +620,7 @@ DeprecatedContentHostSingleBuffered::UpdateThebes(const ThebesBufferData& aData, // Correct for rotation destRegion.MoveBy(aData.rotation()); - IntSize size = aData.rect().Size(); + IntSize size = aData.rect().Size().ToIntSize(); nsIntRect destBounds = destRegion.GetBounds(); destRegion.MoveBy((destBounds.x >= size.width) ? -size.width : 0, (destBounds.y >= size.height) ? -size.height : 0); diff --git a/gfx/layers/d3d10/ImageLayerD3D10.cpp b/gfx/layers/d3d10/ImageLayerD3D10.cpp index 4d12543c59a0..f16a430547be 100644 --- a/gfx/layers/d3d10/ImageLayerD3D10.cpp +++ b/gfx/layers/d3d10/ImageLayerD3D10.cpp @@ -414,7 +414,7 @@ ImageLayerD3D10::GetAsTexture(gfx::IntSize* aSize) return nullptr; } - *aSize = gfx::ThebesIntSize(image->GetSize()); + *aSize = image->GetSize(); bool dontCare; nsRefPtr result = GetImageSRView(image, dontCare); return result.forget(); diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp index 054316163b1c..ed21705f3fed 100644 --- a/gfx/layers/d3d11/CompositorD3D11.cpp +++ b/gfx/layers/d3d11/CompositorD3D11.cpp @@ -788,7 +788,7 @@ CompositorD3D11::UpdateRenderTarget() } mDefaultRT = new CompositingRenderTargetD3D11(backBuf, IntPoint(0, 0)); - mDefaultRT->SetSize(mSize); + mDefaultRT->SetSize(mSize.ToIntSize()); } bool diff --git a/gfx/layers/d3d9/ImageLayerD3D9.cpp b/gfx/layers/d3d9/ImageLayerD3D9.cpp index b336548972d1..909dc92e1f46 100644 --- a/gfx/layers/d3d9/ImageLayerD3D9.cpp +++ b/gfx/layers/d3d9/ImageLayerD3D9.cpp @@ -568,7 +568,7 @@ ImageLayerD3D9::GetAsTexture(gfx::IntSize* aSize) } bool dontCare; - *aSize = gfx::ThebesIntSize(image->GetSize()); + *aSize = image->GetSize(); nsRefPtr result = GetTexture(image, dontCare); return result.forget(); } diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp index 23559401c63f..711e8d1b53a7 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp @@ -76,7 +76,7 @@ TakeAndDestroyXlibSurface(SurfaceDescriptor* aSurface) SurfaceDescriptorX11::SurfaceDescriptorX11(gfxXlibSurface* aSurf) : mId(aSurf->XDrawable()) - , mSize(aSurf->GetSize()) + , mSize(aSurf->GetSize().ToIntSize()) { const XRenderPictFormat *pictFormat = aSurf->XRenderFormat(); if (pictFormat) { diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index 25d268bddac6..6c0d155e14b6 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -669,8 +669,8 @@ ShadowLayerForwarder::GetDescriptorSurfaceSize( } nsRefPtr surface = OpenDescriptor(aMode, aDescriptor); - size = surface->GetSize(); - *aSurface = surface.forget().get(); + size = surface->GetSize().ToIntSize(); + surface.forget(aSurface); return size; } @@ -829,7 +829,7 @@ gfx::IntSize AutoOpenSurface::Size() { if (mSurface) { - return mSurface->GetSize(); + return mSurface->GetSize().ToIntSize(); } return ShadowLayerForwarder::GetDescriptorSurfaceSize( mDescriptor, mMode, getter_AddRefs(mSurface)); diff --git a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp index 35a371d345c8..187947d87278 100644 --- a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp +++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp @@ -246,9 +246,9 @@ DeprecatedSharedPlanarYCbCrImage::SetData(const PlanarYCbCrData& aData) YCbCrImageDataSerializer serializer(mShmem.get()); MOZ_ASSERT(aData.mCbSkip == aData.mCrSkip); if (!serializer.CopyData(aData.mYChannel, aData.mCbChannel, aData.mCrChannel, - ThebesIntSize(aData.mYSize), aData.mYStride, - ThebesIntSize(aData.mCbCrSize), aData.mCbCrStride, - aData.mYSkip, aData.mCbSkip)) { + aData.mYSize, aData.mYStride, + aData.mCbCrSize, aData.mCbCrStride, + aData.mYSkip, aData.mCbSkip)) { NS_WARNING("Failed to copy image data!"); } mData.mYChannel = serializer.GetYData(); diff --git a/gfx/layers/ipc/SharedRGBImage.cpp b/gfx/layers/ipc/SharedRGBImage.cpp index 849cbdf72ce5..9eadd91901c8 100644 --- a/gfx/layers/ipc/SharedRGBImage.cpp +++ b/gfx/layers/ipc/SharedRGBImage.cpp @@ -74,7 +74,7 @@ CreateSharedRGBImage(ImageContainer *aImageContainer, if (gfxPlatform::GetPlatform()->UseDeprecatedTextures()) { nsRefPtr rgbImageDep = static_cast(image.get()); - rgbImageDep->mSize = gfxIntSize(aSize.width, aSize.height); + rgbImageDep->mSize = aSize.ToIntSize(); rgbImageDep->mImageFormat = aImageFormat; if (!rgbImageDep->AllocateBuffer(aSize, aImageFormat)) { @@ -218,7 +218,7 @@ SharedRGBImage::GetBuffer() gfx::IntSize SharedRGBImage::GetSize() { - return ThebesIntSize(mSize); + return mSize; } size_t diff --git a/gfx/layers/opengl/GrallocTextureClient.cpp b/gfx/layers/opengl/GrallocTextureClient.cpp index 01805ca69f27..37d2f01c4df3 100644 --- a/gfx/layers/opengl/GrallocTextureClient.cpp +++ b/gfx/layers/opengl/GrallocTextureClient.cpp @@ -16,6 +16,7 @@ namespace mozilla { namespace layers { +using namespace mozilla::gfx; using namespace android; class GraphicBufferLockedTextureClientData : public TextureClientData { @@ -61,7 +62,8 @@ public: // We just need to wrap the actor in a SurfaceDescriptor because that's what // ISurfaceAllocator uses as input, we don't care about the other parameters. SurfaceDescriptor sd = SurfaceDescriptorGralloc(nullptr, mGrallocActor, - nsIntSize(0,0), false, false); + IntSize(0, 0), + false, false); allocator->DestroySharedSurface(&sd); mGrallocActor = nullptr; } @@ -121,7 +123,8 @@ GrallocTextureClientOGL::~GrallocTextureClientOGL() // We just need to wrap the actor in a SurfaceDescriptor because that's what // ISurfaceAllocator uses as input, we don't care about the other parameters. SurfaceDescriptor sd = SurfaceDescriptorGralloc(nullptr, mGrallocActor, - nsIntSize(0,0), false, false); + IntSize(0, 0), + false, false); mCompositable->GetForwarder()->DestroySharedSurface(&sd); } } diff --git a/gfx/layers/opengl/TextureClientOGL.cpp b/gfx/layers/opengl/TextureClientOGL.cpp index e52858850ccc..4f009059cad2 100644 --- a/gfx/layers/opengl/TextureClientOGL.cpp +++ b/gfx/layers/opengl/TextureClientOGL.cpp @@ -38,8 +38,7 @@ SharedTextureClientOGL::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) if (!IsAllocated()) { return false; } - nsIntSize nsSize(mSize.width, mSize.height); - aOutDescriptor = SharedTextureDescriptor(mShareType, mHandle, nsSize, mInverted); + aOutDescriptor = SharedTextureDescriptor(mShareType, mHandle, mSize, mInverted); return true; } diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index 719bc74a9919..a9ddfc31d1cc 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -236,7 +236,7 @@ TextureImageTextureSourceOGL::Update(gfx::DataSourceSurface* aSurface, } MOZ_ASSERT(aSurface); - nsIntSize size = ThebesIntSize(aSurface->GetSize()); + IntSize size = aSurface->GetSize(); if (!mTexImage || mTexImage->GetSize() != size || mTexImage->GetContentType() != gfx::ContentForFormat(aSurface->GetFormat())) { @@ -501,15 +501,15 @@ TextureImageDeprecatedTextureHostOGL::EnsureBuffer(const nsIntSize& aSize, gfxContentType aContentType) { if (!mTexture || - mTexture->GetSize() != aSize || + mTexture->GetSize() != aSize.ToIntSize() || mTexture->GetContentType() != aContentType) { mTexture = CreateTextureImage(mGL, - aSize, + aSize.ToIntSize(), aContentType, WrapMode(mGL, mFlags & TEXTURE_ALLOW_REPEAT), FlagsToGLFlags(mFlags)); } - mTexture->Resize(aSize); + mTexture->Resize(aSize.ToIntSize()); } void diff --git a/gfx/src/nsSize.h b/gfx/src/nsSize.h index cc0d7975003e..f56cc735b621 100644 --- a/gfx/src/nsSize.h +++ b/gfx/src/nsSize.h @@ -37,7 +37,10 @@ struct nsIntSize : public mozilla::gfx::BaseSize { nsIntSize(int32_t aWidth, int32_t aHeight) : Super(aWidth, aHeight) {} inline nsSize ToAppUnits(nscoord aAppUnitsPerPixel) const; - operator mozilla::gfx::IntSize() const { return mozilla::gfx::IntSize(width, height); }; + mozilla::gfx::IntSize ToIntSize() const + { + return mozilla::gfx::IntSize(width, height); + }; }; inline nsIntSize diff --git a/gfx/tests/gtest/TestTextures.cpp b/gfx/tests/gtest/TestTextures.cpp index 2392111c8b4f..b35dc81f60fd 100644 --- a/gfx/tests/gtest/TestTextures.cpp +++ b/gfx/tests/gtest/TestTextures.cpp @@ -242,9 +242,9 @@ TEST(Layers, TextureYCbCrSerialization) { clientData.mYChannel = ySurface->Data(); clientData.mCbChannel = cbSurface->Data(); clientData.mCrChannel = crSurface->Data(); - clientData.mYSize = ySurface->GetSize(); - clientData.mPicSize = ySurface->GetSize(); - clientData.mCbCrSize = cbSurface->GetSize(); + clientData.mYSize = ySurface->GetSize().ToIntSize(); + clientData.mPicSize = ySurface->GetSize().ToIntSize(); + clientData.mCbCrSize = cbSurface->GetSize().ToIntSize(); clientData.mYStride = ySurface->Stride(); clientData.mCbCrStride = cbSurface->Stride(); clientData.mStereoMode = STEREO_MODE_MONO; diff --git a/image/src/VectorImage.cpp b/image/src/VectorImage.cpp index aaadb9cc9b1c..0273fd62a991 100644 --- a/image/src/VectorImage.cpp +++ b/image/src/VectorImage.cpp @@ -851,7 +851,7 @@ VectorImage::CreateDrawableAndShow(const SVGDrawingParameters& aParams) // Try to create an offscreen surface. mozilla::RefPtr target = - gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(aParams.imageRect.Size(), gfx::FORMAT_B8G8R8A8); + gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(aParams.imageRect.Size().ToIntSize(), gfx::FORMAT_B8G8R8A8); // If we couldn't create the draw target, it was probably because it would end // up way too big. Generally it also wouldn't fit in the cache, but the prefs diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 16a730f91ad6..285002ef0c5d 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3788,8 +3788,8 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const DisplayItemClip& aClip, GetMaskLayerImageCache()->FindImageFor(&lookupKey); if (!container) { - nsIntSize surfaceSizeInt = nsIntSize(NSToIntCeil(surfaceSize.width), - NSToIntCeil(surfaceSize.height)); + IntSize surfaceSizeInt(NSToIntCeil(surfaceSize.width), + NSToIntCeil(surfaceSize.height)); // no existing mask image, so build a new one nsRefPtr surface = aLayer->Manager()->CreateOptimalMaskSurface(surfaceSizeInt); diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index bcdb03e37604..7b91bc9ef77d 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -8,6 +8,7 @@ #include "nsObjectFrame.h" +#include "gfx2DGlue.h" #include "mozilla/BasicEvents.h" #ifdef XP_WIN // This is needed for DoublePassRenderingEvent. @@ -145,6 +146,7 @@ extern "C" { #endif /* #if defined(XP_MACOSX) && !defined(__LP64__) */ using namespace mozilla; +using namespace mozilla::gfx; using namespace mozilla::layers; class PluginBackgroundSink : public ReadbackSink { @@ -1527,7 +1529,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder, scaleFactor = 1.0; } int intScaleFactor = ceil(scaleFactor); - gfxIntSize size(window->width * intScaleFactor, window->height * intScaleFactor); + IntSize size(window->width * intScaleFactor, window->height * intScaleFactor); nsRect area = GetContentRectRelativeToSelf() + aItem->ToReferenceFrame(); gfxRect r = nsLayoutUtils::RectToGfxRect(area, PresContext()->AppUnitsPerDevPixel()); @@ -1612,11 +1614,11 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder, NS_ASSERTION(layer->GetType() == Layer::TYPE_READBACK, "Bad layer type"); ReadbackLayer* readback = static_cast(layer.get()); - if (readback->GetSize() != nsIntSize(size.width, size.height)) { + if (readback->GetSize() != ThebesIntSize(size)) { // This will destroy any old background sink and notify us that the // background is now unknown readback->SetSink(nullptr); - readback->SetSize(nsIntSize(size.width, size.height)); + readback->SetSize(ThebesIntSize(size)); if (mBackgroundSink) { // Maybe we still have a background sink associated with another @@ -1639,7 +1641,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder, transform.Translate(r.TopLeft() + aContainerParameters.mOffset); layer->SetBaseTransform(gfx3DMatrix::From2D(transform)); - layer->SetVisibleRegion(nsIntRect(0, 0, size.width, size.height)); + layer->SetVisibleRegion(ThebesIntRect(IntRect(IntPoint(0, 0), size))); return layer.forget(); } diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 415062bc4d1d..f39859620322 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -31,6 +31,7 @@ using namespace mozilla; using namespace mozilla::layers; using namespace mozilla::dom; +using namespace mozilla::gfx; nsIFrame* NS_NewHTMLVideoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) @@ -198,8 +199,8 @@ nsVideoFrame::BuildLayer(nsDisplayListBuilder* aBuilder, if (r.IsEmpty()) { return nullptr; } - gfxIntSize scaleHint(static_cast(r.Width()), - static_cast(r.Height())); + IntSize scaleHint(static_cast(r.Width()), + static_cast(r.Height())); container->SetScaleHint(scaleHint); nsRefPtr layer = static_cast diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp index 2e2b825c6bde..d7240d142e93 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp @@ -42,6 +42,7 @@ #include "mozilla/gfx/Point.h" using namespace mozilla; +using namespace mozilla::gfx; // Logging context MOZ_MTLOG_MODULE("mediapipeline") @@ -1212,15 +1213,15 @@ void MediaPipelineReceiveVideo::PipelineListener::RenderVideoFrame( layers::PlanarYCbCrData data; data.mYChannel = frame; - data.mYSize = gfxIntSize(width_, height_); + data.mYSize = IntSize(width_, height_); data.mYStride = width_ * lumaBpp/ 8; data.mCbCrStride = width_ * chromaBpp / 8; data.mCbChannel = frame + height_ * data.mYStride; data.mCrChannel = data.mCbChannel + height_ * data.mCbCrStride / 2; - data.mCbCrSize = gfxIntSize(width_/ 2, height_/ 2); + data.mCbCrSize = IntSize(width_/ 2, height_/ 2); data.mPicX = 0; data.mPicY = 0; - data.mPicSize = gfxIntSize(width_, height_); + data.mPicSize = IntSize(width_, height_); data.mStereoMode = STEREO_MODE_MONO; videoImage->SetData(data); diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h index 0b95de101f83..fd3721d3a773 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h @@ -94,6 +94,7 @@ Fake_AudioGenerator(DOMMediaStream* aStream) : mStream(aStream), mCount(0) { class Fake_VideoGenerator { public: typedef mozilla::DOMMediaStream DOMMediaStream; + typedef mozilla::gfx::IntSize IntSize; Fake_VideoGenerator(DOMMediaStream* aStream) { mStream = aStream; @@ -135,15 +136,15 @@ class Fake_VideoGenerator { mozilla::layers::PlanarYCbCrData data; data.mYChannel = frame; - data.mYSize = gfxIntSize(WIDTH, HEIGHT); + data.mYSize = IntSize(WIDTH, HEIGHT); data.mYStride = (int32_t) (WIDTH * lumaBpp / 8.0); data.mCbCrStride = (int32_t) (WIDTH * chromaBpp / 8.0); data.mCbChannel = frame + HEIGHT * data.mYStride; data.mCrChannel = data.mCbChannel + HEIGHT * data.mCbCrStride / 2; - data.mCbCrSize = gfxIntSize(WIDTH / 2, HEIGHT / 2); + data.mCbCrSize = IntSize(WIDTH / 2, HEIGHT / 2); data.mPicX = 0; data.mPicY = 0; - data.mPicSize = gfxIntSize(WIDTH, HEIGHT); + data.mPicSize = IntSize(WIDTH, HEIGHT); data.mStereoMode = mozilla::STEREO_MODE_MONO; // SetData copies data, so we can free the frame diff --git a/widget/gonk/nativewindow/GonkBufferQueue.cpp b/widget/gonk/nativewindow/GonkBufferQueue.cpp index 46aab8f82f7a..865cb66d2afa 100755 --- a/widget/gonk/nativewindow/GonkBufferQueue.cpp +++ b/widget/gonk/nativewindow/GonkBufferQueue.cpp @@ -37,6 +37,8 @@ #define ATRACE_BUFFER_INDEX(index) +using namespace mozilla; +using namespace mozilla::gfx; using namespace mozilla::layers; namespace android { @@ -410,7 +412,7 @@ status_t GonkBufferQueue::dequeueBuffer(int *outBuf, sp* outFence, status_t error; ibc = ImageBridgeChild::GetSingleton(); ST_LOGD("dequeueBuffer: about to alloc surface descriptor"); - ibc->AllocSurfaceDescriptorGralloc(gfxIntSize(w, h), + ibc->AllocSurfaceDescriptorGralloc(IntSize(w, h), format, usage, &desc); diff --git a/widget/gonk/nativewindow/GonkNativeWindowICS.cpp b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp index 1560d572f681..4bf7b7b4009a 100644 --- a/widget/gonk/nativewindow/GonkNativeWindowICS.cpp +++ b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp @@ -32,6 +32,8 @@ #define CNW_LOGE(...) {(void)printf_stderr(__VA_ARGS__);} using namespace android; +using namespace mozilla; +using namespace mozilla::gfx; using namespace mozilla::layers; GonkNativeWindow::GonkNativeWindow() : @@ -338,7 +340,7 @@ status_t GonkNativeWindow::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, status_t error; ibc = ImageBridgeChild::GetSingleton(); CNW_LOGD("dequeueBuffer: about to alloc surface descriptor"); - ibc->AllocSurfaceDescriptorGralloc(gfxIntSize(w, h), + ibc->AllocSurfaceDescriptorGralloc(IntSize(w, h), format, usage, &desc); diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index d00f34cca8c3..f30fb4767d01 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -2289,8 +2289,7 @@ nsWindow::UpdateAlpha(gfxPattern* aPattern, nsIntRect aBoundsRect) UpdateTranslucentWindowAlphaInternal(aBoundsRect, imageBuffer, stride); } else { nsRefPtr img = - new gfxImageSurface(ThebesIntSize(aBoundsRect.Size()), - gfxImageFormatA8); + new gfxImageSurface(aBoundsRect.Size(), gfxImageFormatA8); if (img && !img->CairoStatus()) { img->SetDeviceOffset(-aBoundsRect.TopLeft());