Bug 950677 - gfxIntSize -> IntSize in ipc/Shadow* files. r=nical
authorTor Arvid Lund <torarvid@comoyo.com>
Fri, 20 Dec 2013 11:46:30 -0500
changeset 177612 42e0c7dfcba24cd196142235c1630d1374f3465c
parent 177611 61a05fd01e086e28f0f562d511323f73028ff015
child 177613 8b6bd3cd3ac47d3911645922985aafdd2040a740
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs950677
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950677 - gfxIntSize -> IntSize in ipc/Shadow* files. r=nical
gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp
gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
gfx/layers/ipc/ShadowLayerUtilsGralloc.h
gfx/layers/ipc/ShadowLayerUtilsMac.cpp
gfx/layers/ipc/ShadowLayerUtilsX11.cpp
gfx/layers/ipc/ShadowLayerUtilsX11.h
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/ipc/ShadowLayers.h
--- a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp
@@ -3,29 +3,30 @@
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 <d3d10_1.h>
 #include <dxgi.h>
 
+#include "mozilla/gfx/Point.h"
 #include "mozilla/layers/LayerManagerComposite.h"
 #include "mozilla/layers/PLayerTransaction.h"
 #include "ShadowLayers.h"
 
 using namespace mozilla::gl;
 
 namespace mozilla {
 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*)
 {
   return false;
 }
 
 /*static*/ already_AddRefed<gfxASurface>
