mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1158120 - Replace nsIntSize by mozilla::gfx::IntSize in gfx/thebes. r=nical
This commit is contained in:
parent
7cade29011
commit
44c2163525
@ -323,7 +323,7 @@ gfxASurface::Finish()
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxASurface::CreateSimilarSurface(gfxContentType aContent,
|
||||
const nsIntSize& aSize)
|
||||
const IntSize& aSize)
|
||||
{
|
||||
if (!mSurface || !mSurfaceValid) {
|
||||
return nullptr;
|
||||
@ -359,7 +359,7 @@ gfxASurface::CopyToARGB32ImageSurface()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const nsIntSize size = GetSize();
|
||||
const IntSize size = GetSize();
|
||||
nsRefPtr<gfxImageSurface> imgSurface =
|
||||
new gfxImageSurface(size, gfxImageFormat::ARGB32);
|
||||
|
||||
@ -382,7 +382,7 @@ gfxASurface::CairoStatus()
|
||||
|
||||
/* static */
|
||||
bool
|
||||
gfxASurface::CheckSurfaceSize(const nsIntSize& sz, int32_t limit)
|
||||
gfxASurface::CheckSurfaceSize(const IntSize& sz, int32_t limit)
|
||||
{
|
||||
if (sz.width < 0 || sz.height < 0) {
|
||||
NS_WARNING("Surface width or height < 0!");
|
||||
@ -702,10 +702,10 @@ gfxASurface::GetEmptyOpaqueRect()
|
||||
return empty;
|
||||
}
|
||||
|
||||
const nsIntSize
|
||||
const IntSize
|
||||
gfxASurface::GetSize() const
|
||||
{
|
||||
return nsIntSize(-1, -1);
|
||||
return IntSize(-1, -1);
|
||||
}
|
||||
|
||||
already_AddRefed<gfxImageSurface>
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
* Returns null on error.
|
||||
*/
|
||||
virtual already_AddRefed<gfxASurface> CreateSimilarSurface(gfxContentType aType,
|
||||
const nsIntSize& aSize);
|
||||
const mozilla::gfx::IntSize& aSize);
|
||||
|
||||
/**
|
||||
* Returns an image surface for this surface, or nullptr if not supported.
|
||||
@ -118,7 +118,7 @@ public:
|
||||
* using 4 bytes per pixel; optionally, make sure that either dimension
|
||||
* doesn't exceed the given limit.
|
||||
*/
|
||||
static bool CheckSurfaceSize(const nsIntSize& sz, int32_t limit = 0);
|
||||
static bool CheckSurfaceSize(const mozilla::gfx::IntSize& sz, int32_t limit = 0);
|
||||
|
||||
/* Provide a stride value that will respect all alignment requirements of
|
||||
* the accelerated image-rendering code.
|
||||
@ -167,7 +167,7 @@ public:
|
||||
|
||||
static int32_t BytePerPixelFromFormat(gfxImageFormat format);
|
||||
|
||||
virtual const nsIntSize GetSize() const;
|
||||
virtual const mozilla::gfx::IntSize GetSize() const;
|
||||
|
||||
void SetOpaqueRect(const gfxRect& aRect);
|
||||
|
||||
@ -228,10 +228,10 @@ public:
|
||||
}
|
||||
|
||||
virtual ~gfxUnknownSurface() { }
|
||||
virtual const nsIntSize GetSize() const override { return mSize; }
|
||||
virtual const mozilla::gfx::IntSize GetSize() const override { return mSize; }
|
||||
|
||||
private:
|
||||
nsIntSize mSize;
|
||||
mozilla::gfx::IntSize mSize;
|
||||
};
|
||||
|
||||
#endif /* GFX_ASURFACE_H */
|
||||
|
@ -49,7 +49,7 @@ gfxGdkNativeRenderer::DrawWithXlib(cairo_surface_t* surface,
|
||||
}
|
||||
|
||||
void
|
||||
gfxGdkNativeRenderer::Draw(gfxContext* ctx, nsIntSize size,
|
||||
gfxGdkNativeRenderer::Draw(gfxContext* ctx, mozilla::gfx::IntSize size,
|
||||
uint32_t flags, GdkColormap* colormap)
|
||||
{
|
||||
mColormap = colormap;
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
* @param dpy a display to use for the drawing if ctx doesn't have one
|
||||
*/
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
void Draw(gfxContext* ctx, nsIntSize size,
|
||||
void Draw(gfxContext* ctx, mozilla::gfx::IntSize size,
|
||||
uint32_t flags, GdkColormap* colormap);
|
||||
#endif
|
||||
|
||||
|
@ -19,7 +19,7 @@ struct gfxSize : public mozilla::gfx::BaseSize<gfxFloat, gfxSize> {
|
||||
|
||||
gfxSize() : Super() {}
|
||||
gfxSize(gfxFloat aWidth, gfxFloat aHeight) : Super(aWidth, aHeight) {}
|
||||
MOZ_IMPLICIT gfxSize(const nsIntSize& aSize) : Super(aSize.width, aSize.height) {}
|
||||
MOZ_IMPLICIT gfxSize(const mozilla::gfx::IntSize& aSize) : Super(aSize.width, aSize.height) {}
|
||||
};
|
||||
|
||||
struct gfxPoint : public mozilla::gfx::BasePoint<gfxFloat, gfxPoint> {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "gfxXlibSurface.h"
|
||||
|
||||
nsresult
|
||||
gfxQtNativeRenderer::Draw(gfxContext* ctx, nsIntSize size,
|
||||
gfxQtNativeRenderer::Draw(gfxContext* ctx, mozilla::gfx::IntSize size,
|
||||
uint32_t flags, Screen* screen, Visual* visual)
|
||||
{
|
||||
Display *dpy = DisplayOfScreen(screen);
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
* successful, a pointer to the new gfxASurface is stored in *resultSurface,
|
||||
* otherwise *resultSurface is set to nullptr.
|
||||
*/
|
||||
nsresult Draw(gfxContext* ctx, nsIntSize size,
|
||||
nsresult Draw(gfxContext* ctx, mozilla::gfx::IntSize size,
|
||||
uint32_t flags, Screen* screen, Visual* visual);
|
||||
};
|
||||
|
||||
|
@ -136,7 +136,7 @@ FINISH:
|
||||
* @return True if we took the direct path
|
||||
*/
|
||||
bool
|
||||
gfxXlibNativeRenderer::DrawDirect(gfxContext *ctx, nsIntSize size,
|
||||
gfxXlibNativeRenderer::DrawDirect(gfxContext *ctx, IntSize size,
|
||||
uint32_t flags,
|
||||
Screen *screen, Visual *visual)
|
||||
{
|
||||
@ -154,7 +154,7 @@ gfxXlibNativeRenderer::DrawDirect(gfxContext *ctx, nsIntSize size,
|
||||
}
|
||||
|
||||
bool
|
||||
gfxXlibNativeRenderer::DrawCairo(cairo_t* cr, nsIntSize size,
|
||||
gfxXlibNativeRenderer::DrawCairo(cairo_t* cr, IntSize size,
|
||||
uint32_t flags,
|
||||
Screen *screen, Visual *visual)
|
||||
{
|
||||
@ -308,7 +308,7 @@ enum DrawingMethod {
|
||||
static cairo_surface_t*
|
||||
CreateTempXlibSurface (cairo_surface_t* cairoTarget,
|
||||
DrawTarget* drawTarget,
|
||||
nsIntSize size,
|
||||
IntSize size,
|
||||
bool canDrawOverBackground,
|
||||
uint32_t flags, Screen *screen, Visual *visual,
|
||||
DrawingMethod *method)
|
||||
@ -463,7 +463,7 @@ CopyXlibSurfaceToImage(cairo_surface_t *tempXlibSurface,
|
||||
}
|
||||
|
||||
void
|
||||
gfxXlibNativeRenderer::Draw(gfxContext* ctx, nsIntSize size,
|
||||
gfxXlibNativeRenderer::Draw(gfxContext* ctx, IntSize size,
|
||||
uint32_t flags, Screen *screen, Visual *visual)
|
||||
{
|
||||
gfxMatrix matrix = ctx->CurrentMatrix();
|
||||
|
Loading…
Reference in New Issue
Block a user