merge mozilla-inbound to mozilla-central a=merge
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 29 May 2017 10:19:53 +0200
changeset 409197 cce4d83d2b99ffedbd67a2f40ce26e53e9ae27ab
parent 409189 fc4d115e549ae73dc220bdeb486de0bd47bacedc (current diff)
parent 409196 22b07d362869f35af94524f077e0613f9b041fb9 (diff)
child 409198 7e418c7971483ff58313276fa4e421e130d58014
child 409205 99de7cf38c1289a33f92f848185a165eedb75880
child 409298 35c323e749d5ae5dbc9b41307899dddbbe2a4047
child 409359 73a610ae4080b4598337654d6344d184e915f18c
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone55.0a1
first release with
nightly linux32
cce4d83d2b99 / 55.0a1 / 20170529100231 / files
nightly linux64
cce4d83d2b99 / 55.0a1 / 20170529100231 / files
nightly mac
cce4d83d2b99 / 55.0a1 / 20170529030204 / files
nightly win32
cce4d83d2b99 / 55.0a1 / 20170529030204 / files
nightly win64
cce4d83d2b99 / 55.0a1 / 20170529030204 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge mozilla-inbound to mozilla-central a=merge
layout/svg/nsSVGMaskFrameNEON.cpp
layout/svg/nsSVGMaskFrameNEON.h
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -970,18 +970,18 @@ endif
 #
 #   $(call CARGO_BUILD)
 define CARGO_BUILD
 env $(environment_cleaner) $(rustflags_override) \
 	CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
 	RUSTC=$(RUSTC) \
 	MOZ_SRC=$(topsrcdir) \
 	MOZ_DIST=$(ABS_DIST) \
-	LIBCLANG_PATH=$(MOZ_LIBCLANG_PATH) \
-	CLANG_PATH=$(MOZ_CLANG_PATH) \
+	LIBCLANG_PATH="$(MOZ_LIBCLANG_PATH)" \
+	CLANG_PATH="$(MOZ_CLANG_PATH)" \
 	PKG_CONFIG_ALLOW_CROSS=1 \
 	RUST_BACKTRACE=1 \
 	MOZ_TOPOBJDIR=$(topobjdir) \
 	$(1) \
 	$(CARGO) build $(cargo_build_flags)
 endef
 
 cargo_linker_env_var := CARGO_TARGET_$(RUST_TARGET_ENV_NAME)_LINKER
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -50,16 +50,22 @@ static const char* sEGLExtensionNames[] 
     "EGL_KHR_image",
     "EGL_KHR_fence_sync",
     "EGL_ANDROID_native_fence_sync",
     "EGL_ANDROID_image_crop",
     "EGL_ANGLE_platform_angle",
     "EGL_ANGLE_platform_angle_d3d",
     "EGL_ANGLE_d3d_share_handle_client_buffer",
     "EGL_KHR_create_context",
+    "EGL_KHR_stream",
+    "EGL_KHR_stream_consumer_gltexture",
+    "EGL_EXT_device_base",
+    "EGL_EXT_device_query",
+    "EGL_NV_stream_consumer_gltexture_yuv",
+    "EGL_ANGLE_stream_producer_d3d_texture_nv12",
 };
 
 #if defined(ANDROID)
 
 static PRLibrary* LoadApitraceLibrary()
 {
     // Initialization of gfx prefs here is only needed during the unit tests...
     gfxPrefs::GetSingleton();
@@ -591,16 +597,86 @@ GLLibraryEGL::EnsureInitialized(bool for
             END_OF_SYMBOLS
         };
         if (!fnLoadSymbols(nativeFenceSymbols)) {
             NS_ERROR("EGL supports ANDROID_native_fence_sync without exposing its functions!");
             MarkExtensionUnsupported(ANDROID_native_fence_sync);
         }
     }
 
