diff --git a/gfx/layers/MacIOSurfaceImage.h b/gfx/layers/MacIOSurfaceImage.h index 8999af922582..274717e058e7 100644 --- a/gfx/layers/MacIOSurfaceImage.h +++ b/gfx/layers/MacIOSurfaceImage.h @@ -23,7 +23,7 @@ public: MacIOSurface* GetSurface() { return mSurface; } gfx::IntSize GetSize() { - return gfxIntSize(mSurface->GetDevicePixelWidth(), mSurface->GetDevicePixelHeight()); + return gfx::IntSize(mSurface->GetDevicePixelWidth(), mSurface->GetDevicePixelHeight()); } virtual ISharedImage* AsSharedImage() MOZ_OVERRIDE { return this; } diff --git a/gfx/layers/ipc/ISurfaceAllocator.cpp b/gfx/layers/ipc/ISurfaceAllocator.cpp index 2bbfa99de200..116b088e58ff 100644 --- a/gfx/layers/ipc/ISurfaceAllocator.cpp +++ b/gfx/layers/ipc/ISurfaceAllocator.cpp @@ -7,6 +7,7 @@ #include "ISurfaceAllocator.h" #include // for int32_t +#include "gfx2DGlue.h" // for IntSize #include "gfxASurface.h" // for gfxASurface, etc #include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat #include "gfxSharedImageSurface.h" // for gfxSharedImageSurface @@ -42,7 +43,7 @@ IsSurfaceDescriptorValid(const SurfaceDescriptor& aSurface) } bool -ISurfaceAllocator::AllocSharedImageSurface(const gfxIntSize& aSize, +ISurfaceAllocator::AllocSharedImageSurface(const gfx::IntSize& aSize, gfxContentType aContent, gfxSharedImageSurface** aBuffer) { @@ -50,7 +51,10 @@ ISurfaceAllocator::AllocSharedImageSurface(const gfxIntSize& aSize, gfxImageFormat format = gfxPlatform::GetPlatform()->OptimalFormatForContent(aContent); nsRefPtr back = - gfxSharedImageSurface::CreateUnsafe(this, aSize, format, shmemType); + gfxSharedImageSurface::CreateUnsafe(this, + gfx::ThebesIntSize(aSize), + format, + shmemType); if (!back) return false; @@ -60,7 +64,7 @@ ISurfaceAllocator::AllocSharedImageSurface(const gfxIntSize& aSize, } bool -ISurfaceAllocator::AllocSurfaceDescriptor(const gfxIntSize& aSize, +ISurfaceAllocator::AllocSurfaceDescriptor(const gfx::IntSize& aSize, gfxContentType aContent, SurfaceDescriptor* aBuffer) { @@ -68,7 +72,7 @@ ISurfaceAllocator::AllocSurfaceDescriptor(const gfxIntSize& aSize, } bool -ISurfaceAllocator::AllocSurfaceDescriptorWithCaps(const gfxIntSize& aSize, +ISurfaceAllocator::AllocSurfaceDescriptorWithCaps(const gfx::IntSize& aSize, gfxContentType aContent, uint32_t aCaps, SurfaceDescriptor* aBuffer) @@ -162,7 +166,7 @@ ISurfaceAllocator::DestroySharedSurface(SurfaceDescriptor* aSurface) #if !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS) bool -ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize&, +ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize&, gfxContentType, uint32_t, SurfaceDescriptor*) diff --git a/gfx/layers/ipc/ISurfaceAllocator.h b/gfx/layers/ipc/ISurfaceAllocator.h index f2fff854f149..2a077d7d9c3b 100644 --- a/gfx/layers/ipc/ISurfaceAllocator.h +++ b/gfx/layers/ipc/ISurfaceAllocator.h @@ -9,7 +9,7 @@ #include // for size_t #include // for uint32_t #include "gfxTypes.h" -#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc #include "mozilla/RefPtr.h" #include "nsIMemoryReporter.h" // for MemoryUniReporter @@ -100,15 +100,15 @@ public: virtual void DeallocShmem(mozilla::ipc::Shmem& aShmem) = 0; // was AllocBuffer - virtual bool AllocSharedImageSurface(const gfxIntSize& aSize, + virtual bool AllocSharedImageSurface(const gfx::IntSize& aSize, gfxContentType aContent, gfxSharedImageSurface** aBuffer); - virtual bool AllocSurfaceDescriptor(const gfxIntSize& aSize, + virtual bool AllocSurfaceDescriptor(const gfx::IntSize& aSize, gfxContentType aContent, SurfaceDescriptor* aBuffer); // was AllocBufferWithCaps - virtual bool AllocSurfaceDescriptorWithCaps(const gfxIntSize& aSize, + virtual bool AllocSurfaceDescriptorWithCaps(const gfx::IntSize& aSize, gfxContentType aContent, uint32_t aCaps, SurfaceDescriptor* aBuffer); @@ -134,7 +134,7 @@ protected: // DeprecatedTextureClient/Host rework. virtual bool IsOnCompositorSide() const = 0; static bool PlatformDestroySharedSurface(SurfaceDescriptor* aSurface); - virtual bool PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize, + virtual bool PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize, gfxContentType aContent, uint32_t aCaps, SurfaceDescriptor* aBuffer); diff --git a/gfx/layers/ipc/LayerTransactionChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp index 5d7e19e65bf0..77fd028a53f1 100644 --- a/gfx/layers/ipc/LayerTransactionChild.cpp +++ b/gfx/layers/ipc/LayerTransactionChild.cpp @@ -30,10 +30,10 @@ LayerTransactionChild::Destroy() } PGrallocBufferChild* -LayerTransactionChild::AllocPGrallocBufferChild(const gfxIntSize&, - const uint32_t&, - const uint32_t&, - MaybeMagicGrallocBufferHandle*) +LayerTransactionChild::AllocPGrallocBufferChild(const IntSize&, + const uint32_t&, + const uint32_t&, + MaybeMagicGrallocBufferHandle*) { #ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC return GrallocBufferActor::Create(); diff --git a/gfx/layers/ipc/LayerTransactionChild.h b/gfx/layers/ipc/LayerTransactionChild.h index d4bc07e62ae9..894e88be51b0 100644 --- a/gfx/layers/ipc/LayerTransactionChild.h +++ b/gfx/layers/ipc/LayerTransactionChild.h @@ -9,7 +9,6 @@ #define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H #include // for uint32_t -#include "gfxPoint.h" // for gfxIntSize #include "mozilla/Attributes.h" // for MOZ_OVERRIDE #include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/layers/PLayerTransactionChild.h" @@ -47,9 +46,9 @@ protected: friend class detail::RefCounted; virtual PGrallocBufferChild* - AllocPGrallocBufferChild(const gfxIntSize&, - const uint32_t&, const uint32_t&, - MaybeMagicGrallocBufferHandle*) MOZ_OVERRIDE; + AllocPGrallocBufferChild(const IntSize&, + const uint32_t&, const uint32_t&, + MaybeMagicGrallocBufferHandle*) MOZ_OVERRIDE; virtual bool DeallocPGrallocBufferChild(PGrallocBufferChild* actor) MOZ_OVERRIDE; diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index ff9887a0b323..5a87bd6123cb 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -550,10 +550,10 @@ LayerTransactionParent::RecvClearCachedResources() } PGrallocBufferParent* -LayerTransactionParent::AllocPGrallocBufferParent(const gfxIntSize& aSize, - const uint32_t& aFormat, - const uint32_t& aUsage, - MaybeMagicGrallocBufferHandle* aOutHandle) +LayerTransactionParent::AllocPGrallocBufferParent(const IntSize& aSize, + const uint32_t& aFormat, + const uint32_t& aUsage, + MaybeMagicGrallocBufferHandle* aOutHandle) { #ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC return GrallocBufferActor::Create(aSize, aFormat, aUsage, aOutHandle); diff --git a/gfx/layers/ipc/LayerTransactionParent.h b/gfx/layers/ipc/LayerTransactionParent.h index 533b913bffa6..5e7372e30b0c 100644 --- a/gfx/layers/ipc/LayerTransactionParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -11,7 +11,6 @@ #include // for size_t #include // for uint64_t, uint32_t #include "CompositableTransactionParent.h" -#include "gfxPoint.h" // for gfxIntSize #include "mozilla/Attributes.h" // for MOZ_OVERRIDE #include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc #include "mozilla/layers/PLayerTransactionParent.h" @@ -96,9 +95,9 @@ protected: gfx3DMatrix* aTransform) MOZ_OVERRIDE; virtual PGrallocBufferParent* - AllocPGrallocBufferParent(const gfxIntSize& aSize, - const uint32_t& aFormat, const uint32_t& aUsage, - MaybeMagicGrallocBufferHandle* aOutHandle) MOZ_OVERRIDE; + AllocPGrallocBufferParent(const IntSize& aSize, + const uint32_t& aFormat, const uint32_t& aUsage, + MaybeMagicGrallocBufferHandle* aOutHandle) MOZ_OVERRIDE; virtual bool DeallocPGrallocBufferParent(PGrallocBufferParent* actor) MOZ_OVERRIDE; diff --git a/gfx/layers/ipc/LayersSurfaces.ipdlh b/gfx/layers/ipc/LayersSurfaces.ipdlh index e9305e2cd7fd..ce0be1084a02 100644 --- a/gfx/layers/ipc/LayersSurfaces.ipdlh +++ b/gfx/layers/ipc/LayersSurfaces.ipdlh @@ -5,7 +5,6 @@ include protocol PGrallocBuffer; -using gfxIntSize from "nsSize.h"; using struct gfxPoint from "gfxPoint.h"; using struct nsIntRect from "nsRect.h"; using nsIntRegion from "nsRegion.h"; @@ -144,7 +143,7 @@ struct RGBImage { struct MemoryImage { uintptr_t data; - gfxIntSize size; + IntSize size; uint32_t stride; uint32_t format; }; diff --git a/gfx/layers/ipc/PLayerTransaction.ipdl b/gfx/layers/ipc/PLayerTransaction.ipdl index e89a3e7a814d..6907be00cf81 100644 --- a/gfx/layers/ipc/PLayerTransaction.ipdl +++ b/gfx/layers/ipc/PLayerTransaction.ipdl @@ -64,7 +64,7 @@ parent: * - used for GL rendering to a buffer which the compositor * treats as a texture */ - sync PGrallocBuffer(gfxIntSize size, uint32_t format, uint32_t usage) + sync PGrallocBuffer(IntSize size, uint32_t format, uint32_t usage) returns (MaybeMagicGrallocBufferHandle handle); async PLayer(); async PCompositable(TextureInfo aTextureInfo); diff --git a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp index 7123b9d8a6b6..ded6b9fda978 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp @@ -5,11 +5,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/gfx/Point.h" #include "mozilla/layers/PLayerTransaction.h" #include "mozilla/layers/ShadowLayers.h" #include "mozilla/layers/LayerManagerComposite.h" #include "mozilla/layers/CompositorTypes.h" +#include "gfx2DGlue.h" #include "gfxPlatform.h" #include "gfxSharedQuartzSurface.h" @@ -20,7 +22,7 @@ namespace mozilla { namespace layers { bool -ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize, +ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize, gfxContentType aContent, uint32_t aCaps, SurfaceDescriptor* aBuffer) @@ -41,7 +43,7 @@ ShadowLayerForwarder::PlatformOpenDescriptor(OpenMode aMode, nsRefPtr surf = new gfxQuartzSurface((unsigned char*)image.data(), - image.size(), + gfx::ThebesIntSize(image.size()), image.stride(), format); return surf.forget(); diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index f7bba640ab7e..af2bd2c8367b 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -14,6 +14,7 @@ #include "Layers.h" // for Layer #include "RenderTrace.h" // for RenderTraceScope #include "ShadowLayerChild.h" // for ShadowLayerChild +#include "gfx2DGlue.h" // for Moz2D transition helpers #include "gfxImageSurface.h" // for gfxImageSurface #include "gfxPlatform.h" // for gfxImageFormat, gfxPlatform #include "gfxSharedImageSurface.h" // for gfxSharedImageSurface @@ -627,7 +628,7 @@ ShadowLayerForwarder::OpenDescriptor(OpenMode aMode, gfxImageFormat format = static_cast(image.format()); surf = new gfxImageSurface((unsigned char *)image.data(), - image.size(), + gfx::ThebesIntSize(image.size()), image.stride(), format); return surf.forget();