Bug 1092555 - Replace some occurences of gfxIntSize by gfx::IntSize in CanvasRenderingContext2D. r=nical"

This commit is contained in:
Del Valle 2014-11-04 14:00:36 +01:00
parent 8e89c86b55
commit 6d1ef3073d
4 changed files with 9 additions and 8 deletions

View File

@ -13,6 +13,7 @@
#include "nsContentUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/gfx/2D.h"
#include "gfx2DGlue.h"
namespace mozilla {
@ -281,7 +282,7 @@ CanvasImageCache::NotifyDrawImage(Element* aImage,
SourceSurface*
CanvasImageCache::Lookup(Element* aImage,
HTMLCanvasElement* aCanvas,
gfxIntSize* aSize)
gfx::IntSize* aSize)
{
if (!gImageCache)
return nullptr;
@ -297,7 +298,7 @@ CanvasImageCache::Lookup(Element* aImage,
gImageCache->MarkUsed(entry->mData);
*aSize = entry->mData->mSize;
*aSize = gfx::ToIntSize(entry->mData->mSize);
return entry->mData->mSourceSurface;
}

View File

@ -43,7 +43,7 @@ public:
*/
static SourceSurface* Lookup(dom::Element* aImage,
dom::HTMLCanvasElement* aCanvas,
gfxIntSize* aSize);
gfx::IntSize* aSize);
/**
* This is the same as Lookup, except it works on any image recently drawn

View File

@ -3957,7 +3957,7 @@ CanvasRenderingContext2D::DrawImage(const HTMLImageOrCanvasOrVideoElement& image
MOZ_ASSERT(optional_argc == 0 || optional_argc == 2 || optional_argc == 6);
RefPtr<SourceSurface> srcSurf;
gfxIntSize imgSize;
gfx::IntSize imgSize;
Element* element;
@ -4008,7 +4008,7 @@ CanvasRenderingContext2D::DrawImage(const HTMLImageOrCanvasOrVideoElement& image
return;
}
imgSize = res.mSize;
imgSize = gfx::ToIntSize(res.mSize);
// Scale sw/sh based on aspect ratio
if (image.IsHTMLVideoElement()) {
@ -4028,7 +4028,7 @@ CanvasRenderingContext2D::DrawImage(const HTMLImageOrCanvasOrVideoElement& image
if (res.mSourceSurface) {
if (res.mImageRequest) {
CanvasImageCache::NotifyDrawImage(element, mCanvasElement, res.mImageRequest,
res.mSourceSurface, imgSize);
res.mSourceSurface, ThebesIntSize(imgSize));
}
srcSurf = res.mSourceSurface;
@ -4113,7 +4113,7 @@ CanvasRenderingContext2D::DrawDirectlyToCanvas(
mgfx::Rect* bounds,
mgfx::Rect dest,
mgfx::Rect src,
gfxIntSize imgSize)
gfx::IntSize imgSize)
{
MOZ_ASSERT(src.width > 0 && src.height > 0,
"Need positive source width and height");

View File

@ -726,7 +726,7 @@ protected:
mozilla::gfx::Rect* bounds,
mozilla::gfx::Rect dest,
mozilla::gfx::Rect src,
gfxIntSize imgSize);
gfx::IntSize imgSize);
nsString& GetFont()
{