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:
@@ -23,7 +23,7 @@ public:
|
|||||||
MacIOSurface* GetSurface() { return mSurface; }
|
MacIOSurface* GetSurface() { return mSurface; }
|
||||||
|
|
||||||
gfx::IntSize GetSize() {
|
gfx::IntSize GetSize() {
|
||||||
return gfxIntSize(mSurface->GetDevicePixelWidth(), mSurface->GetDevicePixelHeight());
|
return gfx::IntSize(mSurface->GetDevicePixelWidth(), mSurface->GetDevicePixelHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ISharedImage* AsSharedImage() MOZ_OVERRIDE { return this; }
|
virtual ISharedImage* AsSharedImage() MOZ_OVERRIDE { return this; }
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "ISurfaceAllocator.h"
|
#include "ISurfaceAllocator.h"
|
||||||
#include <sys/types.h> // for int32_t
|
#include <sys/types.h> // for int32_t
|
||||||
|
#include "gfx2DGlue.h" // for IntSize
|
||||||
#include "gfxASurface.h" // for gfxASurface, etc
|
#include "gfxASurface.h" // for gfxASurface, etc
|
||||||
#include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat
|
#include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat
|
||||||
#include "gfxSharedImageSurface.h" // for gfxSharedImageSurface
|
#include "gfxSharedImageSurface.h" // for gfxSharedImageSurface
|
||||||
@@ -42,7 +43,7 @@ IsSurfaceDescriptorValid(const SurfaceDescriptor& aSurface)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ISurfaceAllocator::AllocSharedImageSurface(const gfxIntSize& aSize,
|
ISurfaceAllocator::AllocSharedImageSurface(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
gfxSharedImageSurface** aBuffer)
|
gfxSharedImageSurface** aBuffer)
|
||||||
{
|
{
|
||||||
@@ -50,7 +51,10 @@ ISurfaceAllocator::AllocSharedImageSurface(const gfxIntSize& aSize,
|
|||||||
gfxImageFormat format = gfxPlatform::GetPlatform()->OptimalFormatForContent(aContent);
|
gfxImageFormat format = gfxPlatform::GetPlatform()->OptimalFormatForContent(aContent);
|
||||||
|
|
||||||
nsRefPtr<gfxSharedImageSurface> back =
|
nsRefPtr<gfxSharedImageSurface> back =
|
||||||
gfxSharedImageSurface::CreateUnsafe(this, aSize, format, shmemType);
|
gfxSharedImageSurface::CreateUnsafe(this,
|
||||||
|
gfx::ThebesIntSize(aSize),
|
||||||
|
format,
|
||||||
|
shmemType);
|
||||||
if (!back)
|
if (!back)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -60,7 +64,7 @@ ISurfaceAllocator::AllocSharedImageSurface(const gfxIntSize& aSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ISurfaceAllocator::AllocSurfaceDescriptor(const gfxIntSize& aSize,
|
ISurfaceAllocator::AllocSurfaceDescriptor(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
SurfaceDescriptor* aBuffer)
|
SurfaceDescriptor* aBuffer)
|
||||||
{
|
{
|
||||||
@@ -68,7 +72,7 @@ ISurfaceAllocator::AllocSurfaceDescriptor(const gfxIntSize& aSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ISurfaceAllocator::AllocSurfaceDescriptorWithCaps(const gfxIntSize& aSize,
|
ISurfaceAllocator::AllocSurfaceDescriptorWithCaps(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
uint32_t aCaps,
|
uint32_t aCaps,
|
||||||
SurfaceDescriptor* aBuffer)
|
SurfaceDescriptor* aBuffer)
|
||||||
@@ -162,7 +166,7 @@ ISurfaceAllocator::DestroySharedSurface(SurfaceDescriptor* aSurface)
|
|||||||
|
|
||||||
#if !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS)
|
#if !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS)
|
||||||
bool
|
bool
|
||||||
ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize&,
|
ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize&,
|
||||||
gfxContentType,
|
gfxContentType,
|
||||||
uint32_t,
|
uint32_t,
|
||||||
SurfaceDescriptor*)
|
SurfaceDescriptor*)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <stddef.h> // for size_t
|
#include <stddef.h> // for size_t
|
||||||
#include <stdint.h> // for uint32_t
|
#include <stdint.h> // for uint32_t
|
||||||
#include "gfxTypes.h"
|
#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/ipc/SharedMemory.h" // for SharedMemory, etc
|
||||||
#include "mozilla/RefPtr.h"
|
#include "mozilla/RefPtr.h"
|
||||||
#include "nsIMemoryReporter.h" // for MemoryUniReporter
|
#include "nsIMemoryReporter.h" // for MemoryUniReporter
|
||||||
@@ -100,15 +100,15 @@ public:
|
|||||||
virtual void DeallocShmem(mozilla::ipc::Shmem& aShmem) = 0;
|
virtual void DeallocShmem(mozilla::ipc::Shmem& aShmem) = 0;
|
||||||
|
|
||||||
// was AllocBuffer
|
// was AllocBuffer
|
||||||
virtual bool AllocSharedImageSurface(const gfxIntSize& aSize,
|
virtual bool AllocSharedImageSurface(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
gfxSharedImageSurface** aBuffer);
|
gfxSharedImageSurface** aBuffer);
|
||||||
virtual bool AllocSurfaceDescriptor(const gfxIntSize& aSize,
|
virtual bool AllocSurfaceDescriptor(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
SurfaceDescriptor* aBuffer);
|
SurfaceDescriptor* aBuffer);
|
||||||
|
|
||||||
// was AllocBufferWithCaps
|
// was AllocBufferWithCaps
|
||||||
virtual bool AllocSurfaceDescriptorWithCaps(const gfxIntSize& aSize,
|
virtual bool AllocSurfaceDescriptorWithCaps(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
uint32_t aCaps,
|
uint32_t aCaps,
|
||||||
SurfaceDescriptor* aBuffer);
|
SurfaceDescriptor* aBuffer);
|
||||||
@@ -134,7 +134,7 @@ protected:
|
|||||||
// DeprecatedTextureClient/Host rework.
|
// DeprecatedTextureClient/Host rework.
|
||||||
virtual bool IsOnCompositorSide() const = 0;
|
virtual bool IsOnCompositorSide() const = 0;
|
||||||
static bool PlatformDestroySharedSurface(SurfaceDescriptor* aSurface);
|
static bool PlatformDestroySharedSurface(SurfaceDescriptor* aSurface);
|
||||||
virtual bool PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
|
virtual bool PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
uint32_t aCaps,
|
uint32_t aCaps,
|
||||||
SurfaceDescriptor* aBuffer);
|
SurfaceDescriptor* aBuffer);
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ LayerTransactionChild::Destroy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PGrallocBufferChild*
|
PGrallocBufferChild*
|
||||||
LayerTransactionChild::AllocPGrallocBufferChild(const gfxIntSize&,
|
LayerTransactionChild::AllocPGrallocBufferChild(const IntSize&,
|
||||||
const uint32_t&,
|
const uint32_t&,
|
||||||
const uint32_t&,
|
const uint32_t&,
|
||||||
MaybeMagicGrallocBufferHandle*)
|
MaybeMagicGrallocBufferHandle*)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||||
return GrallocBufferActor::Create();
|
return GrallocBufferActor::Create();
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
||||||
|
|
||||||
#include <stdint.h> // for uint32_t
|
#include <stdint.h> // for uint32_t
|
||||||
#include "gfxPoint.h" // for gfxIntSize
|
|
||||||
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
||||||
#include "mozilla/ipc/ProtocolUtils.h"
|
#include "mozilla/ipc/ProtocolUtils.h"
|
||||||
#include "mozilla/layers/PLayerTransactionChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
@@ -47,9 +46,9 @@ protected:
|
|||||||
friend class detail::RefCounted<LayerTransactionChild, detail::AtomicRefCount>;
|
friend class detail::RefCounted<LayerTransactionChild, detail::AtomicRefCount>;
|
||||||
|
|
||||||
virtual PGrallocBufferChild*
|
virtual PGrallocBufferChild*
|
||||||
AllocPGrallocBufferChild(const gfxIntSize&,
|
AllocPGrallocBufferChild(const IntSize&,
|
||||||
const uint32_t&, const uint32_t&,
|
const uint32_t&, const uint32_t&,
|
||||||
MaybeMagicGrallocBufferHandle*) MOZ_OVERRIDE;
|
MaybeMagicGrallocBufferHandle*) MOZ_OVERRIDE;
|
||||||
virtual bool
|
virtual bool
|
||||||
DeallocPGrallocBufferChild(PGrallocBufferChild* actor) MOZ_OVERRIDE;
|
DeallocPGrallocBufferChild(PGrallocBufferChild* actor) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|||||||
@@ -550,10 +550,10 @@ LayerTransactionParent::RecvClearCachedResources()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PGrallocBufferParent*
|
PGrallocBufferParent*
|
||||||
LayerTransactionParent::AllocPGrallocBufferParent(const gfxIntSize& aSize,
|
LayerTransactionParent::AllocPGrallocBufferParent(const IntSize& aSize,
|
||||||
const uint32_t& aFormat,
|
const uint32_t& aFormat,
|
||||||
const uint32_t& aUsage,
|
const uint32_t& aUsage,
|
||||||
MaybeMagicGrallocBufferHandle* aOutHandle)
|
MaybeMagicGrallocBufferHandle* aOutHandle)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||||
return GrallocBufferActor::Create(aSize, aFormat, aUsage, aOutHandle);
|
return GrallocBufferActor::Create(aSize, aFormat, aUsage, aOutHandle);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#include <stddef.h> // for size_t
|
#include <stddef.h> // for size_t
|
||||||
#include <stdint.h> // for uint64_t, uint32_t
|
#include <stdint.h> // for uint64_t, uint32_t
|
||||||
#include "CompositableTransactionParent.h"
|
#include "CompositableTransactionParent.h"
|
||||||
#include "gfxPoint.h" // for gfxIntSize
|
|
||||||
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
||||||
#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc
|
#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc
|
||||||
#include "mozilla/layers/PLayerTransactionParent.h"
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
||||||
@@ -96,9 +95,9 @@ protected:
|
|||||||
gfx3DMatrix* aTransform) MOZ_OVERRIDE;
|
gfx3DMatrix* aTransform) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual PGrallocBufferParent*
|
virtual PGrallocBufferParent*
|
||||||
AllocPGrallocBufferParent(const gfxIntSize& aSize,
|
AllocPGrallocBufferParent(const IntSize& aSize,
|
||||||
const uint32_t& aFormat, const uint32_t& aUsage,
|
const uint32_t& aFormat, const uint32_t& aUsage,
|
||||||
MaybeMagicGrallocBufferHandle* aOutHandle) MOZ_OVERRIDE;
|
MaybeMagicGrallocBufferHandle* aOutHandle) MOZ_OVERRIDE;
|
||||||
virtual bool
|
virtual bool
|
||||||
DeallocPGrallocBufferParent(PGrallocBufferParent* actor) MOZ_OVERRIDE;
|
DeallocPGrallocBufferParent(PGrallocBufferParent* actor) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
include protocol PGrallocBuffer;
|
include protocol PGrallocBuffer;
|
||||||
|
|
||||||
|
|
||||||
using gfxIntSize from "nsSize.h";
|
|
||||||
using struct gfxPoint from "gfxPoint.h";
|
using struct gfxPoint from "gfxPoint.h";
|
||||||
using struct nsIntRect from "nsRect.h";
|
using struct nsIntRect from "nsRect.h";
|
||||||
using nsIntRegion from "nsRegion.h";
|
using nsIntRegion from "nsRegion.h";
|
||||||
@@ -144,7 +143,7 @@ struct RGBImage {
|
|||||||
|
|
||||||
struct MemoryImage {
|
struct MemoryImage {
|
||||||
uintptr_t data;
|
uintptr_t data;
|
||||||
gfxIntSize size;
|
IntSize size;
|
||||||
uint32_t stride;
|
uint32_t stride;
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ parent:
|
|||||||
* - used for GL rendering to a buffer which the compositor
|
* - used for GL rendering to a buffer which the compositor
|
||||||
* treats as a texture
|
* 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);
|
returns (MaybeMagicGrallocBufferHandle handle);
|
||||||
async PLayer();
|
async PLayer();
|
||||||
async PCompositable(TextureInfo aTextureInfo);
|
async PCompositable(TextureInfo aTextureInfo);
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
#include "mozilla/layers/LayerManagerComposite.h"
|
#include "mozilla/layers/LayerManagerComposite.h"
|
||||||
#include "mozilla/layers/CompositorTypes.h"
|
#include "mozilla/layers/CompositorTypes.h"
|
||||||
|
|
||||||
|
#include "gfx2DGlue.h"
|
||||||
#include "gfxPlatform.h"
|
#include "gfxPlatform.h"
|
||||||
|
|
||||||
#include "gfxSharedQuartzSurface.h"
|
#include "gfxSharedQuartzSurface.h"
|
||||||
@@ -20,7 +22,7 @@ namespace mozilla {
|
|||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
|
ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
|
||||||
gfxContentType aContent,
|
gfxContentType aContent,
|
||||||
uint32_t aCaps,
|
uint32_t aCaps,
|
||||||
SurfaceDescriptor* aBuffer)
|
SurfaceDescriptor* aBuffer)
|
||||||
@@ -41,7 +43,7 @@ ShadowLayerForwarder::PlatformOpenDescriptor(OpenMode aMode,
|
|||||||
|
|
||||||
nsRefPtr<gfxASurface> surf =
|
nsRefPtr<gfxASurface> surf =
|
||||||
new gfxQuartzSurface((unsigned char*)image.data(),
|
new gfxQuartzSurface((unsigned char*)image.data(),
|
||||||
image.size(),
|
gfx::ThebesIntSize(image.size()),
|
||||||
image.stride(),
|
image.stride(),
|
||||||
format);
|
format);
|
||||||
return surf.forget();
|
return surf.forget();
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "Layers.h" // for Layer
|
#include "Layers.h" // for Layer
|
||||||
#include "RenderTrace.h" // for RenderTraceScope
|
#include "RenderTrace.h" // for RenderTraceScope
|
||||||
#include "ShadowLayerChild.h" // for ShadowLayerChild
|
#include "ShadowLayerChild.h" // for ShadowLayerChild
|
||||||
|
#include "gfx2DGlue.h" // for Moz2D transition helpers
|
||||||
#include "gfxImageSurface.h" // for gfxImageSurface
|
#include "gfxImageSurface.h" // for gfxImageSurface
|
||||||
#include "gfxPlatform.h" // for gfxImageFormat, gfxPlatform
|
#include "gfxPlatform.h" // for gfxImageFormat, gfxPlatform
|
||||||
#include "gfxSharedImageSurface.h" // for gfxSharedImageSurface
|
#include "gfxSharedImageSurface.h" // for gfxSharedImageSurface
|
||||||
@@ -627,7 +628,7 @@ ShadowLayerForwarder::OpenDescriptor(OpenMode aMode,
|
|||||||
gfxImageFormat format
|
gfxImageFormat format
|
||||||
= static_cast<gfxImageFormat>(image.format());
|
= static_cast<gfxImageFormat>(image.format());
|
||||||
surf = new gfxImageSurface((unsigned char *)image.data(),
|
surf = new gfxImageSurface((unsigned char *)image.data(),
|
||||||
image.size(),
|
gfx::ThebesIntSize(image.size()),
|
||||||
image.stride(),
|
image.stride(),
|
||||||
format);
|
format);
|
||||||
return surf.forget();
|
return surf.forget();
|
||||||
|
|||||||
Reference in New Issue
Block a user