@@ -50,17 +51,17 @@ ShadowLayerForwarder::PlatformGetDescrip
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize(
   const SurfaceDescriptor&,
   OpenMode,
-  gfxIntSize*,
+  gfx::IntSize*,
   gfxASurface**)
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceImageFormat(
   const SurfaceDescriptor&,
--- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
@@ -2,16 +2,17 @@
  * vim: sw=2 ts=8 et :
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/DebugOnly.h"
 
+#include "mozilla/gfx/Point.h"
 #include "mozilla/layers/PGrallocBufferChild.h"
 #include "mozilla/layers/PGrallocBufferParent.h"
 #include "mozilla/layers/LayerTransactionChild.h"
 #include "mozilla/layers/ShadowLayers.h"
 #include "mozilla/layers/LayerManagerComposite.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/TextureHost.h"
 #include "mozilla/unused.h"
@@ -234,17 +235,17 @@ GrallocBufferActor::GrallocBufferActor()
 GrallocBufferActor::~GrallocBufferActor()
 {
   if (mAllocBytes > 0) {
     GrallocReporter::sAmount -= mAllocBytes;
   }
 }
 
 /*static*/ PGrallocBufferParent*
-GrallocBufferActor::Create(const gfxIntSize& aSize,
+GrallocBufferActor::Create(const gfx::IntSize& aSize,
                            const uint32_t& aFormat,
                            const uint32_t& aUsage,
                            MaybeMagicGrallocBufferHandle* aOutHandle)
 {
   PROFILER_LABEL("GrallocBufferActor", "Create");
   GrallocBufferActor* actor = new GrallocBufferActor();
   *aOutHandle = null_t();
   uint32_t format = aFormat;
@@ -350,17 +351,17 @@ ShadowLayerForwarder::AllocGrallocBuffer
                                          uint32_t aFormat,
                                          uint32_t aUsage,
                                          MaybeMagicGrallocBufferHandle* aHandle)
 {
   return mShadowManager->SendPGrallocBufferConstructor(aSize, aFormat, aUsage, aHandle);
 }
 
 bool
-ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
+ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
                                                   gfxContentType aContent,
                                                   uint32_t aCaps,
                                                   SurfaceDescriptor* aBuffer)
 {
 
   // Check for devices that have problems with gralloc. We only check for
   // this on ICS or earlier, in hopes that JB will work.
 #if ANDROID_VERSION <= 15
@@ -474,17 +475,17 @@ ShadowLayerForwarder::PlatformOpenDescri
   if (OPEN_READ_WRITE == aMode) {
     usage |= GRALLOC_USAGE_SW_WRITE_OFTEN;
   }
   void *vaddr;
   DebugOnly<status_t> status = buffer->lock(usage, &vaddr);
   // 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);
 
   nsRefPtr<gfxASurface> surf =
     new gfxImageSurface((unsigned char*)vaddr, size, byteStride, format);
   return surf->CairoStatus() ? nullptr : surf.forget();
 }
@@ -503,17 +504,17 @@ ShadowLayerForwarder::PlatformGetDescrip
     GrallocBufferActor::GetFrom(aDescriptor.get_SurfaceDescriptorGralloc());
   *aContent = ContentTypeFromPixelFormat(buffer->getPixelFormat());
   return true;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize(
   const SurfaceDescriptor& aDescriptor, OpenMode aMode,
-  gfxIntSize* aSize,
+  gfx::IntSize* aSize,
   gfxASurface** aSurface)
 {
   if (SurfaceDescriptor::TSurfaceDescriptorGralloc != aDescriptor.type()) {
     return false;
   }
 
   sp<GraphicBuffer> buffer =
     GrallocBufferActor::GetFrom(aDescriptor.get_SurfaceDescriptorGralloc());
--- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.h
+++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.h
@@ -65,17 +65,19 @@ class GrallocBufferActor : public PGrall
   friend class LayerManagerComposite;
   friend class ImageBridgeChild;
   typedef android::GraphicBuffer GraphicBuffer;
 
 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*
   Create();
 
   static android::sp<GraphicBuffer>
   GetFrom(const SurfaceDescriptorGralloc& aDescriptor);
 
--- a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp
@@ -65,17 +65,17 @@ ShadowLayerForwarder::PlatformGetDescrip
   gfxASurface** aSurface)
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize(
   const SurfaceDescriptor& aDescriptor, OpenMode aMode,
-  gfxIntSize* aSize,
+  gfx::IntSize* aSize,
   gfxASurface** aSurface)
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceImageFormat(
   const SurfaceDescriptor&,
--- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp
@@ -10,19 +10,19 @@
 #include <X11/Xlib.h>                   // for Display, Visual, etc
 #include <X11/extensions/Xrender.h>     // for XRenderPictFormat, etc
 #include <X11/extensions/render.h>      // for PictFormat
 #include "cairo-xlib.h"
 #include <stdint.h>                     // for uint32_t
 #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
 #include "mozilla/layers/LayerManagerComposite.h"
 #include "mozilla/layers/LayersSurfaces.h"  // for SurfaceDescriptor, etc
 #include "mozilla/layers/ShadowLayers.h"  // for ShadowLayerForwarder, etc
 #include "mozilla/mozalloc.h"           // for operator new
 #include "nsAutoPtr.h"                  // for nsRefPtr
@@ -81,17 +81,17 @@ SurfaceDescriptorX11::SurfaceDescriptorX
   if (pictFormat) {
     mFormat = pictFormat->id;
   } else {
     mFormat = cairo_xlib_surface_get_visual(aSurf->CairoSurface())->visualid;
   }
 }
 
 SurfaceDescriptorX11::SurfaceDescriptorX11(Drawable aDrawable, XID aFormatID,
-                                           const gfxIntSize& aSize)
+                                           const gfx::IntSize& aSize)
   : mId(aDrawable)
   , mFormat(aFormatID)
   , mSize(aSize)
 { }
 
 already_AddRefed<gfxXlibSurface>
 SurfaceDescriptorX11::OpenForeign() const
 {
@@ -110,17 +110,17 @@ SurfaceDescriptorX11::OpenForeign() cons
       return nullptr;
 
     surf = new gfxXlibSurface(display, mId, visual, mSize);
   }
   return surf->CairoStatus() ? nullptr : surf.forget();
 }
 
 bool
-ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
+ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
                                                   gfxContentType aContent,
                                                   uint32_t aCaps,
                                                   SurfaceDescriptor* aBuffer)
 {
   if (!UsingXCompositing()) {
     // If we're not using X compositing, we're probably compositing on
     // the client side, in which case X surfaces would just slow
     // things down.  Use Shmem instead.
@@ -172,17 +172,17 @@ ShadowLayerForwarder::PlatformGetDescrip
   gfxASurface** aSurface)
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize(
   const SurfaceDescriptor& aDescriptor, OpenMode aMode,
-  gfxIntSize* aSize,
+  gfx::IntSize* aSize,
   gfxASurface** aSurface)
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceImageFormat(
   const SurfaceDescriptor&,
--- a/gfx/layers/ipc/ShadowLayerUtilsX11.h
+++ b/gfx/layers/ipc/ShadowLayerUtilsX11.h
@@ -6,17 +6,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_layers_ShadowLayerUtilsX11_h
 #define mozilla_layers_ShadowLayerUtilsX11_h
 
 #include <X11/X.h>                      // 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
 #define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS
 
 class gfxXlibSurface;
 
 namespace IPC {
@@ -28,34 +27,34 @@ namespace layers {
 
 struct SurfaceDescriptorX11 {
   SurfaceDescriptorX11()
   { }
 
   SurfaceDescriptorX11(gfxXlibSurface* aSurf);
 
   SurfaceDescriptorX11(Drawable aDrawable, XID aFormatID,
-                       const gfxIntSize& aSize);
+                       const gfx::IntSize& aSize);
 
   // Default copy ctor and operator= are OK
 
   bool operator==(const SurfaceDescriptorX11& aOther) const {
     // Define == as two descriptors having the same XID for now,
     // ignoring size and render format.  If the two indeed refer to
     // the same valid XID, then size/format are "actually" the same
     // anyway, regardless of the values of the fields in
     // SurfaceDescriptorX11.
     return mId == aOther.mId;
   }
 
   already_AddRefed<gfxXlibSurface> OpenForeign() const;
 
   Drawable mId;
   XID mFormat; // either a PictFormat or VisualID
-  gfxIntSize mSize;
+  gfx::IntSize mSize;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 namespace IPC {
 
 template <>
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -15,16 +15,17 @@
 #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
 #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
 #include "mozilla/layers/LayersTypes.h"  // for MOZ_LAYERS_LOG
 #include "mozilla/layers/LayerTransactionChild.h"
 #include "ShadowLayerUtils.h"
 #include "mozilla/layers/TextureClient.h"  // for TextureClient
 #include "mozilla/mozalloc.h"           // for operator new, etc
@@ -651,22 +652,22 @@ ShadowLayerForwarder::GetDescriptorSurfa
   }
 
   nsRefPtr<gfxASurface> surface = OpenDescriptor(aMode, aDescriptor);
   content = surface->GetContentType();
   *aSurface = surface.forget().get();
   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;
   }
 
   nsRefPtr<gfxASurface> surface = OpenDescriptor(aMode, aDescriptor);
   size = surface->GetSize();
   *aSurface = surface.forget().get();
   return size;
@@ -739,17 +740,17 @@ ShadowLayerForwarder::PlatformGetDescrip
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceSize(
   const SurfaceDescriptor&,
   OpenMode,
-  gfxIntSize*,
+  gfx::IntSize*,
   gfxASurface**)
 {
   return false;
 }
 
 /*static*/ bool
 ShadowLayerForwarder::PlatformGetDescriptorSurfaceImageFormat(
   const SurfaceDescriptor&,
--- a/gfx/layers/ipc/ShadowLayers.h
+++ b/gfx/layers/ipc/ShadowLayers.h
@@ -6,17 +6,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_layers_ShadowLayers_h
 #define mozilla_layers_ShadowLayers_h 1
 
 #include <stddef.h>                     // for size_t
 #include <stdint.h>                     // 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
 #include "mozilla/ipc/SharedMemory.h"   // for SharedMemory, etc
 #include "mozilla/layers/CompositableForwarder.h"
 #include "mozilla/layers/CompositorTypes.h"  // for OpenMode, etc
 #include "nsCOMPtr.h"                   // for already_AddRefed
 #include "nsRegion.h"                   // for nsIntRegion
@@ -436,24 +435,24 @@ private:
    * set *aContent and return true.
    */
   static bool
   PlatformGetDescriptorSurfaceContentType(const SurfaceDescriptor& aDescriptor,
                                           OpenMode aMode,
                                           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|
   // describes a non-ImageSurface.
   static gfxImageFormat
   GetDescriptorSurfaceImageFormat(const SurfaceDescriptor& aDescriptor,
                                   OpenMode aMode,
                                   gfxASurface** aSurface);