pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox Fix build on big endian architectures by b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fba90230008e
branches:  trunk
changeset: 358121:fba90230008e
user:      martin <martin%pkgsrc.org@localhost>
date:      Sun Feb 05 15:41:58 2017 +0000

description:
Fix build on big endian architectures by backporting the fix from
upstream.

diffstat:

 www/firefox/distinfo                                                     |    6 +-
 www/firefox/patches/patch-gfx_2d_BorrowedContext.h                       |   41 +++
 www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp |  104 ++++++++++
 www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.h   |   39 +++
 www/firefox/patches/patch-gfx_layers_moz.build                           |   26 ++
 5 files changed, 215 insertions(+), 1 deletions(-)

diffs (250 lines):

diff -r f81548c34972 -r fba90230008e www/firefox/distinfo
--- a/www/firefox/distinfo      Sun Feb 05 14:41:14 2017 +0000
+++ b/www/firefox/distinfo      Sun Feb 05 15:41:58 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.269 2017/01/27 13:28:11 ryoon Exp $
+$NetBSD: distinfo,v 1.270 2017/02/05 15:41:58 martin Exp $
 
 SHA1 (firefox-51.0.1.source.tar.xz) = b73255fd4f90fd0c1b107b566679da2df3f31cf1
 RMD160 (firefox-51.0.1.source.tar.xz) = 6acc6fc8e3e317842d75b0233a24b0f19c9d3f34
@@ -33,10 +33,14 @@
 SHA1 (patch-dom_plugins_ipc_PluginModuleChild.h) = 15c01df2fa7f989b533ef769ce77438b5e9bfdb9
 SHA1 (patch-dom_system_OSFileConstants.cpp) = 6e5a347c317947c869415d740f25813332ee9597
 SHA1 (patch-extensions_spellcheck_hunspell_glue_mozHunspell.cpp) = 5678e4a44927326de55f1f0fd2907102b314ca10
+SHA1 (patch-gfx_2d_BorrowedContext.h) = 5efa43c865ccd95ffe82fc23db3bde7ef8bf8441
 SHA1 (patch-gfx_cairo_libpixman_src_pixman-arm-neon-asm.S) = 6e91ca436b73affe42ed4e683b3400beb28c4bc6
 SHA1 (patch-gfx_gl_GLContextProviderGLX.cpp) = 2cc997cab71a84c1f50a791693519a0626564426
 SHA1 (patch-gfx_graphite2_moz-gr-update.sh) = 09eb2fa66109d38a3aedc940fcaaee5f91e216ae
 SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 9b357196b795f7698f0763cb6cfcd39b4aea6420
+SHA1 (patch-gfx_layers_composite_LayerManagerComposite.cpp) = b3ef914b5fa735b4740d45d01478f67018532a3a
+SHA1 (patch-gfx_layers_composite_LayerManagerComposite.h) = f4d61ffaecaec7e77909d1d08b5b10837e999741
+SHA1 (patch-gfx_layers_moz.build) = e43f1b234357b0af7f58aaceb275d9d0e3468097
 SHA1 (patch-gfx_moz.build) = 0d669ac6dc1af17ea8ed7e84e4915947c2a6b1ca
 SHA1 (patch-gfx_skia_generate__mozbuild.py) = 0c1faddbda7d819a82a4f1bd97a753c835f0c81d
 SHA1 (patch-gfx_skia_moz.build) = 1def6cf3bce77e9294c0f05f62a33b7baed12b12