+    if (IsExtensionSupported(KHR_stream)) {
+        const GLLibraryLoader::SymLoadStruct streamSymbols[] = {
+            SYMBOL(CreateStreamKHR),
+            SYMBOL(DestroyStreamKHR),
+            SYMBOL(QueryStreamKHR),
+            END_OF_SYMBOLS
+        };
+        if (!fnLoadSymbols(streamSymbols)) {
+            NS_ERROR("EGL supports KHR_stream without exposing its functions!");
+            MarkExtensionUnsupported(KHR_stream);
+        }
+    }
+
+    if (IsExtensionSupported(KHR_stream_consumer_gltexture)) {
+        const GLLibraryLoader::SymLoadStruct streamConsumerSymbols[] = {
+            SYMBOL(StreamConsumerAcquireKHR),
+            SYMBOL(StreamConsumerReleaseKHR),
+            END_OF_SYMBOLS
+        };
+        if (!fnLoadSymbols(streamConsumerSymbols)) {
+            NS_ERROR("EGL supports KHR_stream_consumer_gltexture without exposing its functions!");
+            MarkExtensionUnsupported(KHR_stream_consumer_gltexture);
+        }
+    }
+
+    if (IsExtensionSupported(EXT_device_base)) {
+        const GLLibraryLoader::SymLoadStruct deviceBaseSymbols[] = {
+            SYMBOL(QueryDisplayAttribEXT),
+            END_OF_SYMBOLS
+        };
+        if (!fnLoadSymbols(deviceBaseSymbols)) {
+            NS_ERROR("EGL supports EXT_device_base without exposing its functions!");
+            MarkExtensionUnsupported(EXT_device_base);
+        }
+    }
+
+    if (IsExtensionSupported(EXT_device_query)) {
+        const GLLibraryLoader::SymLoadStruct queryDisplaySymbols[] = {
+            SYMBOL(QueryDeviceAttribEXT),
+            END_OF_SYMBOLS
+        };
+        if (!fnLoadSymbols(queryDisplaySymbols)) {
+            NS_ERROR("EGL supports EXT_device_query without exposing its functions!");
+            MarkExtensionUnsupported(EXT_device_query);
+        }
+    }
+
+    if (IsExtensionSupported(NV_stream_consumer_gltexture_yuv)) {
+        const GLLibraryLoader::SymLoadStruct nvStreamSymbols[] = {
+            SYMBOL(StreamConsumerGLTextureExternalAttribsNV),
+            END_OF_SYMBOLS
+        };
+        if (!fnLoadSymbols(nvStreamSymbols)) {
+            NS_ERROR("EGL supports NV_stream_consumer_gltexture_yuv without exposing its functions!");
+            MarkExtensionUnsupported(NV_stream_consumer_gltexture_yuv);
+        }
+    }
+
+    if (IsExtensionSupported(ANGLE_stream_producer_d3d_texture_nv12)) {
+        const GLLibraryLoader::SymLoadStruct nvStreamSymbols[] = {
+            SYMBOL(CreateStreamProducerD3DTextureNV12ANGLE),
+            SYMBOL(StreamPostD3DTextureNV12ANGLE),
+            END_OF_SYMBOLS
+        };
+        if (!fnLoadSymbols(nvStreamSymbols)) {
+            NS_ERROR("EGL supports ANGLE_stream_producer_d3d_texture_nv12 without exposing its functions!");
+            MarkExtensionUnsupported(ANGLE_stream_producer_d3d_texture_nv12);
+        }
+    }
+
     mInitialized = true;
     reporter.SetSuccessful();
     return true;
 }
 
 #undef SYMBOL
 #undef END_OF_SYMBOLS
 
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -101,16 +101,22 @@ public:
         KHR_image,
         KHR_fence_sync,
         ANDROID_native_fence_sync,
         EGL_ANDROID_image_crop,
         ANGLE_platform_angle,
         ANGLE_platform_angle_d3d,
         ANGLE_d3d_share_handle_client_buffer,
         KHR_create_context,
+        KHR_stream,
+        KHR_stream_consumer_gltexture,
+        EXT_device_base,
+        EXT_device_query,
+        NV_stream_consumer_gltexture_yuv,
+        ANGLE_stream_producer_d3d_texture_nv12,
         Extensions_Max
     };
 
     bool IsExtensionSupported(EGLExtensions aKnownExtension) const {
         return mAvailableExtensions[aKnownExtension];
     }
 
     void MarkExtensionUnsupported(EGLExtensions aKnownExtension) {
@@ -277,16 +283,52 @@ public:
         WRAP( fClientWaitSyncKHR(dpy, sync, flags, timeout) )
 
     EGLBoolean fGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint* value) const
         WRAP(  fGetSyncAttribKHR(dpy, sync, attribute, value) )
 
     EGLint    fDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSync sync) const
         WRAP( fDupNativeFenceFDANDROID(dpy, sync) )
 
+    //KHR_stream
+    EGLStreamKHR fCreateStreamKHR(EGLDisplay dpy, const EGLint* attrib_list) const
+        WRAP(    fCreateStreamKHR(dpy, attrib_list) )
+
+    EGLStreamKHR fDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) const
+        WRAP(    fDestroyStreamKHR(dpy, stream) )
+
+    EGLBoolean  fQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint* value) const
+        WRAP(   fQueryStreamKHR(dpy, stream, attribute, value) )
+
+    // KHR_stream_consumer_gltexture
+    EGLBoolean  fStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) const
+        WRAP(   fStreamConsumerAcquireKHR(dpy, stream) )
+
+    EGLBoolean  fStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) const
+        WRAP(   fStreamConsumerReleaseKHR(dpy, stream) )
+
+    // EXT_device_base
+    EGLBoolean  fQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib* value) const
+        WRAP(   fQueryDisplayAttribEXT(dpy, attribute, value) )
+
+    // EXT_device_query
+    EGLBoolean  fQueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribute, EGLAttrib* value) const
+        WRAP(   fQueryDeviceAttribEXT(device, attribute, value) )
+
+    // NV_stream_consumer_gltexture_yuv
+    EGLBoolean  fStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) const
+        WRAP(   fStreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list) )
+
+    // ANGLE_stream_producer_d3d_texture_nv12
+    EGLBoolean  fCreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) const
+        WRAP(   fCreateStreamProducerD3DTextureNV12ANGLE(dpy, stream, attrib_list) )
+
+    EGLBoolean  fStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, void* texture, const EGLAttrib* attrib_list) const
+        WRAP(   fStreamPostD3DTextureNV12ANGLE(dpy, stream, texture, attrib_list) )
+
     void           fANGLEPlatformInitialize(angle::Platform* platform) const
         VOID_WRAP( fANGLEPlatformInitialize(platform) )
 
     void fANGLEPlatformShutdown() const
         VOID_WRAP( fANGLEPlatformShutdown() )
 
 #undef WRAP
 #undef VOID_WRAP
@@ -405,16 +447,48 @@ private:
                                                  const EGLint* attrib_list);
         EGLBoolean (GLAPIENTRY * fDestroySyncKHR)(EGLDisplay dpy, EGLSync sync);
         EGLint     (GLAPIENTRY * fClientWaitSyncKHR)(EGLDisplay dpy, EGLSync sync,
                                                      EGLint flags,
                                                      EGLTime timeout);
         EGLBoolean (GLAPIENTRY * fGetSyncAttribKHR)(EGLDisplay dpy, EGLSync sync,
                                                     EGLint attribute, EGLint* value);
         EGLint     (GLAPIENTRY * fDupNativeFenceFDANDROID)(EGLDisplay dpy, EGLSync sync);
