Bug 859377 (Part 4) - Make ClippedImage use gfxImageSurfaces on Windows. r=me

This commit is contained in:
Seth Fowler 2013-04-30 16:28:25 -07:00
parent 601260f1a0
commit 9497b33cd3

View File

@ -228,9 +228,15 @@ ClippedImage::GetFrameInternal(const nsIntSize& aViewportSize,
aFlags)) {
// Create a surface to draw into.
gfxImageSurface::gfxImageFormat format = gfxASurface::ImageFormatARGB32;
nsRefPtr<gfxASurface> surface = gfxPlatform::GetPlatform()
->CreateOffscreenSurface(gfxIntSize(mClip.width, mClip.height),
gfxImageSurface::ContentFromFormat(format));
# if defined(XP_WIN)
nsRefPtr<gfxASurface> surface =
new gfxImageSurface(gfxIntSize(mClip.width, mClip.height), format);
# else
nsRefPtr<gfxASurface> surface = gfxPlatform::GetPlatform()
->CreateOffscreenSurface(gfxIntSize(mClip.width, mClip.height),
gfxImageSurface::ContentFromFormat(format));
# endif
// Create our callback.
nsRefPtr<gfxDrawingCallback> drawTileCallback =