]> git.pld-linux.org Git - packages/thunderbird.git/commitdiff
- replace workaround with proper fix for https://bugzilla.mozilla.org/show_bug.cgi...
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 6 Jun 2012 05:32:57 +0000 (05:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bug-722975-workaround.patch -> 1.2
    system-cairo.patch -> 1.1

bug-722975-workaround.patch [deleted file]
system-cairo.patch [new file with mode: 0644]

diff --git a/bug-722975-workaround.patch b/bug-722975-workaround.patch
deleted file mode 100644 (file)
index 1e91631..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-https://bugzilla.mozilla.org/show_bug.cgi?id=722975
-https://bug722975.bugzilla.mozilla.org/attachment.cgi?id=595000
-
---- firefox/gfx/thebes/gfxPlatform.cpp~        2012-02-07 11:59:39.717184907 +0000
-+++ firefox/gfx/thebes/gfxPlatform.cpp 2012-02-07 13:06:01.084668445 +0000
-@@ -446,6 +446,7 @@
-   static_cast<SourceSurface*>(srcBuffer)->Release();
- }
-+#ifdef MOZ_TREE_CAIRO
- void SourceSnapshotDetached(cairo_surface_t *nullSurf)
- {
-   gfxImageSurface* origSurf =
-@@ -453,6 +454,7 @@
-   origSurf->SetData(&kSourceSurface, NULL, NULL);
- }
-+#endif
- RefPtr<SourceSurface>
- gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
-@@ -522,6 +524,7 @@
-                                                      imgSurface->Stride(),
-                                                      format);
-+    #ifdef MOZ_TREE_CAIRO
-     cairo_surface_t *nullSurf =
-       cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
-     cairo_surface_set_user_data(nullSurf,
-@@ -530,6 +533,7 @@
-                               NULL);
-     cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
-     cairo_surface_destroy(nullSurf);
-+    #endif
-   }
-   srcBuffer->AddRef();
diff --git a/system-cairo.patch b/system-cairo.patch
new file mode 100644 (file)
index 0000000..9ae0888
--- /dev/null
@@ -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;
+ }
This page took 0.399691 seconds and 4 git commands to generate.