packages: xulrunner/system-cairo.patch (NEW), xulrunner/xulrunner-bug-72297...

baggins baggins at pld-linux.org
Tue Jun 5 19:05:59 CEST 2012


Author: baggins                      Date: Tue Jun  5 17:05:58 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- replace workaround with proper fix for https://bugzilla.mozilla.org/show_bug.cgi?id=722975

---- Files affected:
packages/xulrunner:
   system-cairo.patch (NONE -> 1.1)  (NEW), xulrunner-bug-722975-workaround.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/xulrunner/system-cairo.patch
diff -u /dev/null packages/xulrunner/system-cairo.patch:1.1
--- /dev/null	Tue Jun  5 19:05:59 2012
+++ packages/xulrunner/system-cairo.patch	Tue Jun  5 19:05:53 2012
@@ -0,0 +1,54 @@
+diff -r baec1efc87a4 gfx/thebes/gfxPlatform.cpp
+--- a/mozilla/gfx/thebes/gfxPlatform.cpp	Sun Mar 04 00:38:41 2012 +0000
++++ b/mozilla/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)
+ {
+   static_cast<SourceSurface*>(srcBuffer)->Release();
+ }
+ 
+-void SourceSnapshotDetached(cairo_surface_t *nullSurf)
++void SourceSnapshotDetached(void *nullSurf)
+ {
+-  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);
+ 
+@@ -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);
+-    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());
+   }
+ 
+   srcBuffer->AddRef();
+   aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
+ 
+   return srcBuffer;
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list