From 328eadd703a6d0074abe6b44fe47310ae189894e Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 19 May 2015 04:42:00 +0000 Subject: [PATCH] community/xulrunner: remove patch --- community/xulrunner/48e130d69836.patch | 375 ------------------------- community/xulrunner/PKGBUILD | 10 +- 2 files changed, 2 insertions(+), 383 deletions(-) delete mode 100644 community/xulrunner/48e130d69836.patch diff --git a/community/xulrunner/48e130d69836.patch b/community/xulrunner/48e130d69836.patch deleted file mode 100644 index d700fe876..000000000 --- a/community/xulrunner/48e130d69836.patch +++ /dev/null @@ -1,375 +0,0 @@ - -# HG changeset patch -# User Mike Hommey -# Date 1425858139 -32400 -# Node ID 48e130d698364f246d9ab870044617fbf9e21f20 -# Parent 08d7c1951e618f91863d34bddfdffe880bf78bf6 -Bug 1136958 - Reintroduce pixman code path removed in bug 1097776 for --disable-skia builds. r=jmuizelaar, a=sledru - -diff --git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp ---- a/gfx/layers/basic/BasicCompositor.cpp -+++ b/gfx/layers/basic/BasicCompositor.cpp -@@ -12,18 +12,23 @@ - #include "gfx2DGlue.h" - #include "mozilla/gfx/2D.h" - #include "mozilla/gfx/Helpers.h" - #include "gfxUtils.h" - #include "YCbCrUtils.h" - #include - #include "ImageContainer.h" - #include "gfxPrefs.h" -+#ifdef MOZ_ENABLE_SKIA - #include "skia/SkCanvas.h" // for SkCanvas - #include "skia/SkBitmapDevice.h" // for SkBitmapDevice -+#else -+#define PIXMAN_DONT_DEFINE_STDINT -+#include "pixman.h" // for pixman_f_transform, etc -+#endif - - namespace mozilla { - using namespace mozilla::gfx; - - namespace layers { - - class DataTextureSourceBasic : public DataTextureSource - , public TextureSourceBasic -@@ -172,16 +177,17 @@ DrawSurfaceWithTextureCoords(DrawTarget - // Only use REPEAT if aTextureCoords is outside (0, 0, 1, 1). - gfx::Rect unitRect(0, 0, 1, 1); - ExtendMode mode = unitRect.Contains(aTextureCoords) ? ExtendMode::CLAMP : ExtendMode::REPEAT; - - FillRectWithMask(aDest, aDestRect, aSource, aFilter, DrawOptions(aOpacity), - mode, aMask, aMaskTransform, &matrix); - } - -+#ifdef MOZ_ENABLE_SKIA - static SkMatrix - Matrix3DToSkia(const gfx3DMatrix& aMatrix) - { - SkMatrix transform; - transform.setAll(aMatrix._11, - aMatrix._21, - aMatrix._41, - aMatrix._12, -@@ -190,20 +196,20 @@ Matrix3DToSkia(const gfx3DMatrix& aMatri - aMatrix._14, - aMatrix._24, - aMatrix._44); - - return transform; - } - - static void --SkiaTransform(DataSourceSurface* aDest, -- DataSourceSurface* aSource, -- const gfx3DMatrix& aTransform, -- const Point& aDestOffset) -+Transform(DataSourceSurface* aDest, -+ DataSourceSurface* aSource, -+ const gfx3DMatrix& aTransform, -+ const Point& aDestOffset) - { - if (aTransform.IsSingular()) { - return; - } - - IntSize destSize = aDest->GetSize(); - SkImageInfo destInfo = SkImageInfo::Make(destSize.width, - destSize.height, -@@ -229,16 +235,88 @@ SkiaTransform(DataSourceSurface* aDest, - - SkPaint paint; - paint.setXfermodeMode(SkXfermode::kSrc_Mode); - paint.setAntiAlias(true); - paint.setFilterLevel(SkPaint::kLow_FilterLevel); - SkRect destRect = SkRect::MakeXYWH(0, 0, srcSize.width, srcSize.height); - destCanvas.drawBitmapRectToRect(src, nullptr, destRect, &paint); - } -+#else -+static pixman_transform -+Matrix3DToPixman(const gfx3DMatrix& aMatrix) -+{ -+ pixman_f_transform transform; -+ -+ transform.m[0][0] = aMatrix._11; -+ transform.m[0][1] = aMatrix._21; -+ transform.m[0][2] = aMatrix._41; -+ transform.m[1][0] = aMatrix._12; -+ transform.m[1][1] = aMatrix._22; -+ transform.m[1][2] = aMatrix._42; -+ transform.m[2][0] = aMatrix._14; -+ transform.m[2][1] = aMatrix._24; -+ transform.m[2][2] = aMatrix._44; -+ -+ pixman_transform result; -+ pixman_transform_from_pixman_f_transform(&result, &transform); -+ -+ return result; -+} -+ -+static void -+Transform(DataSourceSurface* aDest, -+ DataSourceSurface* aSource, -+ const gfx3DMatrix& aTransform, -+ const Point& aDestOffset) -+{ -+ IntSize destSize = aDest->GetSize(); -+ pixman_image_t* dest = pixman_image_create_bits(PIXMAN_a8r8g8b8, -+ destSize.width, -+ destSize.height, -+ (uint32_t*)aDest->GetData(), -+ aDest->Stride()); -+ -+ IntSize srcSize = aSource->GetSize(); -+ pixman_image_t* src = pixman_image_create_bits(PIXMAN_a8r8g8b8, -+ srcSize.width, -+ srcSize.height, -+ (uint32_t*)aSource->GetData(), -+ aSource->Stride()); -+ -+ NS_ABORT_IF_FALSE(src && dest, "Failed to create pixman images?"); -+ -+ pixman_transform pixTransform = Matrix3DToPixman(aTransform); -+ pixman_transform pixTransformInverted; -+ -+ // If the transform is singular then nothing would be drawn anyway, return here -+ if (!pixman_transform_invert(&pixTransformInverted, &pixTransform)) { -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+ return; -+ } -+ pixman_image_set_transform(src, &pixTransformInverted); -+ -+ pixman_image_composite32(PIXMAN_OP_SRC, -+ src, -+ nullptr, -+ dest, -+ aDestOffset.x, -+ aDestOffset.y, -+ 0, -+ 0, -+ 0, -+ 0, -+ destSize.width, -+ destSize.height); -+ -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+} -+#endif - - static inline IntRect - RoundOut(Rect r) - { - r.RoundOut(); - return IntRect(r.x, r.y, r.width, r.height); - } - -@@ -368,22 +446,26 @@ BasicCompositor::DrawQuad(const gfx::Rec - } - - if (!aTransform.Is2D()) { - dest->Flush(); - - RefPtr snapshot = dest->Snapshot(); - RefPtr source = snapshot->GetDataSurface(); - RefPtr temp = -- Factory::CreateDataSourceSurface(RoundOut(transformBounds).Size(), SurfaceFormat::B8G8R8A8, true); -+ Factory::CreateDataSourceSurface(RoundOut(transformBounds).Size(), SurfaceFormat::B8G8R8A8 -+#ifdef MOZ_ENABLE_SKIA -+ , true -+#endif -+ ); - if (NS_WARN_IF(!temp)) { - return; - } - -- SkiaTransform(temp, source, new3DTransform, transformBounds.TopLeft()); -+ Transform(temp, source, new3DTransform, transformBounds.TopLeft()); - - transformBounds.MoveTo(0, 0); - buffer->DrawSurface(temp, transformBounds, transformBounds); - } - - buffer->PopClip(); - } - -diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp ---- a/gfx/layers/basic/BasicLayerManager.cpp -+++ b/gfx/layers/basic/BasicLayerManager.cpp -@@ -41,18 +41,23 @@ - #include "nsAutoPtr.h" // for nsRefPtr - #include "nsCOMPtr.h" // for already_AddRefed - #include "nsDebug.h" // for NS_ASSERTION, etc - #include "nsISupportsImpl.h" // for gfxContext::Release, etc - #include "nsPoint.h" // for nsIntPoint - #include "nsRect.h" // for nsIntRect - #include "nsRegion.h" // for nsIntRegion, etc - #include "nsTArray.h" // for nsAutoTArray -+#ifdef MOZ_ENABLE_SKIA - #include "skia/SkCanvas.h" // for SkCanvas - #include "skia/SkBitmapDevice.h" // for SkBitmapDevice -+#else -+#define PIXMAN_DONT_DEFINE_STDINT -+#include "pixman.h" // for pixman_f_transform, etc -+#endif - class nsIWidget; - - namespace mozilla { - namespace layers { - - using namespace mozilla::gfx; - - /** -@@ -601,16 +606,17 @@ void - BasicLayerManager::SetRoot(Layer* aLayer) - { - NS_ASSERTION(aLayer, "Root can't be null"); - NS_ASSERTION(aLayer->Manager() == this, "Wrong manager"); - NS_ASSERTION(InConstruction(), "Only allowed in construction phase"); - mRoot = aLayer; - } - -+#ifdef MOZ_ENABLE_SKIA - static SkMatrix - BasicLayerManager_Matrix3DToSkia(const gfx3DMatrix& aMatrix) - { - SkMatrix transform; - transform.setAll(aMatrix._11, - aMatrix._21, - aMatrix._41, - aMatrix._12, -@@ -619,20 +625,20 @@ BasicLayerManager_Matrix3DToSkia(const g - aMatrix._14, - aMatrix._24, - aMatrix._44); - - return transform; - } - - static void --SkiaTransform(const gfxImageSurface* aDest, -- RefPtr aSrc, -- const gfx3DMatrix& aTransform, -- gfxPoint aDestOffset) -+Transform(const gfxImageSurface* aDest, -+ RefPtr aSrc, -+ const gfx3DMatrix& aTransform, -+ gfxPoint aDestOffset) - { - if (aTransform.IsSingular()) { - return; - } - - IntSize destSize = ToIntSize(aDest->GetSize()); - SkImageInfo destInfo = SkImageInfo::Make(destSize.width, - destSize.height, -@@ -658,16 +664,88 @@ SkiaTransform(const gfxImageSurface* aDe - - SkPaint paint; - paint.setXfermodeMode(SkXfermode::kSrc_Mode); - paint.setAntiAlias(true); - paint.setFilterLevel(SkPaint::kLow_FilterLevel); - SkRect destRect = SkRect::MakeXYWH(0, 0, srcSize.width, srcSize.height); - destCanvas.drawBitmapRectToRect(src, nullptr, destRect, &paint); - } -+#else -+static pixman_transform -+BasicLayerManager_Matrix3DToPixman(const gfx3DMatrix& aMatrix) -+{ -+ pixman_f_transform transform; -+ -+ transform.m[0][0] = aMatrix._11; -+ transform.m[0][1] = aMatrix._21; -+ transform.m[0][2] = aMatrix._41; -+ transform.m[1][0] = aMatrix._12; -+ transform.m[1][1] = aMatrix._22; -+ transform.m[1][2] = aMatrix._42; -+ transform.m[2][0] = aMatrix._14; -+ transform.m[2][1] = aMatrix._24; -+ transform.m[2][2] = aMatrix._44; -+ -+ pixman_transform result; -+ pixman_transform_from_pixman_f_transform(&result, &transform); -+ -+ return result; -+} -+ -+static void -+Transform(const gfxImageSurface* aDest, -+ RefPtr aSrc, -+ const gfx3DMatrix& aTransform, -+ gfxPoint aDestOffset) -+{ -+ IntSize destSize = ToIntSize(aDest->GetSize()); -+ pixman_image_t* dest = pixman_image_create_bits(aDest->Format() == gfxImageFormat::ARGB32 ? PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8, -+ destSize.width, -+ destSize.height, -+ (uint32_t*)aDest->Data(), -+ aDest->Stride()); -+ -+ IntSize srcSize = aSrc->GetSize(); -+ pixman_image_t* src = pixman_image_create_bits(aSrc->GetFormat() == SurfaceFormat::B8G8R8A8 ? PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8, -+ srcSize.width, -+ srcSize.height, -+ (uint32_t*)aSrc->GetData(), -+ aSrc->Stride()); -+ -+ NS_ABORT_IF_FALSE(src && dest, "Failed to create pixman images?"); -+ -+ pixman_transform pixTransform = BasicLayerManager_Matrix3DToPixman(aTransform); -+ pixman_transform pixTransformInverted; -+ -+ // If the transform is singular then nothing would be drawn anyway, return here -+ if (!pixman_transform_invert(&pixTransformInverted, &pixTransform)) { -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+ return; -+ } -+ pixman_image_set_transform(src, &pixTransformInverted); -+ -+ pixman_image_composite32(PIXMAN_OP_SRC, -+ src, -+ nullptr, -+ dest, -+ aDestOffset.x, -+ aDestOffset.y, -+ 0, -+ 0, -+ 0, -+ 0, -+ destSize.width, -+ destSize.height); -+ -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+} -+#endif - - /** - * Transform a surface using a gfx3DMatrix and blit to the destination if - * it is efficient to do so. - * - * @param aSource Source surface. - * @param aDest Desintation context. - * @param aBounds Area represented by aSource. -@@ -699,17 +777,17 @@ Transform3D(RefPtr aSourc - aDestRect.height), - gfxImageFormat::ARGB32); - gfxPoint offset = aDestRect.TopLeft(); - - // Include a translation to the correct origin. - gfx3DMatrix translation = gfx3DMatrix::Translation(aBounds.x, aBounds.y, 0); - - // Transform the content and offset it such that the content begins at the origin. -- SkiaTransform(destImage, aSource->GetDataSurface(), translation * aTransform, offset); -+ Transform(destImage, aSource->GetDataSurface(), translation * aTransform, offset); - - // If we haven't actually drawn to aDest then return our temporary image so - // that the caller can do this. - return destImage.forget(); - } - - void - BasicLayerManager::PaintSelfOrChildren(PaintLayerContext& aPaintContext, - diff --git a/community/xulrunner/PKGBUILD b/community/xulrunner/PKGBUILD index fd7f099c4..35db7ab83 100644 --- a/community/xulrunner/PKGBUILD +++ b/community/xulrunner/PKGBUILD @@ -6,7 +6,6 @@ # ALARM: Kevin Mihelich # - added --disable-elf-hack/neon to mozconfig # - set extra CFLAG for v5 -# - patch for skia FTBFS on ARM pkgname=xulrunner pkgver=38.0.1 @@ -20,15 +19,13 @@ url="http://wiki.mozilla.org/XUL:Xul_Runner" source=(ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$pkgver/source/xulrunner-$pkgver.source.tar.bz2 mozconfig mozilla-pkgconfig.patch - shared-libs.patch - 48e130d69836.patch) + shared-libs.patch) options=('!emptydirs' 'staticlibs') replaces=('xulrunner-oss') sha256sums=('5b59bd8065c44c11742339f04963667ec9d8f3783b0b9dc743d0d3e77163a937' '08e7c8e40ca3ab68f91b18b84a4fbbba00767c88d84c0cfcdd52fe5e36083207' '1aa9ebe67542a2b8c28905d070829ada5b29438c6a7961f2b0cdd6b92d8b9f5c' - '59d9fc421bc10a5515b73e159f44a72365bf7b7e8b3fc8a8c46043ef40bd3a40' - 'ab2d45b70d2006b539af3ea6e6f119d8aa62ef26f9b0d9813b728f22bf7af1de') + '59d9fc421bc10a5515b73e159f44a72365bf7b7e8b3fc8a8c46043ef40bd3a40') prepare() { cd "$srcdir/mozilla-release" @@ -38,9 +35,6 @@ prepare() { patch -Np1 -i ../mozilla-pkgconfig.patch patch -Np1 -i ../shared-libs.patch - # https://bugzilla.mozilla.org/show_bug.cgi?id=1136958 - patch -p1 -i ../48e130d69836.patch - # WebRTC build tries to execute "python" and expects Python 2 # Workaround taken from chromium PKGBUILD mkdir "$srcdir/python2-path"