diff -r f81548c34972 -r fba90230008e www/firefox/patches/patch-gfx_2d_BorrowedContext.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_2d_BorrowedContext.h        Sun Feb 05 15:41:58 2017 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-gfx_2d_BorrowedContext.h,v 1.1 2017/02/05 15:41:58 martin Exp $
+
+Backport of upstream commit 
+       https://hg.mozilla.org/mozilla-central/rev/c1e18cb7926e
+
+diff gfx/2d/BorrowedContext.h.orig gfx/2d/BorrowedContext.h
+--- gfx/2d/BorrowedContext.h.orig
++++ gfx/2d/BorrowedContext.h
+@@ -190,18 +190,28 @@ public:
+   }
+ 
+   ~BorrowedCGContext() {
+     MOZ_ASSERT(!cg);
+   }
+ 
+   CGContextRef cg;
+ private:
++#ifdef USE_SKIA
+   static CGContextRef BorrowCGContextFromDrawTarget(DrawTarget *aDT);
+   static void ReturnCGContextToDrawTarget(DrawTarget *aDT, CGContextRef cg);
++#else
++  static CGContextRef BorrowCGContextFromDrawTarget(DrawTarget *aDT) {
++    MOZ_CRASH("Not supported without Skia");
++  }
++
++  static void ReturnCGContextToDrawTarget(DrawTarget *aDT, CGContextRef cg) {
++    MOZ_CRASH("not supported without Skia");
++  }
++#endif
+   DrawTarget *mDT;
+ };
+ #endif
+ 
+ } // namespace gfx
+ } // namespace mozilla
+ 
+ #endif // _MOZILLA_GFX_BORROWED_CONTEXT_H
+
+
+
+
diff -r f81548c34972 -r fba90230008e www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp  Sun Feb 05 15:41:58 2017 +0000
@@ -0,0 +1,104 @@
+$NetBSD: patch-gfx_layers_composite_LayerManagerComposite.cpp,v 1.3 2017/02/05 15:41:58 martin Exp $
+
+Backport of upstream commit 
+       https://hg.mozilla.org/mozilla-central/rev/c1e18cb7926e
+
+diff gfx/layers/composite/LayerManagerComposite.cpp.orig gfx/layers/composite/LayerManagerComposite.cpp
+--- gfx/layers/composite/LayerManagerComposite.cpp.orig        2017-01-16 17:16:50.000000000 +0100
++++ gfx/layers/composite/LayerManagerComposite.cpp     2017-02-05 10:58:20.873600806 +0100
+@@ -12,7 +12,6 @@
+ #include "CompositableHost.h"           // for CompositableHost
+ #include "ContainerLayerComposite.h"    // for ContainerLayerComposite, etc
+ #include "FPSCounter.h"                 // for FPSState, FPSCounter
+-#include "PaintCounter.h"               // For PaintCounter
+ #include "FrameMetrics.h"               // for FrameMetrics
+ #include "GeckoProfiler.h"              // for profiler_set_frame_number, etc
+ #include "ImageLayerComposite.h"        // for ImageLayerComposite
+@@ -72,6 +71,10 @@
+ #include "TextRenderer.h"               // for TextRenderer
+ #include "mozilla/layers/CompositorBridgeParent.h"
+ #include "TreeTraversal.h"              // for ForEachNode
++ 
++#ifdef USE_SKIA
++#include "PaintCounter.h"               // For PaintCounter
++#endif
+ 
+ class gfxContext;
+ 
+@@ -133,6 +136,10 @@ LayerManagerComposite::LayerManagerCompo
+ {
+   mTextRenderer = new TextRenderer(aCompositor);
+   MOZ_ASSERT(aCompositor);
++
++#ifdef USE_SKIA
++  mPaintCounter = nullptr;
++#endif
+ }
+ 
+ LayerManagerComposite::~LayerManagerComposite()
+@@ -151,8 +158,10 @@ LayerManagerComposite::Destroy()
+     }
+     mRoot = nullptr;
+     mClonedLayerTreeProperties = nullptr;
+-    mPaintCounter = nullptr;
+     mDestroyed = true;
++#ifdef USE_SKIA
++    mPaintCounter = nullptr;
++#endif
+   }
+ }
+ 
+@@ -564,7 +573,6 @@ LayerManagerComposite::InvalidateDebugOv
+   bool drawFps = gfxPrefs::LayersDrawFPS();
+   bool drawFrameCounter = gfxPrefs::DrawFrameCounter();
+   bool drawFrameColorBars = gfxPrefs::CompositorDrawColorBars();
+-  bool drawPaintTimes = gfxPrefs::AlwaysPaint();
+ 
+   if (drawFps || drawFrameCounter) {
+     aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 256, 256));
+@@ -572,11 +580,16 @@ LayerManagerComposite::InvalidateDebugOv
+   if (drawFrameColorBars) {
+     aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 10, aBounds.height));
+   }
++
++#ifdef USE_SKIA
++  bool drawPaintTimes = gfxPrefs::AlwaysPaint();
+   if (drawPaintTimes) {
+     aInvalidRegion.Or(aInvalidRegion, nsIntRect(PaintCounter::GetPaintRect()));
+   }
++#endif
+ }
+ 
++#ifdef USE_SKIA
+ void
+ LayerManagerComposite::DrawPaintTimes(Compositor* aCompositor)
+ {
+@@ -587,6 +600,7 @@ LayerManagerComposite::DrawPaintTimes(Co
+   TimeDuration compositeTime = TimeStamp::Now() - mRenderStartTime;
+   mPaintCounter->Draw(aCompositor, mLastPaintTime, compositeTime);
+ }
++#endif
+ 
+ static uint16_t sFrameCount = 0;
+ void
+@@ -595,7 +609,6 @@ LayerManagerComposite::RenderDebugOverla
+   bool drawFps = gfxPrefs::LayersDrawFPS();
+   bool drawFrameCounter = gfxPrefs::DrawFrameCounter();
+   bool drawFrameColorBars = gfxPrefs::CompositorDrawColorBars();
+-  bool drawPaintTimes = gfxPrefs::AlwaysPaint();
+ 
+   TimeStamp now = TimeStamp::Now();
+ 
+@@ -736,9 +749,12 @@ LayerManagerComposite::RenderDebugOverla
+     sFrameCount++;
+   }
+ 
++#ifdef USE_SKIA
++  bool drawPaintTimes = gfxPrefs::AlwaysPaint();
+   if (drawPaintTimes) {
+     DrawPaintTimes(mCompositor);
+   }
++#endif
+ }
+ 
+ RefPtr<CompositingRenderTarget>
diff -r f81548c34972 -r fba90230008e www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.h    Sun Feb 05 15:41:58 2017 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-gfx_layers_composite_LayerManagerComposite.h,v 1.1 2017/02/05 15:41:58 martin Exp $
+
+Backport of upstream commit 
+       https://hg.mozilla.org/mozilla-central/rev/c1e18cb7926e
+
+diff gfx/layers/composite/LayerManagerComposite.h.orig gfx/layers/composite/LayerManagerComposite.h
+--- gfx/layers/composite/LayerManagerComposite.h.orig  2017-01-16 17:16:50.000000000 +0100
++++ gfx/layers/composite/LayerManagerComposite.h       2017-02-05 11:02:30.218363514 +0100
+@@ -331,11 +331,6 @@ private:
+ #endif
+ 
+   /**
+-   * Render paint and composite times above the frame.
+-   */
+-  void DrawPaintTimes(Compositor* aCompositor);
+-
+-  /**
+    * We need to know our invalid region before we're ready to render.
+    */
+   void InvalidateDebugOverlay(nsIntRegion& aInvalidRegion, const gfx::IntRect& aBounds);
+@@ -391,9 +386,16 @@ private:
+   bool mLastFrameMissedHWC;
+ 
+   bool mWindowOverlayChanged;
+-  RefPtr<PaintCounter> mPaintCounter;
+   TimeDuration mLastPaintTime;
+   TimeStamp mRenderStartTime;
++
++#ifdef USE_SKIA
++  /**
++   * Render paint and composite times above the frame.
++   */
++  void DrawPaintTimes(Compositor* aCompositor);
++  RefPtr<PaintCounter> mPaintCounter;
++#endif
+ };
+ 
+ /**
+
diff -r f81548c34972 -r fba90230008e www/firefox/patches/patch-gfx_layers_moz.build
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_layers_moz.build    Sun Feb 05 15:41:58 2017 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-gfx_layers_moz.build,v 1.1 2017/02/05 15:41:58 martin Exp $
+
+Backport of upstream commit 
+       https://hg.mozilla.org/mozilla-central/rev/c1e18cb7926e
+
+diff gfx/layers/moz.build.orig gfx/layers/moz.build
+--- gfx/layers/moz.build.orig  2017-01-16 17:16:50.000000000 +0100
++++ gfx/layers/moz.build       2017-02-05 11:06:16.475345819 +0100
+@@ -340,7 +340,6 @@
+     'composite/ImageHost.cpp',
+     'composite/ImageLayerComposite.cpp',
+     'composite/LayerManagerComposite.cpp',
+-    'composite/PaintCounter.cpp',
+     'composite/PaintedLayerComposite.cpp',
+     'composite/TextRenderer.cpp',
+     'composite/TextureHost.cpp',
+@@ -485,3 +484,8 @@
+ 
+ if CONFIG['GNU_CXX']:
+     CXXFLAGS += ['-Wno-error=shadow']
++
++if CONFIG['MOZ_ENABLE_SKIA']:
++  UNIFIED_SOURCES += [
++    'composite/PaintCounter.cpp',
++  ]
+



Home | Main Index | Thread Index | Old Index