From 7cade29011dfa4e0f71d758bb69e966c2d1ec806 Mon Sep 17 00:00:00 2001 From: Amanda Sambath Date: Thu, 28 May 2015 11:59:15 +0200 Subject: [PATCH] Bug 1158120 - Replace gfxIntSize by mozilla::gfx::IntSize in gfx/layers. r=nical --- gfx/layers/TextureDIB.cpp | 3 +-- gfx/layers/basic/BasicLayerManager.cpp | 4 ++-- gfx/layers/client/ContentClient.cpp | 2 +- gfx/layers/opengl/CompositorOGL.cpp | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gfx/layers/TextureDIB.cpp b/gfx/layers/TextureDIB.cpp index a90565de1efc..782c2706abcd 100644 --- a/gfx/layers/TextureDIB.cpp +++ b/gfx/layers/TextureDIB.cpp @@ -105,8 +105,7 @@ TextureClientMemoryDIB::AllocateForSurface(gfx::IntSize aSize, TextureAllocation MOZ_ASSERT(!IsAllocated()); mSize = aSize; - mSurface = new gfxWindowsSurface(gfxIntSize(aSize.width, aSize.height), - SurfaceFormatToImageFormat(mFormat)); + mSurface = new gfxWindowsSurface(aSize, SurfaceFormatToImageFormat(mFormat)); if (!mSurface || mSurface->CairoStatus()) { NS_WARNING("Could not create surface"); diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index 0f96b85915ba..bcc306468fa0 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -773,8 +773,8 @@ Transform3D(RefPtr aSource, // Create a surface the size of the transformed object. nsRefPtr dest = aDest->CurrentSurface(); - nsRefPtr destImage = new gfxImageSurface(gfxIntSize(aDestRect.width, - aDestRect.height), + nsRefPtr destImage = new gfxImageSurface(IntSize(aDestRect.width, + aDestRect.height), gfxImageFormat::ARGB32); gfxPoint offset = aDestRect.TopLeft(); diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index aeeff4c0cfa0..786fd042878a 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -293,7 +293,7 @@ ContentClientRemoteBuffer::BuildTextureClients(SurfaceFormat aFormat, DestroyBuffers(); mSurfaceFormat = aFormat; - mSize = gfx::IntSize(aRect.width, aRect.height); + mSize = IntSize(aRect.width, aRect.height); mTextureFlags = TextureFlagsForRotatedContentBufferFlags(aFlags); if (aFlags & BUFFER_COMPONENT_ALPHA) { diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 1870d0e2ec54..18e2df145370 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -126,8 +126,7 @@ CompositorOGL::CreateContext() caps.bpp16 = gfxPlatform::GetPlatform()->GetOffscreenFormat() == gfxImageFormat::RGB16_565; bool requireCompatProfile = true; - context = GLContextProvider::CreateOffscreen(gfxIntSize(mSurfaceSize.width, - mSurfaceSize.height), + context = GLContextProvider::CreateOffscreen(mSurfaceSize, caps, requireCompatProfile); } @@ -1342,7 +1341,7 @@ CompositorOGL::EndFrameForExternalComposition(const gfx::Matrix& aTransform) } void -CompositorOGL::SetDestinationSurfaceSize(const gfx::IntSize& aSize) +CompositorOGL::SetDestinationSurfaceSize(const IntSize& aSize) { mSurfaceSize.width = aSize.width; mSurfaceSize.height = aSize.height;