Bug 950677 - gfxIntSize -> IntSize in ipc/ directory. r=nical

(Detail: Chose to put an #include for Point.h in a header instead of a
forward declaration because a fwd decl caused an "Already defined" error
and having neither fwd decl or #include caused another compile failure
saying IntSize was undefined)
This commit is contained in:
Tor Arvid Lund 2013-12-20 11:46:29 -05:00
Родитель c652a133f6
Коммит 2fbcfd7089
11 изменённых файлов: 37 добавлений и 33 удалений

Просмотреть файл

@ -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; }

Просмотреть файл

@ -7,6 +7,7 @@
#include "ISurfaceAllocator.h"
#include <sys/types.h> // 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<gfxSharedImageSurface> 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*)

Просмотреть файл

@ -9,7 +9,7 @@
#include <stddef.h> // for size_t
#include <stdint.h> // 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);

Просмотреть файл

@ -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();

Просмотреть файл

@ -9,7 +9,6 @@
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
#include <stdint.h> // 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<LayerTransactionChild, detail::AtomicRefCount>;
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;

Просмотреть файл

@ -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);

Просмотреть файл

@ -11,7 +11,6 @@
#include <stddef.h> // for size_t
#include <stdint.h> // 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;

Просмотреть файл

@ -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;
};

Просмотреть файл

@ -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);

Просмотреть файл

@ -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<gfxASurface> surf =
new gfxQuartzSurface((unsigned char*)image.data(),
image.size(),
gfx::ThebesIntSize(image.size()),
image.stride(),
format);
return surf.forget();

Просмотреть файл

@ -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<gfxImageFormat>(image.format());
surf = new gfxImageSurface((unsigned char *)image.data(),
image.size(),
gfx::ThebesIntSize(image.size()),
image.stride(),
format);
return surf.forget();