diff --git a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp b/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp index d5475f505bb..1580190eec7 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp @@ -8,6 +8,7 @@ #include #include +#include "mozilla/gfx/Point.h" #include "mozilla/layers/LayerManagerComposite.h" #include "mozilla/layers/PLayerTransaction.h" #include "ShadowLayers.h" @@ -20,7 +21,7 @@ namespace layers { // Platform-specific shadow-layers interfaces. See ShadowLayers.h. // D3D10 doesn't need all these yet. bool -ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize&, +ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize&, gfxContentType, uint32_t, SurfaceDescriptor*) @@ -55,7 +56,7 @@ ShadowLayerForwarder::PlatformGetDescriptorSurfaceContentType( ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize( const SurfaceDescriptor&, OpenMode, - gfxIntSize*, + gfx::IntSize*, gfxASurface**) { return false; diff --git a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp index 0840c227695..bba60f8c76c 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp @@ -7,6 +7,7 @@ #include "mozilla/DebugOnly.h" +#include "mozilla/gfx/Point.h" #include "mozilla/layers/PGrallocBufferChild.h" #include "mozilla/layers/PGrallocBufferParent.h" #include "mozilla/layers/LayerTransactionChild.h" @@ -239,7 +240,7 @@ GrallocBufferActor::~GrallocBufferActor() } /*static*/ PGrallocBufferParent* -GrallocBufferActor::Create(const gfxIntSize& aSize, +GrallocBufferActor::Create(const gfx::IntSize& aSize, const uint32_t& aFormat, const uint32_t& aUsage, MaybeMagicGrallocBufferHandle* aOutHandle) @@ -355,7 +356,7 @@ ShadowLayerForwarder::AllocGrallocBuffer(const gfx::IntSize& aSize, } bool -ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize, +ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize, gfxContentType aContent, uint32_t aCaps, SurfaceDescriptor* aBuffer) @@ -479,7 +480,7 @@ ShadowLayerForwarder::PlatformOpenDescriptor(OpenMode aMode, // If we fail to lock, we'll just end up aborting anyway. MOZ_ASSERT(status == OK); - gfxIntSize size = aSurface.get_SurfaceDescriptorGralloc().size(); + gfx::IntSize size = aSurface.get_SurfaceDescriptorGralloc().size(); gfxImageFormat format = ImageFormatForPixelFormat(buffer->getPixelFormat()); long pixelStride = buffer->getStride(); long byteStride = pixelStride * gfxASurface::BytePerPixelFromFormat(format); @@ -508,7 +509,7 @@ ShadowLayerForwarder::PlatformGetDescriptorSurfaceContentType( /*static*/ bool ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize( const SurfaceDescriptor& aDescriptor, OpenMode aMode, - gfxIntSize* aSize, + gfx::IntSize* aSize, gfxASurface** aSurface) { if (SurfaceDescriptor::TSurfaceDescriptorGralloc != aDescriptor.type()) { diff --git a/gfx/layers/ipc/ShadowLayerUtilsGralloc.h b/gfx/layers/ipc/ShadowLayerUtilsGralloc.h index 50cf8c92c74..3cccca8d331 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.h +++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.h @@ -70,7 +70,9 @@ public: virtual ~GrallocBufferActor(); static PGrallocBufferParent* - Create(const gfxIntSize& aSize, const uint32_t& aFormat, const uint32_t& aUsage, + Create(const gfx::IntSize& aSize, + const uint32_t& aFormat, + const uint32_t& aUsage, MaybeMagicGrallocBufferHandle* aOutHandle); static PGrallocBufferChild* diff --git a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp index ded6b9fda97..3406dce3ab0 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp @@ -70,7 +70,7 @@ ShadowLayerForwarder::PlatformGetDescriptorSurfaceContentType( /*static*/ bool ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize( const SurfaceDescriptor& aDescriptor, OpenMode aMode, - gfxIntSize* aSize, + gfx::IntSize* aSize, gfxASurface** aSurface) { return false; diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp index 472b569fff2..85db6236237 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp @@ -15,9 +15,9 @@ #include "GLDefs.h" // for GLenum #include "gfxASurface.h" // for gfxASurface, etc #include "gfxPlatform.h" // for gfxPlatform -#include "gfxPoint.h" // for gfxIntSize #include "gfxXlibSurface.h" // for gfxXlibSurface #include "mozilla/X11Util.h" // for DefaultXDisplay, FinishX, etc +#include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/layers/CompositableForwarder.h" #include "mozilla/layers/CompositorTypes.h" // for OpenMode #include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator, etc @@ -86,7 +86,7 @@ SurfaceDescriptorX11::SurfaceDescriptorX11(gfxXlibSurface* aSurf) } SurfaceDescriptorX11::SurfaceDescriptorX11(Drawable aDrawable, XID aFormatID, - const gfxIntSize& aSize) + const gfx::IntSize& aSize) : mId(aDrawable) , mFormat(aFormatID) , mSize(aSize) @@ -115,7 +115,7 @@ SurfaceDescriptorX11::OpenForeign() const } bool -ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize, +ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize, gfxContentType aContent, uint32_t aCaps, SurfaceDescriptor* aBuffer) @@ -177,7 +177,7 @@ ShadowLayerForwarder::PlatformGetDescriptorSurfaceContentType( /*static*/ bool ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize( const SurfaceDescriptor& aDescriptor, OpenMode aMode, - gfxIntSize* aSize, + gfx::IntSize* aSize, gfxASurface** aSurface) { return false; diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.h b/gfx/layers/ipc/ShadowLayerUtilsX11.h index 8333d18dd67..5c72830c77d 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.h +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.h @@ -11,7 +11,6 @@ #include // for Drawable #include "ipc/IPCMessageUtils.h" #include "mozilla/GfxMessageUtils.h" -#include "gfxPoint.h" // for gfxIntSize #include "nsCOMPtr.h" // for already_AddRefed #define MOZ_HAVE_SURFACEDESCRIPTORX11 @@ -33,7 +32,7 @@ struct SurfaceDescriptorX11 { SurfaceDescriptorX11(gfxXlibSurface* aSurf); SurfaceDescriptorX11(Drawable aDrawable, XID aFormatID, - const gfxIntSize& aSize); + const gfx::IntSize& aSize); // Default copy ctor and operator= are OK @@ -50,7 +49,7 @@ struct SurfaceDescriptorX11 { Drawable mId; XID mFormat; // either a PictFormat or VisualID - gfxIntSize mSize; + gfx::IntSize mSize; }; } // namespace layers diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index af2bd2c8367..1540ff0351c 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -20,6 +20,7 @@ #include "gfxSharedImageSurface.h" // for gfxSharedImageSurface #include "ipc/IPCMessageUtils.h" // for gfxContentType, null_t #include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/layers/CompositableClient.h" // for CompositableClient, etc #include "mozilla/layers/LayersMessages.h" // for Edit, etc #include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc @@ -656,12 +657,12 @@ ShadowLayerForwarder::GetDescriptorSurfaceContentType( return content; } -/*static*/ gfxIntSize +/*static*/ gfx::IntSize ShadowLayerForwarder::GetDescriptorSurfaceSize( const SurfaceDescriptor& aDescriptor, OpenMode aMode, gfxASurface** aSurface) { - gfxIntSize size; + gfx::IntSize size; if (PlatformGetDescriptorSurfaceSize(aDescriptor, aMode, &size, aSurface)) { return size; } @@ -744,7 +745,7 @@ ShadowLayerForwarder::PlatformGetDescriptorSurfaceContentType( ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize( const SurfaceDescriptor&, OpenMode, - gfxIntSize*, + gfx::IntSize*, gfxASurface**) { return false; diff --git a/gfx/layers/ipc/ShadowLayers.h b/gfx/layers/ipc/ShadowLayers.h index 4b165717a9b..eb4c7210c8e 100644 --- a/gfx/layers/ipc/ShadowLayers.h +++ b/gfx/layers/ipc/ShadowLayers.h @@ -11,7 +11,6 @@ #include // for size_t #include // for uint64_t #include "gfxTypes.h" -#include "gfxPoint.h" // for gfxIntSize #include "mozilla/Attributes.h" // for MOZ_OVERRIDE #include "mozilla/WidgetUtils.h" // for ScreenRotation #include "mozilla/dom/ScreenOrientation.h" // for ScreenOrientation @@ -441,14 +440,14 @@ private: gfxContentType* aContent, gfxASurface** aSurface); // (Same as above, but for surface size.) - static gfxIntSize + static gfx::IntSize GetDescriptorSurfaceSize(const SurfaceDescriptor& aDescriptor, OpenMode aMode, gfxASurface** aSurface); static bool PlatformGetDescriptorSurfaceSize(const SurfaceDescriptor& aDescriptor, OpenMode aMode, - gfxIntSize* aSize, + gfx::IntSize* aSize, gfxASurface** aSurface); // And again, for the image format. // This function will return gfxImageFormatUnknown only if |aDescriptor|