+++ /dev/null
---- orig/gfx/thebes/gfxPlatform.cpp 2013-07-30 21:50:32.000000000 -0400
-+++ new/gfx/thebes/gfxPlatform.cpp 2013-07-30 21:48:08.000000000 -0400
-@@ -543,6 +543,7 @@
- delete static_cast<SourceSurfaceUserData*>(srcSurfUD);
- }
-
-+#if MOZ_TREE_CAIRO
- void SourceSnapshotDetached(cairo_surface_t *nullSurf)
- {
- gfxImageSurface* origSurf =
-@@ -550,6 +551,13 @@
-
- origSurf->SetData(&kSourceSurface, NULL, NULL);
- }
-+#else
-+void SourceSnapshotDetached(void *nullSurf)
-+{
-+ gfxImageSurface* origSurf = static_cast<gfxImageSurface*>(nullSurf);
-+ origSurf->SetData(&kSourceSurface, NULL, NULL);
-+}
-+#endif
-
- RefPtr<SourceSurface>
- gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
-@@ -662,6 +670,7 @@
-
- }
-
-+#if MOZ_TREE_CAIRO
- cairo_surface_t *nullSurf =
- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
- cairo_surface_set_user_data(nullSurf,
-@@ -670,6 +679,10 @@
- NULL);
- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
- cairo_surface_destroy(nullSurf);
-+#else
-+ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic",
-+ (const unsigned char*) "data", 4, SourceSnapshotDetached, imgSurface.get());
-+#endif
- }
-
- SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData;