From b3ea7e8d582c2f87b9dfa86eda9e04b2ea2a9f4e Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Wed, 24 Mar 2010 15:51:15 +0100 Subject: [PATCH] Bug 553852: D2D backend should destroy image surfaces when done with them. r=jrmuizel --- gfx/cairo/cairo/src/cairo-d2d-surface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp index 3602126c75cf..4e6a86225db7 100644 --- a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp +++ b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp @@ -1498,6 +1498,7 @@ _cairo_d2d_release_source_image(void *abstract_surface, } cairo_d2d_surface_t *d2dsurf = static_cast(abstract_surface); + cairo_surface_destroy(&image->base); ID3D10Texture2D *softTexture = (ID3D10Texture2D*)image_extra; softTexture->Unmap(0); @@ -1579,6 +1580,9 @@ _cairo_d2d_release_dest_image(void *abstract_surface, rect.left = rect.top = 0; rect.right = size.width; rect.bottom = size.height; + + cairo_surface_destroy(&image->base); + softTexture->Unmap(0); D3D10Factory::Device()->CopyResource(d2dsurf->surface, softTexture); softTexture->Release();