+        //KHR_stream
+        EGLStreamKHR (GLAPIENTRY * fCreateStreamKHR)(EGLDisplay dpy, const EGLint* attrib_list);
+        EGLStreamKHR (GLAPIENTRY * fDestroyStreamKHR)(EGLDisplay dpy, EGLStreamKHR stream);
+        EGLBoolean (GLAPIENTRY * fQueryStreamKHR)(EGLDisplay dpy,
+                                                  EGLStreamKHR stream,
+                                                  EGLenum attribute,
+                                                  EGLint* value);
+        // KHR_stream_consumer_gltexture
+        EGLBoolean (GLAPIENTRY * fStreamConsumerAcquireKHR)(EGLDisplay dpy,
+                                                            EGLStreamKHR stream);
+        EGLBoolean (GLAPIENTRY * fStreamConsumerReleaseKHR)(EGLDisplay dpy,
+                                                            EGLStreamKHR stream);
+        // EXT_device_base
+        EGLBoolean (GLAPIENTRY * fQueryDisplayAttribEXT)(EGLDisplay dpy,
+                                                         EGLint attribute,
+                                                         EGLAttrib* value);
+        // EXT_device_query
+        EGLBoolean (GLAPIENTRY * fQueryDeviceAttribEXT)(EGLDeviceEXT device,
+                                                        EGLint attribute,
+                                                        EGLAttrib* value);
+        // NV_stream_consumer_gltexture_yuv
+        EGLBoolean (GLAPIENTRY * fStreamConsumerGLTextureExternalAttribsNV)(EGLDisplay dpy,
+                                                                            EGLStreamKHR stream,
+                                                                            const EGLAttrib* attrib_list);
+        // ANGLE_stream_producer_d3d_texture_nv12
+        EGLBoolean (GLAPIENTRY * fCreateStreamProducerD3DTextureNV12ANGLE)(EGLDisplay dpy,
+                                                                           EGLStreamKHR stream,
+                                                                           const EGLAttrib* attrib_list);
+        EGLBoolean (GLAPIENTRY * fStreamPostD3DTextureNV12ANGLE)(EGLDisplay dpy,
+                                                                 EGLStreamKHR stream,
+                                                                 void* texture,
+                                                                 const EGLAttrib* attrib_list);
         void       (GLAPIENTRY * fANGLEPlatformInitialize)(angle::Platform* platform);
         void       (GLAPIENTRY * fANGLEPlatformShutdown)();
     } mSymbols;
 
 public:
 #ifdef MOZ_B2G
     EGLContext CachedCurrentContext() {
         return sCurrentContext.get();
--- a/gfx/gl/GLTypes.h
+++ b/gfx/gl/GLTypes.h
@@ -69,24 +69,27 @@ typedef void (GLAPIENTRY *GLDEBUGPROC)(G
                                        const GLchar* message,
                                        const GLvoid* userParam);
 
 // EGL types
 typedef void* EGLImage;
 typedef int EGLint;
 typedef unsigned int EGLBoolean;
 typedef unsigned int EGLenum;
+typedef intptr_t EGLAttrib;
 typedef void* EGLConfig;
 typedef void* EGLContext;
 typedef void* EGLDisplay;
+typedef void* EGLDeviceEXT;
 typedef void* EGLSurface;
 typedef void* EGLClientBuffer;
 typedef void* EGLCastToRelevantPtr;
 typedef void* EGLImage;
 typedef void* EGLSync;
+typedef void* EGLStreamKHR;
 typedef uint64_t EGLTime;
 
 #define EGL_NO_CONTEXT       ((EGLContext)0)
 #define EGL_NO_DISPLAY       ((EGLDisplay)0)
 #define EGL_NO_SURFACE       ((EGLSurface)0)
 #define EGL_NO_CONFIG        ((EGLConfig)nullptr)
 #define EGL_NO_SYNC          ((EGLSync)0)
 #define EGL_NO_IMAGE         ((EGLImage)0)
--- a/js/src/gc/Allocator.cpp
+++ b/js/src/gc/Allocator.cpp
@@ -183,17 +183,17 @@ GCRuntime::tryNewTenuredThing(JSContext*
     return t;
 }
 
 template <AllowGC allowGC>
 bool
 GCRuntime::checkAllocatorState(JSContext* cx, AllocKind kind)
 {
     if (allowGC) {
-        if (!gcIfNeededPerAllocation(cx))
+        if (!gcIfNeededAtAllocation(cx))
             return false;
     }
 
 #if defined(JS_GC_ZEAL) || defined(DEBUG)
     MOZ_ASSERT_IF(cx->compartment()->isAtomsCompartment(),
                   kind == AllocKind::ATOM ||
                   kind == AllocKind::FAT_INLINE_ATOM ||
                   kind == AllocKind::SYMBOL ||
@@ -218,17 +218,17 @@ GCRuntime::checkAllocatorState(JSContext
             ReportOutOfMemory(cx);
         return false;
     }
 
     return true;
 }
 
 bool
-GCRuntime::gcIfNeededPerAllocation(JSContext* cx)
+GCRuntime::gcIfNeededAtAllocation(JSContext* cx)
 {
 #ifdef JS_GC_ZEAL
     if (needZealousGC())
         runDebugGC();
 #endif
 
     // Invoking the interrupt callback can fail and we can't usefully
     // handle that here. Just check in case we need to collect instead.
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -911,17 +911,17 @@ class GCRuntime
     friend class ArenaLists;
     Chunk* pickChunk(const AutoLockGC& lock,
                      AutoMaybeStartBackgroundAllocation& maybeStartBGAlloc);
     Arena* allocateArena(Chunk* chunk, Zone* zone, AllocKind kind,
                          ShouldCheckThresholds checkThresholds, const AutoLockGC& lock);
     void arenaAllocatedDuringGC(JS::Zone* zone, Arena* arena);
 
     // Allocator internals
-    MOZ_MUST_USE bool gcIfNeededPerAllocation(JSContext* cx);
+    MOZ_MUST_USE bool gcIfNeededAtAllocation(JSContext* cx);
     template <typename T>
     static void checkIncrementalZoneState(JSContext* cx, T* t);
     static TenuredCell* refillFreeListFromAnyThread(JSContext* cx, AllocKind thingKind,
                                                     size_t thingSize);
     static TenuredCell* refillFreeListFromActiveCooperatingThread(JSContext* cx, AllocKind thingKind,
                                                                   size_t thingSize);
     static TenuredCell* refillFreeListFromHelperThread(JSContext* cx, AllocKind thingKind);
 
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -1132,12 +1132,8 @@ this.Extension = class extends Extension
   get optionalOrigins() {
     if (this._optionalOrigins == null) {
       let origins = this.manifest.optional_permissions.filter(perm => classifyPermission(perm).origin);
       this._optionalOrigins = new MatchPattern(origins);
     }
     return this._optionalOrigins;
   }
 };
-
-Services.ppmm.loadProcessScript("data:,new " + function() {
-  Components.utils.import("resource://gre/modules/ExtensionContent.jsm");
-}, true);