From 2bad1134d94b31f7a554eab709cf995278b5add2 Mon Sep 17 00:00:00 2001 From: Alexander Khryukin Date: Mon, 27 Aug 2012 22:21:19 -0400 Subject: [PATCH] firefox-13-fix-cairo-build.patch rediff --- firefox-13-fix-cairo-build.patch | 42 +++++++++----------------------- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/firefox-13-fix-cairo-build.patch b/firefox-13-fix-cairo-build.patch index 4b68911..55e9230 100644 --- a/firefox-13-fix-cairo-build.patch +++ b/firefox-13-fix-cairo-build.patch @@ -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(srcBuffer)->Release(); } @@ -15,41 +11,27 @@ diff -r baec1efc87a4 gfx/thebes/gfxPlatform.cpp { - gfxImageSurface* origSurf = - static_cast(cairo_surface_get_user_data(nullSurf, &kSourceSurface)); -- + + gfxImageSurface *origSurf = static_cast(nullSurf); origSurf->SetData(&kSourceSurface, NULL, NULL); } - RefPtr - 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; - } -