firefox-13-fix-cairo-build.patch rediff

This commit is contained in:
Alexander Khryukin 2012-08-27 22:21:19 -04:00
parent 06df8760c9
commit 2bad1134d9

View file

@ -1,12 +1,8 @@
diff -r baec1efc87a4 gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp Sun Mar 04 00:38:41 2012 +0000
+++ b/gfx/thebes/gfxPlatform.cpp Wed May 16 17:37:10 2012 +0200
@@ -448,21 +448,19 @@ gfxPlatform::CreateDrawTargetForSurface(
cairo_user_data_key_t kSourceSurface;
void SourceBufferDestroy(void *srcBuffer)
{
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
index 114cda9..3471966 100644
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -443,11 +443,10 @@ void SourceBufferDestroy(void *srcBuffer)
static_cast<SourceSurface*>(srcBuffer)->Release();
}
@ -15,41 +11,27 @@ diff -r baec1efc87a4 gfx/thebes/gfxPlatform.cpp
{
- gfxImageSurface* origSurf =
- static_cast<gfxImageSurface*>(cairo_surface_get_user_data(nullSurf, &kSourceSurface));
-
+ gfxImageSurface *origSurf = static_cast<gfxImageSurface*>(nullSurf);
origSurf->SetData(&kSourceSurface, NULL, NULL);
}
RefPtr<SourceSurface>
gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
{
void *userData = aSurface->GetData(&kSourceSurface);
@@ -544,14 +543,9 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa
@@ -524,24 +522,18 @@ gfxPlatform::GetSourceSurfaceForSurface(
NS_RUNTIMEABORT("Invalid surface format!");
}
srcBuffer = aTarget->CreateSourceSurfaceFromData(imgSurface->Data(),
IntSize(imgSurface->GetSize().width, imgSurface->GetSize().height),
imgSurface->Stride(),
format);
- cairo_surface_t *nullSurf =
- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
- cairo_surface_set_user_data(nullSurf,
- &kSourceSurface,
- imgSurface,
- NULL);
- &kSourceSurface,
- imgSurface,
- NULL);
- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
- cairo_surface_destroy(nullSurf);
+ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic",
+ (const unsigned char *) "data", 4, SourceSnapshotDetached, imgSurface.get());
+ (const unsigned char *) "data", 4, SourceSnapshotDetached, imgSurface.get());
+
}
srcBuffer->AddRef();
aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
return srcBuffer;
}