Bug 1342450 - Rename MOZ_ENABLE_WEBRENDER to MOZ_BUILD_WEBRENDER. r=rhunt draft
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 22 Mar 2017 14:24:02 -0400
changeset 503040 3bce7511d9ab343f0888d957a963e9197a9024a9
parent 502997 e03e0c60462c775c7558a1dc9d5cf2076c3cd1f9
child 503041 65387f61976c16c6e9990592d603a9f464ce2851
push id50466
push userkgupta@mozilla.com
push dateWed, 22 Mar 2017 18:24:40 +0000
reviewersrhunt
bugs1342450
milestone55.0a1
Bug 1342450 - Rename MOZ_ENABLE_WEBRENDER to MOZ_BUILD_WEBRENDER. r=rhunt MozReview-Commit-ID: 3GkmCJJq8et
gfx/gl/GLLibraryEGL.cpp
gfx/layers/ipc/CompositorBridgeParent.cpp
gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
gfx/thebes/gfxPlatform.cpp
gfx/webrender_bindings/webrender_ffi.h
modules/libpref/init/all.js
toolkit/library/gtest/rust/moz.build
toolkit/library/moz.build
toolkit/library/rust/moz.build
toolkit/moz.configure
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -149,17 +149,17 @@ GetAndInitWARPDisplay(GLLibraryEGL& egl,
 
 static bool
 IsAccelAngleSupported(const nsCOMPtr<nsIGfxInfo>& gfxInfo,
                       nsACString* const out_failureId)
 {
     if (CompositorThreadHolder::IsInCompositorThread()) {
         // We can only enter here with WebRender, so assert that this is a
         // WebRender-enabled build.
-#ifndef MOZ_ENABLE_WEBRENDER
+#ifndef MOZ_BUILD_WEBRENDER
         MOZ_ASSERT(false);
 #endif
         return true;
     }
     int32_t angleSupport;
     nsCString failureId;
     gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo,
                                          nsIGfxInfo::FEATURE_WEBGL_ANGLE,
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1574,17 +1574,17 @@ CompositorBridgeParent::RecvAdoptChild(c
 }
 
 PWebRenderBridgeParent*
 CompositorBridgeParent::AllocPWebRenderBridgeParent(const wr::PipelineId& aPipelineId,
                                                     const LayoutDeviceIntSize& aSize,
                                                     TextureFactoryIdentifier* aTextureFactoryIdentifier,
                                                     uint32_t* aIdNamespace)
 {
-#ifndef MOZ_ENABLE_WEBRENDER
+#ifndef MOZ_BUILD_WEBRENDER
   // Extra guard since this in the parent process and we don't want a malicious
   // child process invoking this codepath before it's ready
   MOZ_RELEASE_ASSERT(false);
 #endif
   MOZ_ASSERT(aPipelineId.mHandle == mRootLayerTreeID);
   MOZ_ASSERT(!mWrBridge);
   MOZ_ASSERT(!mCompositor);
   MOZ_ASSERT(!mCompositorScheduler);
@@ -1609,17 +1609,17 @@ CompositorBridgeParent::AllocPWebRenderB
   sIndirectLayerTrees[pipelineHandle].mWrBridge = mWrBridge;
   *aTextureFactoryIdentifier = mWrBridge->GetTextureFactoryIdentifier();
   return mWrBridge;
 }
 
 bool
 CompositorBridgeParent::DeallocPWebRenderBridgeParent(PWebRenderBridgeParent* aActor)
 {
-#ifndef MOZ_ENABLE_WEBRENDER
+#ifndef MOZ_BUILD_WEBRENDER
   // Extra guard since this in the parent process and we don't want a malicious
   // child process invoking this codepath before it's ready
   MOZ_RELEASE_ASSERT(false);
 #endif
   WebRenderBridgeParent* parent = static_cast<WebRenderBridgeParent*>(aActor);
   {
     MonitorAutoLock lock(*sIndirectLayerTreesLock);
     auto it = sIndirectLayerTrees.find(parent->PipelineId().mHandle);
--- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
@@ -198,17 +198,17 @@ CrossProcessCompositorBridgeParent::Deal
 }
 
 PWebRenderBridgeParent*
 CrossProcessCompositorBridgeParent::AllocPWebRenderBridgeParent(const wr::PipelineId& aPipelineId,
                                                                 const LayoutDeviceIntSize& aSize,
                                                                 TextureFactoryIdentifier* aTextureFactoryIdentifier,
                                                                 uint32_t *aIdNamespace)
 {
-#ifndef MOZ_ENABLE_WEBRENDER
+#ifndef MOZ_BUILD_WEBRENDER
   // Extra guard since this in the parent process and we don't want a malicious
   // child process invoking this codepath before it's ready
   MOZ_RELEASE_ASSERT(false);
 #endif
   // Check to see if this child process has access to this layer tree.
   if (!LayerTreeOwnerTracker::Get()->IsMapped(aPipelineId.mHandle, OtherPid())) {
     NS_ERROR("Unexpected layers id in AllocPAPZCTreeManagerParent; dropping message...");
     return nullptr;
@@ -233,17 +233,17 @@ CrossProcessCompositorBridgeParent::Allo
   *aIdNamespace = parent->GetIdNameSpace();
 
   return parent;
 }
 
 bool
 CrossProcessCompositorBridgeParent::DeallocPWebRenderBridgeParent(PWebRenderBridgeParent* aActor)
 {
-#ifndef MOZ_ENABLE_WEBRENDER
+#ifndef MOZ_BUILD_WEBRENDER
   // Extra guard since this in the parent process and we don't want a malicious
   // child process invoking this codepath before it's ready
   MOZ_RELEASE_ASSERT(false);
 #endif
   WebRenderBridgeParent* parent = static_cast<WebRenderBridgeParent*>(aActor);
   EraseLayerState(parent->PipelineId().mHandle);
   parent->Release(); // IPDL reference
   return true;
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2321,17 +2321,17 @@ gfxPlatform::InitWebRenderConfig()
 
   if (InSafeMode()) {
     featureWebRender.ForceDisable(
       FeatureStatus::Unavailable,
       "Safe-mode is enabled",
       NS_LITERAL_CSTRING("FEATURE_FAILURE_SAFE_MODE"));
   }
 
-#ifndef MOZ_ENABLE_WEBRENDER
+#ifndef MOZ_BUILD_WEBRENDER
   featureWebRender.ForceDisable(
     FeatureStatus::Unavailable,
     "Build doesn't include WebRender",
     NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_WEBRENDER"));
 #endif
 
   // gfxFeature is not usable in the GPU process, so we use gfxVars to transmit this feature
   gfxVars::SetUseWebRender(gfxConfig::IsEnabled(Feature::WEBRENDER));
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -447,17 +447,17 @@ struct WrVecU8 {
 
 // Some useful defines to stub out webrender binding functions for when we
 // build gecko without webrender. We try to tell the compiler these functions
 // are unreachable in that case, but VC++ emits a warning if it finds any
 // unreachable functions invoked from destructors. That warning gets turned into
 // an error and causes the build to fail. So for wr_* functions called by
 // destructors in C++ classes, use WR_DESTRUCTOR_SAFE_FUNC instead, which omits
 // the unreachable annotation.
-#ifdef MOZ_ENABLE_WEBRENDER
+#ifdef MOZ_BUILD_WEBRENDER
 #  define WR_INLINE
 #  define WR_FUNC
 #  define WR_DESTRUCTOR_SAFE_FUNC
 #else
 #  define WR_INLINE inline
 #  define WR_FUNC { MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("WebRender disabled"); }
 #  define WR_DESTRUCTOR_SAFE_FUNC {}
 #endif
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5640,13 +5640,13 @@ pref("dom.moduleScripts.enabled", false)
 pref("dom.timeout.max_consecutive_callbacks", 5);
 
 #ifdef FUZZING
 pref("fuzzing.enabled", false);
 #endif
 
 // Set advanced layers preferences here.
 pref("layers.advanced.border-layers", false);
-#ifdef MOZ_ENABLE_WEBRENDER
+#ifdef MOZ_BUILD_WEBRENDER
 pref("layers.advanced.caret-layers", true);
 #else
 pref("layers.advanced.caret-layers", false);
 #endif
--- a/toolkit/library/gtest/rust/moz.build
+++ b/toolkit/library/gtest/rust/moz.build
@@ -6,12 +6,12 @@
 
 features = []
 if CONFIG['MOZ_STYLO']:
     features += ['servo']
 
     if CONFIG['MOZ_STYLO_BINDGEN']:
         features += ['bindgen']
 
-if CONFIG['MOZ_ENABLE_WEBRENDER']:
+if CONFIG['MOZ_BUILD_WEBRENDER']:
     features += ['quantum_render']
 
 RustLibrary('gkrust-gtest', features, '../..')
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -375,17 +375,17 @@ if CONFIG['COMPILE_ENVIRONMENT']:
     dep_libs_list = GENERATED_FILES[('dependentlibs.list', 'dependentlibs.list.gtest')]
     dep_libs_list.script = 'dependentlibs.py:gen_list'
     dep_libs_list.inputs = [
         '!%s' % full_libname,
     ]
     FINAL_TARGET_FILES += ['!dependentlibs.list', '!dependentlibs.list.gtest']
 
 # WebRender dependencies
-if CONFIG['MOZ_ENABLE_WEBRENDER']:
+if CONFIG['MOZ_BUILD_WEBRENDER']:
     if CONFIG['OS_ARCH'] == 'Linux':
         OS_LIBS += [
             'GL',
         ]
     elif CONFIG['OS_ARCH'] == 'WINNT':
         OS_LIBS += [
             'opengl32',
         ]
--- a/toolkit/library/rust/moz.build
+++ b/toolkit/library/rust/moz.build
@@ -6,12 +6,12 @@
 
 features = []
 if CONFIG['MOZ_STYLO']:
     features += ['servo']
 
     if CONFIG['MOZ_STYLO_BINDGEN']:
         features += ['bindgen']
 
-if CONFIG['MOZ_ENABLE_WEBRENDER']:
+if CONFIG['MOZ_BUILD_WEBRENDER']:
     features += ['quantum_render']
 
 RustLibrary('gkrust', features, '..')
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -690,19 +690,19 @@ option('--with-servo', env='SERVO_TARGET
 def servo_target_dir(value):
     return value[0]
 
 set_config('SERVO_TARGET_DIR', servo_target_dir)
 
 # WebRender integration
 option('--enable-webrender', help='Include WebRender')
 
-set_config('MOZ_ENABLE_WEBRENDER',
+set_config('MOZ_BUILD_WEBRENDER',
            depends_if('--enable-webrender')(lambda _: True))
-set_define('MOZ_ENABLE_WEBRENDER',
+set_define('MOZ_BUILD_WEBRENDER',
            depends_if('--enable-webrender')(lambda _: True))
 
 # Printing
 # ==============================================================
 @depends(target)
 def ios_disable_printing(target):
     if target.os == 'iOS':
         return False