Bug 1561825 - Make layers.* static prefs follow the naming convention. r=KrisWright
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 27 Jun 2019 14:48:58 +1000
changeset 543486 2d7b154165c0d4513a979cca61e55f115a361b1f
parent 543485 d0fb55daae2858b898f1a839a428340c3f149b28
child 543487 3e95c2d9fcf75200f7431bc3acb08b4ed8aee200
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersKrisWright
bugs1561825
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1561825 - Make layers.* static prefs follow the naming convention. r=KrisWright The patch also removes the layers.mlgpu.enable-container-resizing pref, because it's dead. Differential Revision: https://phabricator.services.mozilla.com/D36159
gfx/ipc/GPUProcessHost.cpp
gfx/ipc/GPUProcessManager.cpp
gfx/layers/Layers.cpp
gfx/layers/PaintThread.cpp
gfx/layers/PersistentBufferProvider.cpp
gfx/layers/RotatedBuffer.cpp
gfx/layers/apz/src/AsyncPanZoomController.cpp
gfx/layers/basic/BasicCompositor.cpp
gfx/layers/client/ClientLayerManager.cpp
gfx/layers/client/ClientTiledPaintedLayer.cpp
gfx/layers/client/MultiTiledContentClient.cpp
gfx/layers/client/TextureClient.cpp
gfx/layers/client/TextureClientPool.cpp
gfx/layers/client/TiledContentClient.cpp
gfx/layers/composite/ContainerLayerComposite.cpp
gfx/layers/composite/Diagnostics.h
gfx/layers/composite/FPSCounter.cpp
gfx/layers/composite/LayerManagerComposite.cpp
gfx/layers/composite/TextureHost.cpp
gfx/layers/composite/TiledContentHost.cpp
gfx/layers/d3d11/CompositorD3D11.cpp
gfx/layers/d3d11/DeviceAttachmentsD3D11.cpp
gfx/layers/d3d11/MLGDeviceD3D11.cpp
gfx/layers/ipc/CompositorBench.cpp
gfx/layers/ipc/CompositorBridgeChild.cpp
gfx/layers/ipc/CompositorBridgeParent.cpp
gfx/layers/ipc/CompositorManagerChild.cpp
gfx/layers/ipc/CompositorVsyncScheduler.cpp
gfx/layers/ipc/LayerTransactionParent.cpp
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/mlgpu/ContainerLayerMLGPU.cpp
gfx/layers/mlgpu/LayerManagerMLGPU.cpp
gfx/layers/mlgpu/MLGDevice.cpp
gfx/layers/mlgpu/RenderViewMLGPU.cpp
gfx/layers/opengl/CompositorOGL.cpp
gfx/layers/wr/WebRenderLayerManager.cpp
gfx/thebes/D3D11Checks.cpp
gfx/thebes/DeviceManagerDx.cpp
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPlatformGtk.cpp
gfx/thebes/gfxWindowsPlatform.cpp
layout/base/nsLayoutUtils.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/painting/FrameLayerBuilder.cpp
layout/painting/nsDisplayList.cpp
layout/svg/nsSVGIntegrationUtils.cpp
modules/libpref/init/StaticPrefList.h
widget/windows/WinCompositorWidget.cpp
--- a/gfx/ipc/GPUProcessHost.cpp
+++ b/gfx/ipc/GPUProcessHost.cpp
@@ -57,17 +57,17 @@ bool GPUProcessHost::Launch(StringVector
   return true;
 }
 
 bool GPUProcessHost::WaitForLaunch() {
   if (mLaunchPhase == LaunchPhase::Complete) {
     return !!mGPUChild;
   }
 
-  int32_t timeoutMs = StaticPrefs::GPUProcessTimeoutMs();
+  int32_t timeoutMs = StaticPrefs::layers_gpu_process_startup_timeout_ms();
 
   // If one of the following environment variables are set we can effectively
   // ignore the timeout - as we can guarantee the compositor process will be
   // terminated
   if (PR_GetEnv("MOZ_DEBUG_CHILD_PROCESS") ||
       PR_GetEnv("MOZ_DEBUG_CHILD_PAUSE")) {
     timeoutMs = 0;
   }
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -517,23 +517,25 @@ void GPUProcessManager::NotifyListenersO
 }
 
 void GPUProcessManager::OnProcessUnexpectedShutdown(GPUProcessHost* aHost) {
   MOZ_ASSERT(mProcess && mProcess == aHost);
 
   CompositorManagerChild::OnGPUProcessLost(aHost->GetProcessToken());
   DestroyProcess();
 
-  if (mNumProcessAttempts > uint32_t(StaticPrefs::GPUProcessMaxRestarts())) {
+  if (mNumProcessAttempts >
+      uint32_t(StaticPrefs::layers_gpu_process_max_restarts())) {
     char disableMessage[64];
     SprintfLiteral(disableMessage, "GPU process disabled after %d attempts",
                    mNumProcessAttempts);
     DisableGPUProcess(disableMessage);
   } else if (mNumProcessAttempts >
-                 uint32_t(StaticPrefs::GPUProcessMaxRestartsWithDecoder()) &&
+                 uint32_t(StaticPrefs::
+                              layers_gpu_process_max_restarts_with_decoder()) &&
              mDecodeVideoOnGpuProcess) {
     mDecodeVideoOnGpuProcess = false;
     Telemetry::Accumulate(Telemetry::GPU_PROCESS_CRASH_FALLBACKS,
                           uint32_t(FallbackType::DECODINGDISABLED));
     HandleProcessLost();
   } else {
     Telemetry::Accumulate(Telemetry::GPU_PROCESS_CRASH_FALLBACKS,
                           uint32_t(FallbackType::NONE));
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -134,17 +134,17 @@ LayerManager::CreatePersistentBufferProv
 
 already_AddRefed<ImageContainer> LayerManager::CreateImageContainer(
     ImageContainer::Mode flag) {
   RefPtr<ImageContainer> container = new ImageContainer(flag);
   return container.forget();
 }
 
 bool LayerManager::AreComponentAlphaLayersEnabled() {
-  return StaticPrefs::ComponentAlphaEnabled();
+  return StaticPrefs::layers_componentalpha_enabled();
 }
 
 /*static*/
 void LayerManager::LayerUserDataDestroy(void* data) {
   delete static_cast<LayerUserData*>(data);
 }
 
 UniquePtr<LayerUserData> LayerManager::RemoveUserData(void* aKey) {
--- a/gfx/layers/PaintThread.cpp
+++ b/gfx/layers/PaintThread.cpp
@@ -43,17 +43,17 @@ PaintThread::PaintThread() {}
 
 void PaintThread::Release() {}
 
 void PaintThread::AddRef() {}
 
 /* static */
 int32_t PaintThread::CalculatePaintWorkerCount() {
   int32_t cpuCores = PR_GetNumberOfProcessors();
-  int32_t workerCount = StaticPrefs::LayersOMTPPaintWorkers();
+  int32_t workerCount = StaticPrefs::layers_omtp_paint_workers();
 
   // If not manually specified, default to (cpuCores * 3) / 4, and clamp
   // between 1 and 4. If a user wants more, they can manually specify it
   if (workerCount < 1) {
     workerCount = std::min(std::max((cpuCores * 3) / 4, 1), 4);
   }
 
   return workerCount;
@@ -157,17 +157,17 @@ void PaintThread::UpdateRenderMode() {
     }
   }
 }
 
 void PaintThread::QueuePaintTask(UniquePtr<PaintTask>&& aTask) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aTask);
 
-  if (StaticPrefs::LayersOMTPDumpCapture() && aTask->mCapture) {
+  if (StaticPrefs::layers_omtp_dump_capture() && aTask->mCapture) {
     aTask->mCapture->Dump();
   }
 
   MOZ_RELEASE_ASSERT(aTask->mCapture->hasOneRef());
 
   RefPtr<CompositorBridgeChild> cbc(CompositorBridgeChild::Get());
   cbc->NotifyBeginAsyncPaint(aTask.get());
 
@@ -202,17 +202,17 @@ void PaintThread::AsyncPaintTask(Composi
   if (target->IsValid()) {
     // Do not replay to invalid targets. This can happen on device resets and
     // the browser will ensure the graphics stack is reinitialized on the main
     // thread.
     target->DrawCapturedDT(capture, Matrix());
     target->Flush();
   }
 
-  if (StaticPrefs::LayersOMTPReleaseCaptureOnMainThread()) {
+  if (StaticPrefs::layers_omtp_release_capture_on_main_thread()) {
     // This should ensure the capture drawtarget, which may hold on to
     // UnscaledFont objects, gets destroyed on the main thread (See bug
     // 1404742). This assumes (unflushed) target DrawTargets do not themselves
     // hold on to UnscaledFonts.
     NS_ReleaseOnMainThreadSystemGroup("PaintTask::DrawTargetCapture",
                                       aTask->mCapture.forget());
   }
 
--- a/gfx/layers/PersistentBufferProvider.cpp
+++ b/gfx/layers/PersistentBufferProvider.cpp
@@ -102,17 +102,17 @@ PersistentBufferProviderShared::Create(g
   if (!aKnowsCompositor ||
       !aKnowsCompositor->GetTextureForwarder()->IPCOpen() ||
       // Bug 1556433 - shared buffer provider and direct texture mapping do not
       // synchronize properly
       aKnowsCompositor->SupportsTextureDirectMapping()) {
     return nullptr;
   }
 
-  if (!StaticPrefs::PersistentBufferProviderSharedEnabled()) {
+  if (!StaticPrefs::layers_shared_buffer_provider_enabled()) {
     return nullptr;
   }
 
 #ifdef XP_WIN
   // Bug 1285271 - Disable shared buffer provider on Windows with D2D due to
   // instability, unless we are remoting the canvas drawing to the GPU process.
   if (gfxPlatform::GetPlatform()->GetPreferredCanvasBackend() ==
           BackendType::DIRECT2D1_1 &&
--- a/gfx/layers/RotatedBuffer.cpp
+++ b/gfx/layers/RotatedBuffer.cpp
@@ -71,17 +71,17 @@ Rect RotatedBuffer::GetSourceRectangle(X
 }
 
 void RotatedBuffer::BeginCapture() {
   RefPtr<gfx::DrawTarget> target = GetBufferTarget();
 
   MOZ_ASSERT(!mCapture);
   MOZ_ASSERT(target);
   mCapture = Factory::CreateCaptureDrawTargetForTarget(
-      target, StaticPrefs::LayersOMTPCaptureLimit());
+      target, StaticPrefs::layers_omtp_capture_limit());
 }
 
 RefPtr<gfx::DrawTargetCapture> RotatedBuffer::EndCapture() {
   MOZ_ASSERT(mCapture);
   return std::move(mCapture);
 }
 
 /**
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -5200,31 +5200,31 @@ ScrollableLayerGuid AsyncPanZoomControll
 void AsyncPanZoomController::UpdateSharedCompositorFrameMetrics() {
   mRecursiveMutex.AssertCurrentThreadIn();
 
   FrameMetrics* frame =
       mSharedFrameMetricsBuffer
           ? static_cast<FrameMetrics*>(mSharedFrameMetricsBuffer->memory())
           : nullptr;
 
-  if (frame && mSharedLock && StaticPrefs::ProgressivePaint()) {
+  if (frame && mSharedLock && StaticPrefs::layers_progressive_paint()) {
     mSharedLock->Lock();
     *frame = Metrics();
     mSharedLock->Unlock();
   }
 }
 
 void AsyncPanZoomController::ShareCompositorFrameMetrics() {
   AssertOnUpdaterThread();
 
   // Only create the shared memory buffer if it hasn't already been created,
   // we are using progressive tile painting, and we have a
   // controller to pass the shared memory back to the content process/thread.
   if (!mSharedFrameMetricsBuffer && mMetricsSharingController &&
-      StaticPrefs::ProgressivePaint()) {
+      StaticPrefs::layers_progressive_paint()) {
     // Create shared memory and initialize it with the current FrameMetrics
     // value
     mSharedFrameMetricsBuffer = new ipc::SharedMemoryBasic;
     FrameMetrics* frame = nullptr;
     mSharedFrameMetricsBuffer->Create(sizeof(FrameMetrics));
     mSharedFrameMetricsBuffer->Map(sizeof(FrameMetrics));
     frame = static_cast<FrameMetrics*>(mSharedFrameMetricsBuffer->memory());
 
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -362,17 +362,17 @@ BasicCompositor::CreateDataTextureSource
 }
 
 bool BasicCompositor::SupportsEffect(EffectTypes aEffect) {
   return aEffect != EffectTypes::YCBCR &&
          aEffect != EffectTypes::COMPONENT_ALPHA;
 }
 
 bool BasicCompositor::SupportsLayerGeometry() const {
-  return StaticPrefs::BasicLayerGeometry();
+  return StaticPrefs::layers_geometry_basic_enabled();
 }
 
 static RefPtr<gfx::Path> BuildPathFromPolygon(const RefPtr<DrawTarget>& aDT,
                                               const gfx::Polygon& aPolygon) {
   MOZ_ASSERT(!aPolygon.IsEmpty());
 
   RefPtr<PathBuilder> pathBuilder = aDT->CreatePathBuilder();
   const nsTArray<Point4D>& points = aPolygon.GetPoints();
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -277,17 +277,17 @@ bool ClientLayerManager::EndTransactionI
     FlushAsyncPaints();
   }
 
   PaintTelemetry::AutoRecord record(PaintTelemetry::Metric::Rasterization);
   AUTO_PROFILER_TRACING("Paint", "Rasterize", GRAPHICS);
   PerfStats::AutoMetricRecording<PerfStats::Metric::Rasterizing> autoRecording;
 
   Maybe<TimeStamp> startTime;
-  if (StaticPrefs::LayersDrawFPS()) {
+  if (StaticPrefs::layers_acceleration_draw_fps()) {
     startTime = Some(TimeStamp::Now());
   }
 
   AUTO_PROFILER_LABEL("ClientLayerManager::EndTransactionInternal", GRAPHICS);
 
 #ifdef MOZ_LAYERS_HAVE_LOG
   MOZ_LAYERS_LOG(("  ----- (beginning paint)"));
   Log();
@@ -612,17 +612,17 @@ void ClientLayerManager::MakeSnapshotIfR
   }
   mShadowTarget = nullptr;
 }
 
 void ClientLayerManager::FlushRendering() {
   if (mWidget) {
     if (CompositorBridgeChild* remoteRenderer = mWidget->GetRemoteRenderer()) {
       if (mWidget->SynchronouslyRepaintOnResize() ||
-          StaticPrefs::LayersForceSynchronousResize()) {
+          StaticPrefs::layers_force_synchronous_resize()) {
         remoteRenderer->SendFlushRendering();
       } else {
         remoteRenderer->SendFlushRenderingAsync();
       }
     }
   }
 }
 
--- a/gfx/layers/client/ClientTiledPaintedLayer.cpp
+++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp
@@ -262,17 +262,17 @@ bool ClientTiledPaintedLayer::IsScrollin
                               aParentMetrics.GetScrollOffset().x,
                               COORDINATE_EPSILON) ||
          !FuzzyEqualsAdditive(compositorMetrics.GetScrollOffset().y,
                               aParentMetrics.GetScrollOffset().y,
                               COORDINATE_EPSILON);
 }
 
 bool ClientTiledPaintedLayer::UseProgressiveDraw() {
-  if (!StaticPrefs::ProgressivePaint()) {
+  if (!StaticPrefs::layers_progressive_paint()) {
     // pref is disabled, so never do progressive
     return false;
   }
 
   if (!mContentClient->GetTiledBuffer()->SupportsProgressiveUpdate()) {
     return false;
   }
 
@@ -474,17 +474,17 @@ void ClientTiledPaintedLayer::RenderLaye
   // Use single tile when layer is not scrollable, is smaller than one
   // tile, or when more than half of the tiles' pixels in either
   // dimension would be wasted.
   bool wantSingleTiledContentClient =
       (mCreationHint == LayerManager::NONE || layerSize <= tileSize ||
        isHalfTileWidthOrHeight) &&
       SingleTiledContentClient::ClientSupportsLayerSize(layerSize,
                                                         ClientManager()) &&
-      StaticPrefs::LayersSingleTileEnabled();
+      StaticPrefs::layers_single_tile_enabled();
 
   if (mContentClient && mHaveSingleTiledContentClient &&
       !wantSingleTiledContentClient) {
     mContentClient = nullptr;
     ClearValidRegion();
   }
 
   if (!mContentClient) {
--- a/gfx/layers/client/MultiTiledContentClient.cpp
+++ b/gfx/layers/client/MultiTiledContentClient.cpp
@@ -18,18 +18,19 @@ namespace layers {
 
 MultiTiledContentClient::MultiTiledContentClient(
     ClientTiledPaintedLayer& aPaintedLayer, ClientLayerManager* aManager)
     : TiledContentClient(aManager, "Multi"),
       mTiledBuffer(aPaintedLayer, *this, aManager, &mSharedFrameMetricsHelper),
       mLowPrecisionTiledBuffer(aPaintedLayer, *this, aManager,
                                &mSharedFrameMetricsHelper) {
   MOZ_COUNT_CTOR(MultiTiledContentClient);
-  mLowPrecisionTiledBuffer.SetResolution(StaticPrefs::LowPrecisionResolution());
-  mHasLowPrecision = StaticPrefs::UseLowPrecisionBuffer();
+  mLowPrecisionTiledBuffer.SetResolution(
+      StaticPrefs::layers_low_precision_resolution());
+  mHasLowPrecision = StaticPrefs::layers_low_precision_buffer();
 }
 
 void MultiTiledContentClient::ClearCachedResources() {
   CompositableClient::ClearCachedResources();
   mTiledBuffer.DiscardBuffers();
   mLowPrecisionTiledBuffer.DiscardBuffers();
 }
 
@@ -260,17 +261,17 @@ void ClientMultiTiledLayerBuffer::Update
                          .PreScale(mResolution, mResolution)
                          .PreTranslate(-mTilingOrigin));
 
       mCallback(&mPaintedLayer, ctx, paintRegion, dirtyRegion,
                 DrawRegionClip::DRAW, nsIntRegion(), mCallbackData);
       ctx = nullptr;
 
       // Edge padding allows us to avoid resampling artifacts
-      if (StaticPrefs::TileEdgePaddingEnabled() && mResolution == 1) {
+      if (StaticPrefs::layers_tiles_edge_padding() && mResolution == 1) {
         drawTarget->PadEdges(newValidRegion.MovedBy(-mTilingOrigin));
       }
 
       // Reset
       mPaintTiles.Clear();
       mTilingOrigin = IntPoint(std::numeric_limits<int32_t>::max(),
                                std::numeric_limits<int32_t>::max());
     }
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -1451,17 +1451,17 @@ already_AddRefed<gfx::DataSourceSurface>
 void TextureClient::PrintInfo(std::stringstream& aStream, const char* aPrefix) {
   aStream << aPrefix;
   aStream << nsPrintfCString("TextureClient (0x%p)", this).get();
   AppendToString(aStream, GetSize(), " [size=", "]");
   AppendToString(aStream, GetFormat(), " [format=", "]");
   AppendToString(aStream, mFlags, " [flags=", "]");
 
 #ifdef MOZ_DUMP_PAINTING
-  if (StaticPrefs::LayersDumpTexture()) {
+  if (StaticPrefs::layers_dump_texture()) {
     nsAutoCString pfx(aPrefix);
     pfx += "  ";
 
     aStream << "\n" << pfx.get() << "Surface: ";
     RefPtr<gfx::DataSourceSurface> dSurf = GetAsSurface();
     if (dSurf) {
       aStream << gfxUtils::GetAsLZ4Base64Str(dSurf).get();
     }
--- a/gfx/layers/client/TextureClientPool.cpp
+++ b/gfx/layers/client/TextureClientPool.cpp
@@ -136,17 +136,17 @@ void TextureClientPool::AllocateTextureC
 
   if (mSupportsTextureDirectMapping &&
       std::max(mSize.width, mSize.height) <= mMaxTextureSize) {
     allocFlags =
         TextureAllocationFlags(allocFlags | ALLOC_ALLOW_DIRECT_MAPPING);
   }
 
   RefPtr<TextureClient> newClient;
-  if (StaticPrefs::ForceShmemTiles()) {
+  if (StaticPrefs::layers_force_shmem_tiles()) {
     // gfx::BackendType::NONE means use the content backend
     newClient = TextureClient::CreateForRawBufferAccess(
         mSurfaceAllocator, mFormat, mSize, gfx::BackendType::NONE, mBackend,
         mFlags, allocFlags);
   } else {
     newClient = TextureClient::CreateForDrawing(
         mSurfaceAllocator, mFormat, mSize, mBackend, mMaxTextureSize,
         BackendSelector::Content, mFlags, allocFlags);
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -595,17 +595,17 @@ Maybe<AcquiredBackBuffer> TileClient::Ac
       (aMode != SurfaceMode::SURFACE_COMPONENT_ALPHA ||
        (mFrontBufferOnWhite && !mFrontBufferOnWhite->IsReadLocked()))) {
     // If we had a backbuffer we no longer need it since we can re-use the
     // front buffer here. It can be worth it to hold on to the back buffer
     // so we don't need to pay the cost of initializing a new back buffer
     // later (copying pixels and texture upload). But this could increase
     // our memory usage and lead to OOM more frequently from spikes in usage,
     // so we have this behavior behind a pref.
-    if (!StaticPrefs::LayersTileRetainBackBuffer()) {
+    if (!StaticPrefs::layers_tiles_retain_back_buffer()) {
       DiscardBackBuffer();
     }
     Flip();
   } else {
     if (!mBackBuffer || mBackBuffer->IsReadLocked()) {
       mBackBuffer.Set(this, CreateBackBufferTexture(mBackBuffer, aCompositable,
                                                     mAllocator));
       if (!mBackBuffer) {
@@ -673,17 +673,17 @@ Maybe<AcquiredBackBuffer> TileClient::Ac
   } else {
     target = backBuffer;
   }
 
   // Construct a capture draw target if necessary
   RefPtr<DrawTargetCapture> capture;
   if (aFlags & TilePaintFlags::Async) {
     capture = Factory::CreateCaptureDrawTargetForTarget(
-        target, StaticPrefs::LayersOMTPCaptureLimit());
+        target, StaticPrefs::layers_omtp_capture_limit());
     target = capture;
   }
 
   // Gather texture clients
   AutoTArray<RefPtr<TextureClient>, 4> clients;
   clients.AppendElement(RefPtr<TextureClient>(mBackBuffer));
   if (mBackBufferOnWhite) {
     clients.AppendElement(mBackBufferOnWhite);
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -427,17 +427,17 @@ void RenderLayers(ContainerT* aContainer
     const Maybe<gfx::Polygon>& childGeometry = preparedData.mGeometry;
 
     Layer* layer = layerToRender->GetLayer();
 
     if (layerToRender->HasStaleCompositor()) {
       continue;
     }
 
-    if (StaticPrefs::LayersDrawFPS()) {
+    if (StaticPrefs::layers_acceleration_draw_fps()) {
       for (const auto& metadata : layer->GetAllScrollMetadata()) {
         if (metadata.IsApzForceDisabled()) {
           aManager->DisabledApzWarning();
           break;
         }
       }
     }
 
@@ -468,21 +468,21 @@ void RenderLayers(ContainerT* aContainer
 
       if (geometry && isLeafLayer) {
         TransformLayerGeometry(layer, geometry);
       }
 
       layerToRender->RenderLayer(clipRect, geometry);
     }
 
-    if (StaticPrefs::UniformityInfo()) {
+    if (StaticPrefs::layers_uniformity_info()) {
       PrintUniformityInfo(layer);
     }
 
-    if (StaticPrefs::DrawLayerInfo()) {
+    if (StaticPrefs::layers_draw_layer_info()) {
       DrawLayerInfo(preparedData.mClipRect, aManager, layer);
     }
 
     // Draw a border around scrollable layers.
     // A layer can be scrolled by multiple scroll frames. Draw a border
     // for each.
     // Within the list of scroll frames for a layer, the layer border for a
     // scroll frame lower down is affected by the async transforms on scroll
@@ -645,17 +645,17 @@ void ContainerRender(ContainerT* aContai
     RenderLayers(aContainer, aManager,
                  RenderTargetIntRect::FromUnknownRect(aClipRect), aGeometry);
   }
 
   // If it is a scrollable container layer with no child layers, and one of the
   // APZCs attached to it has a nonempty async transform, then that transform is
   // not applied to any visible content. Display a warning box (conditioned on
   // the FPS display being enabled).
-  if (StaticPrefs::LayersDrawFPS() &&
+  if (StaticPrefs::layers_acceleration_draw_fps() &&
       aContainer->IsScrollableWithoutContent()) {
     RefPtr<APZSampler> sampler =
         aManager->GetCompositor()->GetCompositorBridgeParent()->GetAPZSampler();
     // Since aContainer doesn't have any children we can just iterate from the
     // top metrics on it down to the bottom using GetFirstChild and not worry
     // about walking onto another underlying layer.
     for (LayerMetricsWrapper i(aContainer); i; i = i.GetFirstChild()) {
       if (sampler->HasUnusedAsyncTransform(i)) {
--- a/gfx/layers/composite/Diagnostics.h
+++ b/gfx/layers/composite/Diagnostics.h
@@ -61,17 +61,17 @@ class Diagnostics {
   void RecordCompositeTime(float aValue) { mCompositeMs.Add(aValue); }
   void AddTxnFrame() { mTransactionFps.AddFrame(TimeStamp::Now()); }
 
   std::string GetFrameOverlayString(const GPUStats& aStats);
 
   class Record {
    public:
     explicit Record(TimeStamp aStart = TimeStamp()) {
-      if (StaticPrefs::LayersDrawFPS()) {
+      if (StaticPrefs::layers_acceleration_draw_fps()) {
         mStart = aStart.IsNull() ? TimeStamp::Now() : aStart;
       }
     }
     bool Recording() const { return !mStart.IsNull(); }
     float Duration() const {
       return (TimeStamp::Now() - mStart).ToMilliseconds();
     }
 
--- a/gfx/layers/composite/FPSCounter.cpp
+++ b/gfx/layers/composite/FPSCounter.cpp
@@ -254,17 +254,17 @@ double FPSCounter::GetStdDev(std::map<in
     samples += count;
   }
 
   double stdDev = sumOfDifferences / samples;
   return sqrt(stdDev);
 }
 
 void FPSCounter::PrintFPS() {
-  if (!StaticPrefs::FPSPrintHistogram()) {
+  if (!StaticPrefs::layers_acceleration_draw_fps_print_histogram()) {
     return;
   }
 
   std::map<int, int> histogram;
   int totalFrames = BuildHistogram(histogram);
 
   TimeDuration measurementInterval =
       mFrameTimestamps[GetLatestReadIndex()] - mLastInterval;
@@ -303,17 +303,17 @@ void FPSCounter::PrintHistogram(std::map
   printf_stderr("%s\n", buffer);
   printf_stderr("Mean: %f , std dev %f\n", GetMean(aHistogram),
                 GetStdDev(aHistogram));
 }
 
 // Write FPS timestamp data to a file only if
 // draw-fps.write-to-file is true
 nsresult FPSCounter::WriteFrameTimeStamps() {
-  if (!StaticPrefs::WriteFPSToFile()) {
+  if (!StaticPrefs::layers_acceleration_draw_fps_write_to_file()) {
     return NS_OK;
   }
 
   MOZ_ASSERT(mWriteIndex == 0);
 
   nsCOMPtr<nsIFile> resultFile;
   nsresult rv =
       NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(resultFile));
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -617,17 +617,17 @@ LayerComposite* LayerManagerComposite::R
     return nullptr;
   }
 
   return ToLayerComposite(mRoot);
 }
 
 void LayerManagerComposite::InvalidateDebugOverlay(nsIntRegion& aInvalidRegion,
                                                    const IntRect& aBounds) {
-  bool drawFps = StaticPrefs::LayersDrawFPS();
+  bool drawFps = StaticPrefs::layers_acceleration_draw_fps();
   bool drawFrameColorBars = StaticPrefs::gfx_draw_color_bars();
 
   if (drawFps) {
     aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 650, 400));
   }
   if (drawFrameColorBars) {
     aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 10, aBounds.Height()));
   }
@@ -648,17 +648,17 @@ void LayerManagerComposite::DrawPaintTim
 
   TimeDuration compositeTime = TimeStamp::Now() - mRenderStartTime;
   mPaintCounter->Draw(aCompositor, mLastPaintTime, compositeTime);
 }
 #endif
 
 static uint16_t sFrameCount = 0;
 void LayerManagerComposite::RenderDebugOverlay(const IntRect& aBounds) {
-  bool drawFps = StaticPrefs::LayersDrawFPS();
+  bool drawFps = StaticPrefs::layers_acceleration_draw_fps();
   bool drawFrameColorBars = StaticPrefs::gfx_draw_color_bars();
 
   // Don't draw diagnostic overlays if we want to snapshot the output.
   if (mTarget) {
     return;
   }
 
   if (drawFps) {
@@ -770,19 +770,19 @@ void LayerManagerComposite::RenderDebugO
   }
 #endif
 }
 
 RefPtr<CompositingRenderTarget>
 LayerManagerComposite::PushGroupForLayerEffects() {
   // This is currently true, so just making sure that any new use of this
   // method is flagged for investigation
-  MOZ_ASSERT(StaticPrefs::LayersEffectInvert() ||
-             StaticPrefs::LayersEffectGrayscale() ||
-             StaticPrefs::LayersEffectContrast() != 0.0);
+  MOZ_ASSERT(StaticPrefs::layers_effect_invert() ||
+             StaticPrefs::layers_effect_grayscale() ||
+             StaticPrefs::layers_effect_contrast() != 0.0);
 
   RefPtr<CompositingRenderTarget> previousTarget =
       mCompositor->GetCurrentRenderTarget();
   // make our render target the same size as the destination target
   // so that we don't have to change size if the drawing area changes.
   IntRect rect(previousTarget->GetOrigin(), previousTarget->GetSize());
   // XXX: I'm not sure if this is true or not...
   MOZ_ASSERT(rect.IsEqualXY(0, 0));
@@ -900,19 +900,19 @@ void LayerManagerComposite::Render(const
 
   ClearLayerFlags(mRoot);
 
   // At this time, it doesn't really matter if these preferences change
   // during the execution of the function; we should be safe in all
   // permutations. However, may as well just get the values onces and
   // then use them, just in case the consistency becomes important in
   // the future.
-  bool invertVal = StaticPrefs::LayersEffectInvert();
-  bool grayscaleVal = StaticPrefs::LayersEffectGrayscale();
-  float contrastVal = StaticPrefs::LayersEffectContrast();
+  bool invertVal = StaticPrefs::layers_effect_invert();
+  bool grayscaleVal = StaticPrefs::layers_effect_grayscale();
+  float contrastVal = StaticPrefs::layers_effect_contrast();
   bool haveLayerEffects = (invertVal || grayscaleVal || contrastVal != 0.0);
 
   // Set LayerScope begin/end frame
   LayerScopeAutoFrame frame(PR_Now());
 
   // If you're looking for the code to dump the layer tree, it was moved
   // to CompositorBridgeParent::CompositeToTarget().
 
@@ -1418,17 +1418,17 @@ void LayerComposite::AddBlendModeEffect(
 }
 
 bool LayerManagerComposite::CanUseCanvasLayerForSize(const IntSize& aSize) {
   return mCompositor->CanUseCanvasLayerForSize(
       gfx::IntSize(aSize.width, aSize.height));
 }
 
 void LayerManagerComposite::NotifyShadowTreeTransaction() {
-  if (StaticPrefs::LayersDrawFPS()) {
+  if (StaticPrefs::layers_acceleration_draw_fps()) {
     mDiagnostics->AddTxnFrame();
   }
 }
 
 void LayerComposite::SetLayerManager(HostLayerManager* aManager) {
   HostLayer::SetLayerManager(aManager);
   mCompositeManager = static_cast<LayerManagerComposite*>(aManager);
   mCompositor = mCompositeManager->GetCompositor();
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -434,17 +434,17 @@ void TextureHost::PrintInfo(std::strings
   //       GetSize() and GetFormat() on it.
   if (Lock()) {
     AppendToString(aStream, GetSize(), " [size=", "]");
     AppendToString(aStream, GetFormat(), " [format=", "]");
     Unlock();
   }
   AppendToString(aStream, mFlags, " [flags=", "]");
 #ifdef MOZ_DUMP_PAINTING
-  if (StaticPrefs::LayersDumpTexture()) {
+  if (StaticPrefs::layers_dump_texture()) {
     nsAutoCString pfx(aPrefix);
     pfx += "  ";
 
     aStream << "\n" << pfx.get() << "Surface: ";
     RefPtr<gfx::DataSourceSurface> dSurf = GetAsSurface();
     if (dSurf) {
       aStream << gfxUtils::GetAsLZ4Base64Str(dSurf).get();
     }
--- a/gfx/layers/composite/TiledContentHost.cpp
+++ b/gfx/layers/composite/TiledContentHost.cpp
@@ -31,22 +31,22 @@
 namespace mozilla {
 using namespace gfx;
 namespace layers {
 
 class Layer;
 
 float TileHost::GetFadeInOpacity(float aOpacity) {
   TimeStamp now = TimeStamp::Now();
-  if (!StaticPrefs::LayerTileFadeInEnabled() || mFadeStart.IsNull() ||
+  if (!StaticPrefs::layers_tiles_fade_in_enabled() || mFadeStart.IsNull() ||
       now < mFadeStart) {
     return aOpacity;
   }
 
-  float duration = StaticPrefs::LayerTileFadeInDuration();
+  float duration = StaticPrefs::layers_tiles_fade_in_duration_ms();
   float elapsed = (now - mFadeStart).ToMilliseconds();
   if (elapsed > duration) {
     mFadeStart = TimeStamp();
     return aOpacity;
   }
   return aOpacity * (elapsed / duration);
 }
 
@@ -334,18 +334,19 @@ bool TiledLayerBufferComposite::UseTiles
 
     if (aTiles.isProgressive() && texturedDesc.wasPlaceholder()) {
       // This is a progressive paint, and the tile used to be a placeholder.
       // We need to begin fading it in (if enabled via
       // layers.tiles.fade-in.enabled)
       tile.mFadeStart = TimeStamp::Now();
 
       aLayerManager->CompositeUntil(
-          tile.mFadeStart + TimeDuration::FromMilliseconds(
-                                StaticPrefs::LayerTileFadeInDuration()));
+          tile.mFadeStart +
+          TimeDuration::FromMilliseconds(
+              StaticPrefs::layers_tiles_fade_in_duration_ms()));
     }
   }
 
 #ifdef XP_DARWIN
   if (lockedTextureSerials.Length() > 0) {
     TextureSync::SetTexturesLocked(lockedTexturePid, lockedTextureSerials);
   }
 #endif
@@ -418,31 +419,31 @@ void TiledContentHost::Composite(
   // we also make sure to draw the background color behind the
   // reduced-opacity tile so that content underneath doesn't show
   // through.
   // However, in cases where the background is transparent, or the layer
   // already has some opacity, we want to skip this behaviour. Otherwise
   // we end up changing the expected overall transparency of the content,
   // and it just looks wrong.
   Color backgroundColor;
-  if (aOpacity == 1.0f && StaticPrefs::LowPrecisionOpacity() < 1.0f) {
+  if (aOpacity == 1.0f && StaticPrefs::layers_low_precision_opacity() < 1.0f) {
     // Background colors are only stored on scrollable layers. Grab
     // the one from the nearest scrollable ancestor layer.
     for (LayerMetricsWrapper ancestor(GetLayer(),
                                       LayerMetricsWrapper::StartAt::BOTTOM);
          ancestor; ancestor = ancestor.GetParent()) {
       if (ancestor.Metrics().IsScrollable()) {
         backgroundColor = ancestor.Metadata().GetBackgroundColor();
         break;
       }
     }
   }
   float lowPrecisionOpacityReduction =
       (aOpacity == 1.0f && backgroundColor.a == 1.0f)
-          ? StaticPrefs::LowPrecisionOpacity()
+          ? StaticPrefs::layers_low_precision_opacity()
           : 1.0f;
 
   nsIntRegion tmpRegion;
   const nsIntRegion* renderRegion = aVisibleRegion;
 #ifndef MOZ_IGNORE_PAINT_WILL_RESAMPLE
   if (PaintWillResample()) {
     // If we're resampling, then the texture image will contain exactly the
     // entire visible region's bounds, and we should draw it all in one quad
@@ -627,17 +628,17 @@ void TiledContentHost::RenderLayerBuffer
 }
 
 void TiledContentHost::PrintInfo(std::stringstream& aStream,
                                  const char* aPrefix) {
   aStream << aPrefix;
   aStream << nsPrintfCString("TiledContentHost (0x%p)", this).get();
 
 #if defined(MOZ_DUMP_PAINTING)
-  if (StaticPrefs::LayersDumpTexture()) {
+  if (StaticPrefs::layers_dump_texture()) {
     nsAutoCString pfx(aPrefix);
     pfx += "  ";
 
     Dump(aStream, pfx.get(), false);
   }
 #endif
 }
 
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -117,17 +117,17 @@ CompositorD3D11::~CompositorD3D11() {}
 template <typename VertexType>
 void CompositorD3D11::SetVertexBuffer(ID3D11Buffer* aBuffer) {
   UINT size = sizeof(VertexType);
   UINT offset = 0;
   mContext->IASetVertexBuffers(0, 1, &aBuffer, &size, &offset);
 }
 
 bool CompositorD3D11::SupportsLayerGeometry() const {
-  return StaticPrefs::D3D11LayerGeometry();
+  return StaticPrefs::layers_geometry_d3d11_enabled();
 }
 
 bool CompositorD3D11::UpdateDynamicVertexBuffer(
     const nsTArray<gfx::TexturedTriangle>& aTriangles) {
   HRESULT hr;
 
   // Resize the dynamic vertex buffer if needed.
   if (!mAttachments->EnsureTriangleBuffer(aTriangles.Length())) {
@@ -1045,17 +1045,17 @@ void CompositorD3D11::DrawGeometry(const
       TextureSourceD3D11* sourceCr = source->GetSubSource(Cr)->AsSourceD3D11();
 
       ID3D11ShaderResourceView* srViews[3] = {
           sourceY->GetShaderResourceView(), sourceCb->GetShaderResourceView(),
           sourceCr->GetShaderResourceView()};
       mContext->PSSetShaderResources(TexSlot::Y, 3, srViews);
     } break;
     case EffectTypes::COMPONENT_ALPHA: {
-      MOZ_ASSERT(StaticPrefs::ComponentAlphaEnabled());
+      MOZ_ASSERT(StaticPrefs::layers_componentalpha_enabled());
       MOZ_ASSERT(mAttachments->mComponentBlendState);
       EffectComponentAlpha* effectComponentAlpha =
           static_cast<EffectComponentAlpha*>(aEffectChain.mPrimaryEffect.get());
 
       TextureSourceD3D11* sourceOnWhite =
           effectComponentAlpha->mOnWhite->AsSourceD3D11();
       TextureSourceD3D11* sourceOnBlack =
           effectComponentAlpha->mOnBlack->AsSourceD3D11();
@@ -1197,17 +1197,17 @@ void CompositorD3D11::BeginFrame(const n
     if (!mAttachments->mSyncObject->Synchronize()) {
       // It's timeout here. Since the timeout is related to the driver-removed,
       // clear the render-bounding size to skip this frame.
       *aRenderBoundsOut = IntRect();
       return;
     }
   }
 
-  if (StaticPrefs::LayersDrawFPS()) {
+  if (StaticPrefs::layers_acceleration_draw_fps()) {
     uint32_t pixelsPerFrame = 0;
     for (auto iter = mBackBufferInvalid.RectIter(); !iter.Done(); iter.Next()) {
       pixelsPerFrame += iter.Get().Width() * iter.Get().Height();
     }
 
     mDiagnostics->Start(pixelsPerFrame);
   }
 }
--- a/gfx/layers/d3d11/DeviceAttachmentsD3D11.cpp
+++ b/gfx/layers/d3d11/DeviceAttachmentsD3D11.cpp
@@ -174,17 +174,17 @@ bool DeviceAttachmentsD3D11::Initialize(
   blendDesc.RenderTarget[0] = rtBlendNonPremul;
   hr = mDevice->CreateBlendState(&blendDesc,
                                  getter_AddRefs(mNonPremulBlendState));
   if (Failed(hr, "create npm blender")) {
     mInitFailureId = "FEATURE_FAILURE_D3D11_NPM_BLENDER";
     return false;
   }
 
-  if (StaticPrefs::ComponentAlphaEnabled()) {
+  if (StaticPrefs::layers_componentalpha_enabled()) {
     D3D11_RENDER_TARGET_BLEND_DESC rtBlendComponent = {
         TRUE,
         D3D11_BLEND_ONE,
         D3D11_BLEND_INV_SRC1_COLOR,
         D3D11_BLEND_OP_ADD,
         D3D11_BLEND_ONE,
         D3D11_BLEND_INV_SRC_ALPHA,
         D3D11_BLEND_OP_ADD,
@@ -270,17 +270,17 @@ bool DeviceAttachmentsD3D11::CreateShade
   InitPixelShader(sRGBShader, mRGBShader, MaskType::MaskNone);
   InitPixelShader(sRGBShaderMask, mRGBShader, MaskType::Mask);
   InitPixelShader(sRGBAShader, mRGBAShader, MaskType::MaskNone);
   InitPixelShader(sRGBAShaderMask, mRGBAShader, MaskType::Mask);
   InitPixelShader(sYCbCrShader, mYCbCrShader, MaskType::MaskNone);
   InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask);
   InitPixelShader(sNV12Shader, mNV12Shader, MaskType::MaskNone);
   InitPixelShader(sNV12ShaderMask, mNV12Shader, MaskType::Mask);
-  if (StaticPrefs::ComponentAlphaEnabled()) {
+  if (StaticPrefs::layers_componentalpha_enabled()) {
     InitPixelShader(sComponentAlphaShader, mComponentAlphaShader,
                     MaskType::MaskNone);
     InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader,
                     MaskType::Mask);
   }
 
   return mContinueInit;
 }
--- a/gfx/layers/d3d11/MLGDeviceD3D11.cpp
+++ b/gfx/layers/d3d11/MLGDeviceD3D11.cpp
@@ -318,17 +318,17 @@ RefPtr<MLGRenderTarget> MLGSwapChainD3D1
   if (FAILED(hr)) {
     gfxCriticalNote << "Failed to acquire swap chain's backbuffer: "
                     << hexa(hr);
     return nullptr;
   }
 
   if (!mRT) {
     MLGRenderTargetFlags flags = MLGRenderTargetFlags::Default;
-    if (StaticPrefs::AdvancedLayersEnableDepthBuffer()) {
+    if (StaticPrefs::layers_mlgpu_enable_depth_buffer()) {
       flags |= MLGRenderTargetFlags::ZBuffer;
     }
 
     mRT = new MLGRenderTargetD3D11(mSize, flags);
     if (!mRT->Initialize(mDevice, nullptr)) {
       return nullptr;
     }
   }
--- a/gfx/layers/ipc/CompositorBench.cpp
+++ b/gfx/layers/ipc/CompositorBench.cpp
@@ -330,17 +330,17 @@ static void RunCompositorBench(Composito
 
   for (size_t i = 0; i < tests.size(); i++) {
     delete tests[i];
   }
 }
 
 void CompositorBench(Compositor* aCompositor, const gfx::IntRect& aScreenRect) {
   static bool sRanBenchmark = false;
-  bool wantBenchmark = StaticPrefs::LayersBenchEnabled();
+  bool wantBenchmark = StaticPrefs::layers_bench_enabled();
   if (wantBenchmark && !sRanBenchmark) {
     RunCompositorBench(aCompositor, aScreenRect);
   }
   sRanBenchmark = wantBenchmark;
 }
 
 }  // namespace layers
 }  // namespace mozilla
--- a/gfx/layers/ipc/CompositorBridgeChild.cpp
+++ b/gfx/layers/ipc/CompositorBridgeChild.cpp
@@ -880,20 +880,20 @@ TextureClientPool* CompositorBridgeChild
       return mTexturePools[i];
     }
   }
 
   mTexturePools.AppendElement(new TextureClientPool(
       aAllocator->GetCompositorBackendType(),
       aAllocator->SupportsTextureDirectMapping(),
       aAllocator->GetMaxTextureSize(), aFormat, gfx::gfxVars::TileSize(),
-      aFlags, StaticPrefs::LayersTilePoolShrinkTimeout(),
-      StaticPrefs::LayersTilePoolClearTimeout(),
-      StaticPrefs::LayersTileInitialPoolSize(),
-      StaticPrefs::LayersTilePoolUnusedSize(), this));
+      aFlags, StaticPrefs::layers_tile_pool_shrink_timeout(),
+      StaticPrefs::layers_tile_pool_clear_timeout(),
+      StaticPrefs::layers_tile_initial_pool_size(),
+      StaticPrefs::layers_tile_pool_unused_size(), this));
 
   return mTexturePools.LastElement();
 }
 
 void CompositorBridgeChild::HandleMemoryPressure() {
   for (size_t i = 0; i < mTexturePools.Length(); i++) {
     mTexturePools[i]->Clear();
   }
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -289,17 +289,18 @@ void CompositorBridgeParent::FinishShutd
 }
 
 #ifdef COMPOSITOR_PERFORMANCE_WARNING
 static int32_t CalculateCompositionFrameRate() {
   // Used when layout.frame_rate is -1. Needs to be kept in sync with
   // DEFAULT_FRAME_RATE in nsRefreshDriver.cpp.
   // TODO: This should actually return the vsync rate.
   const int32_t defaultFrameRate = 60;
-  int32_t compositionFrameRatePref = StaticPrefs::LayersCompositionFrameRate();
+  int32_t compositionFrameRatePref =
+      StaticPrefs::layers_offmainthreadcomposition_frame_rate();
   if (compositionFrameRatePref < 0) {
     // Use the same frame rate for composition as for layout.
     int32_t layoutFrameRatePref = StaticPrefs::LayoutFrameRate();
     if (layoutFrameRatePref < 0) {
       // TODO: The main thread frame scheduling code consults the actual
       // monitor refresh rate in this case. We should do the same.
       return defaultFrameRate;
     }
@@ -999,17 +1000,17 @@ void CompositorBridgeParent::CompositeTo
       mWaitForPluginsUntil =
           mCompositorScheduler->GetLastComposeTime() + (mVsyncRate * 2);
     }
 #endif
   }
 
   RenderTraceLayers(mLayerManager->GetRoot(), "0000");
 
-  if (StaticPrefs::DumpHostLayers() || StaticPrefs::LayersDump()) {
+  if (StaticPrefs::layers_dump_host_layers() || StaticPrefs::layers_dump()) {
     printf_stderr("Painting --- compositing layer tree:\n");
     mLayerManager->Dump(/* aSorted = */ true);
   }
   mLayerManager->SetDebugOverlayWantsNextFrame(false);
   mLayerManager->EndTransaction(time);
 
   if (!aTarget) {
     TimeStamp end = TimeStamp::Now();
@@ -1038,17 +1039,17 @@ void CompositorBridgeParent::CompositeTo
   }
   if (executionTime > frameBudget) {
     printf_stderr("Compositor: Composite execution took %4.1f ms\n",
                   executionTime.ToMilliseconds());
   }
 #endif
 
   // 0 -> Full-tilt composite
-  if (StaticPrefs::LayersCompositionFrameRate() == 0 ||
+  if (StaticPrefs::layers_offmainthreadcomposition_frame_rate() == 0 ||
       mLayerManager->AlwaysScheduleComposite()) {
     // Special full-tilt composite mode for performance testing
     ScheduleComposition();
   }
 
   // TODO(bug 1328602) Need an equivalent that works with the rende thread.
   mLayerManager->SetCompositionTime(TimeStamp());
 
@@ -1210,17 +1211,17 @@ void CompositorBridgeParent::ScheduleRot
       mCompositionManager->RequiresReorientation(aTargetConfig.orientation())) {
     if (mForceCompositionTask != nullptr) {
       mForceCompositionTask->Cancel();
     }
     RefPtr<CancelableRunnable> task = NewCancelableRunnableMethod(
         "layers::CompositorBridgeParent::ForceComposition", this,
         &CompositorBridgeParent::ForceComposition);
     mForceCompositionTask = task;
-    ScheduleTask(task.forget(), StaticPrefs::OrientationSyncMillis());
+    ScheduleTask(task.forget(), StaticPrefs::layers_orientation_sync_timeout());
   }
 }
 
 void CompositorBridgeParent::ShadowLayersUpdated(
     LayerTransactionParent* aLayerTree, const TransactionInfo& aInfo,
     bool aHitTestUpdate) {
   const TargetConfig& targetConfig = aInfo.targetConfig();
 
--- a/gfx/layers/ipc/CompositorManagerChild.cpp
+++ b/gfx/layers/ipc/CompositorManagerChild.cpp
@@ -264,17 +264,17 @@ CompositorManagerChild::GetSpecificMessa
 
   return nullptr;
 }
 
 void CompositorManagerChild::SetReplyTimeout() {
 #ifndef DEBUG
   // Add a timeout for release builds to kill GPU process when it hangs.
   if (XRE_IsParentProcess() && GPUProcessManager::Get()->GetGPUChild()) {
-    int32_t timeout = StaticPrefs::GPUProcessIPCReplyTimeoutMs();
+    int32_t timeout = StaticPrefs::layers_gpu_process_ipc_reply_timeout_ms();
     SetReplyTimeoutMs(timeout);
   }
 #endif
 }
 
 bool CompositorManagerChild::ShouldContinueFromReplyTimeout() {
   if (XRE_IsParentProcess()) {
     gfxCriticalNote << "Killing GPU process due to IPC reply timeout";
--- a/gfx/layers/ipc/CompositorVsyncScheduler.cpp
+++ b/gfx/layers/ipc/CompositorVsyncScheduler.cpp
@@ -73,19 +73,20 @@ CompositorVsyncScheduler::CompositorVsyn
       mCurrentCompositeTaskMonitor("CurrentCompositeTaskMonitor"),
       mCurrentCompositeTask(nullptr),
       mCurrentVRTaskMonitor("CurrentVRTaskMonitor"),
       mCurrentVRTask(nullptr) {
   mVsyncObserver = new Observer(this);
 
   // mAsapScheduling is set on the main thread during init,
   // but is only accessed after on the compositor thread.
-  mAsapScheduling = StaticPrefs::LayersCompositionFrameRate() == 0 ||
-                    gfxPlatform::IsInLayoutAsapMode() ||
-                    recordreplay::IsRecordingOrReplaying();
+  mAsapScheduling =
+      StaticPrefs::layers_offmainthreadcomposition_frame_rate() == 0 ||
+      gfxPlatform::IsInLayoutAsapMode() ||
+      recordreplay::IsRecordingOrReplaying();
 }
 
 CompositorVsyncScheduler::~CompositorVsyncScheduler() {
   MOZ_ASSERT(!mIsObservingVsync);
   MOZ_ASSERT(!mVsyncObserver);
   // The CompositorVsyncDispatcher is cleaned up before this in the
   // nsBaseWidget, which stops vsync listeners
   mVsyncSchedulerOwner = nullptr;
--- a/gfx/layers/ipc/LayerTransactionParent.cpp
+++ b/gfx/layers/ipc/LayerTransactionParent.cpp
@@ -470,19 +470,20 @@ mozilla::ipc::IPCResult LayerTransaction
       (int)(mozilla::TimeStamp::Now() - updateStart).ToMilliseconds();
   if (compositeTime > 15) {
     printf_stderr("Compositor: Layers update took %i ms (blocking gecko).\n",
                   compositeTime);
   }
 #endif
 
   // Enable visual warning for long transaction when draw FPS option is enabled
-  bool drawFps = StaticPrefs::LayersDrawFPS();
+  bool drawFps = StaticPrefs::layers_acceleration_draw_fps();
   if (drawFps) {
-    uint32_t visualWarningTrigger = StaticPrefs::LayerTransactionWarning();
+    uint32_t visualWarningTrigger =
+        StaticPrefs::layers_transaction_warning_ms();
     // The default theshold is 200ms to trigger, hit red when it take 4 times
     // longer
     TimeDuration latency = TimeStamp::Now() - aInfo.transactionStart();
     if (latency > TimeDuration::FromMilliseconds(visualWarningTrigger)) {
       float severity =
           (latency - TimeDuration::FromMilliseconds(visualWarningTrigger))
               .ToMilliseconds() /
           (4 * visualWarningTrigger);
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -541,17 +541,17 @@ bool ShadowLayerForwarder::EndTransactio
   TransactionInfo info;
 
   MOZ_ASSERT(IPCOpen(), "no manager to forward to");
   if (!IPCOpen()) {
     return false;
   }
 
   Maybe<TimeStamp> startTime;
-  if (StaticPrefs::LayersDrawFPS()) {
+  if (StaticPrefs::layers_acceleration_draw_fps()) {
     startTime = Some(TimeStamp::Now());
   }
 
   GetCompositorBridgeChild()->WillEndTransaction();
 
   MOZ_ASSERT(aId.IsValid());
 
   AUTO_PROFILER_LABEL("ShadowLayerForwarder::EndTransaction", GRAPHICS);
--- a/gfx/layers/mlgpu/ContainerLayerMLGPU.cpp
+++ b/gfx/layers/mlgpu/ContainerLayerMLGPU.cpp
@@ -58,17 +58,17 @@ bool ContainerLayerMLGPU::OnPrepareToRen
   bool surfaceCopyNeeded = false;
   DefaultComputeSupportsComponentAlphaChildren(&surfaceCopyNeeded);
   if (surfaceCopyNeeded != mSurfaceCopyNeeded || surfaceCopyNeeded) {
     mInvalidateEntireSurface = true;
   }
   mSurfaceCopyNeeded = surfaceCopyNeeded;
 
   gfx::IntRect viewport(gfx::IntPoint(0, 0), mTargetSize);
-  if (!mRenderTarget || !StaticPrefs::AdvancedLayersUseInvalidation() ||
+  if (!mRenderTarget || !StaticPrefs::layers_mlgpu_enable_invalidation() ||
       mInvalidateEntireSurface) {
     // Fine-grained invalidation is disabled, invalidate everything.
     mInvalidRect = viewport;
   } else {
     // Clamp the invalid rect to the viewport.
     mInvalidRect -= mTargetOffset;
     mInvalidRect = mInvalidRect.Intersect(viewport);
   }
--- a/gfx/layers/mlgpu/LayerManagerMLGPU.cpp
+++ b/gfx/layers/mlgpu/LayerManagerMLGPU.cpp
@@ -258,18 +258,18 @@ void LayerManagerMLGPU::EndTransaction(c
       gfxCriticalNote << "Could not resize the swapchain ("
                       << hexa(windowSize.width) << ","
                       << hexa(windowSize.height) << ")";
       return;
     }
   }
 
   // Don't draw the diagnostic overlay if we want to snapshot the output.
-  mDrawDiagnostics = StaticPrefs::LayersDrawFPS() && !mTarget;
-  mUsingInvalidation = StaticPrefs::AdvancedLayersUseInvalidation();
+  mDrawDiagnostics = StaticPrefs::layers_acceleration_draw_fps() && !mTarget;
+  mUsingInvalidation = StaticPrefs::layers_mlgpu_enable_invalidation();
   mDebugFrameNumber++;
 
   AL_LOG("--- Compositing frame %d ---\n", mDebugFrameNumber);
 
   // Compute transforms - and the changed area, if enabled.
   mRoot->ComputeEffectiveTransforms(Matrix4x4());
   ComputeInvalidRegion();
 
@@ -546,17 +546,17 @@ void LayerManagerMLGPU::ClearCachedResou
     if (!layer) {
       return;
     }
     layer->ClearCachedResources();
   });
 }
 
 void LayerManagerMLGPU::NotifyShadowTreeTransaction() {
-  if (StaticPrefs::LayersDrawFPS()) {
+  if (StaticPrefs::layers_acceleration_draw_fps()) {
     mDiagnostics->AddTxnFrame();
   }
 }
 
 void LayerManagerMLGPU::UpdateRenderBounds(const gfx::IntRect& aRect) {
   mRenderBounds = aRect;
 }
 
--- a/gfx/layers/mlgpu/MLGDevice.cpp
+++ b/gfx/layers/mlgpu/MLGDevice.cpp
@@ -80,31 +80,31 @@ bool MLGDevice::Initialize() {
     // StagingBuffer depends on this value being accurate, so for now we just
     // double-check it here.
     return Fail("FEATURE_FAILURE_MIN_MAX_CB_BIND_SIZE",
                 "Minimum constant buffer bind size not met");
   }
 
   // We allow this to be pref'd off for testing. Switching it off enables
   // Direct3D 11.0/Windows 7/OpenGL-style buffer code paths.
-  if (!StaticPrefs::AdvancedLayersEnableBufferSharing()) {
+  if (!StaticPrefs::layers_mlgpu_enable_buffer_sharing()) {
     gfxConfig::EnableFallback(Fallback::NO_CONSTANT_BUFFER_OFFSETTING,
                               "Disabled by pref");
     mCanUseConstantBufferOffsetBinding = false;
   }
   if (mCanUseConstantBufferOffsetBinding && !VerifyConstantBufferOffsetting()) {
     gfxConfig::EnableFallback(Fallback::NO_CONSTANT_BUFFER_OFFSETTING,
                               "Constant buffer offset binding does not work");
     mCanUseConstantBufferOffsetBinding = false;
   }
 
   // We allow this to be pref'd off for testing. Disabling it turns on
   // ID3D11DeviceContext1::ClearView support, which is present on
   // newer Windows 8+ drivers.
-  if (!StaticPrefs::AdvancedLayersEnableClearView()) {
+  if (!StaticPrefs::layers_mlgpu_enable_clear_view()) {
     mCanUseClearView = false;
   }
 
   // When compositing normal sized layer trees, we typically have small vertex
   // buffers. Empirically the vertex and pixel constant buffer sizes are
   // generally under 1KB and the vertex constant buffer size is under 8KB.
   static const size_t kDefaultVertexBufferSize = 4096;
   static const size_t kDefaultVSConstantBufferSize =
@@ -122,17 +122,17 @@ bool MLGDevice::Initialize() {
       MakeUnique<SharedConstantBuffer>(this, kDefaultPSConstantBufferSize);
 
   if (!mSharedVertexBuffer->Init() || !mSharedVSBuffer->Init() ||
       !mSharedPSBuffer->Init()) {
     return Fail("FEATURE_FAILURE_ALLOC_SHARED_BUFFER",
                 "Failed to allocate a shared shader buffer");
   }
 
-  if (StaticPrefs::AdvancedLayersEnableBufferCache()) {
+  if (StaticPrefs::layers_mlgpu_enable_buffer_cache()) {
     mConstantBufferCache = MakeUnique<BufferCache>(this);
   }
 
   mInitialized = true;
   mIsValid = true;
   return true;
 }
 
--- a/gfx/layers/mlgpu/RenderViewMLGPU.cpp
+++ b/gfx/layers/mlgpu/RenderViewMLGPU.cpp
@@ -69,17 +69,17 @@ RenderViewMLGPU::RenderViewMLGPU(FrameBu
       mDevice(aBuilder->GetDevice()),
       mParent(aParent),
       mContainer(nullptr),
       mFinishedBuilding(false),
       mCurrentLayerBufferIndex(kInvalidResourceIndex),
       mCurrentMaskRectBufferIndex(kInvalidResourceIndex),
       mCurrentDepthMode(MLGDepthTestMode::Disabled),
       mNextSortIndex(1),
-      mUseDepthBuffer(StaticPrefs::AdvancedLayersEnableDepthBuffer()),
+      mUseDepthBuffer(StaticPrefs::layers_mlgpu_enable_depth_buffer()),
       mDepthBufferNeedsClear(false) {
   if (aParent) {
     aParent->AddChild(this);
   }
 }
 
 RenderViewMLGPU::~RenderViewMLGPU() {
   for (const auto& child : mChildren) {
@@ -183,17 +183,17 @@ void RenderViewMLGPU::AddItem(LayerMLGPU
 }
 
 bool RenderViewMLGPU::UpdateVisibleRegion(ItemInfo& aItem) {
   // If the item has some kind of complex transform, we perform a very
   // simple occlusion test and move on. We using a depth buffer we skip
   // CPU-based occlusion culling as well, since the GPU will do most of our
   // culling work for us.
   if (mUseDepthBuffer || !aItem.translation ||
-      !StaticPrefs::AdvancedLayersEnableCPUOcclusion()) {
+      !StaticPrefs::layers_mlgpu_enable_cpu_occlusion()) {
     // Update the render region even if we won't compute visibility, since some
     // layer types (like Canvas and Image) need to have the visible region
     // clamped.
     LayerIntRegion region = aItem.layer->GetShadowVisibleRegion();
     aItem.layer->SetRenderRegion(std::move(region));
 
     AL_LOG("RenderView %p simple occlusion test, bounds=%s, translation?=%d\n",
            this, Stringify(aItem.bounds).c_str(), aItem.translation ? 1 : 0);
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1228,18 +1228,18 @@ void CompositorOGL::DrawGeometry(const G
   if (aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE]) {
     EffectBlendMode* blendEffect = static_cast<EffectBlendMode*>(
         aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE].get());
     blendMode = blendEffect->mBlendMode;
   }
 
   // Only apply DEAA to quads that have been transformed such that aliasing
   // could be visible
-  bool bEnableAA =
-      StaticPrefs::LayersDEAAEnabled() && !aTransform.Is2DIntegerTranslation();
+  bool bEnableAA = StaticPrefs::layers_deaa_enabled() &&
+                   !aTransform.Is2DIntegerTranslation();
 
   bool colorMatrix = aEffectChain.mSecondaryEffects[EffectTypes::COLOR_MATRIX];
   ShaderConfigOGL config =
       GetShaderConfigFor(aEffectChain.mPrimaryEffect, sourceMask, blendMode,
                          colorMatrix, bEnableAA);
 
   config.SetOpacity(aOpacity != 1.f);
   ApplyPrimitiveConfig(config, aGeometry);
@@ -1544,17 +1544,17 @@ void CompositorOGL::DrawGeometry(const G
 
       // Drawing is always flipped, but when copying between surfaces we want to
       // avoid this. Pass true for the flip parameter to introduce a second flip
       // that cancels the other one out.
       didSetBlendMode = SetBlendMode(gl(), blendMode);
       BindAndDrawGeometry(program, aGeometry);
     } break;
     case EffectTypes::COMPONENT_ALPHA: {
-      MOZ_ASSERT(StaticPrefs::ComponentAlphaEnabled());
+      MOZ_ASSERT(StaticPrefs::layers_componentalpha_enabled());
       MOZ_ASSERT(blendMode == gfx::CompositionOp::OP_OVER,
                  "Can't support blend modes with component alpha!");
       EffectComponentAlpha* effectComponentAlpha =
           static_cast<EffectComponentAlpha*>(aEffectChain.mPrimaryEffect.get());
       TextureSourceOGL* sourceOnWhite =
           effectComponentAlpha->mOnWhite->AsSourceOGL();
       TextureSourceOGL* sourceOnBlack =
           effectComponentAlpha->mOnBlack->AsSourceOGL();
@@ -2022,17 +2022,17 @@ void PerUnitTexturePoolOGL::DestroyTextu
     if (mTextures.Length() > 0) {
       mGL->fDeleteTextures(mTextures.Length(), &mTextures[0]);
     }
   }
   mTextures.SetLength(0);
 }
 
 bool CompositorOGL::SupportsLayerGeometry() const {
-  return StaticPrefs::OGLLayerGeometry();
+  return StaticPrefs::layers_geometry_opengl_enabled();
 }
 
 void CompositorOGL::RegisterTextureSource(TextureSource* aTextureSource) {
 #ifdef MOZ_WIDGET_GTK
   if (mDestroyed) {
     return;
   }
   mRegisteredTextureSources.insert(aTextureSource);
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -699,17 +699,17 @@ void WebRenderLayerManager::FlushRenderi
   // might happen.
   bool resizing = mWidget && mWidget->IsResizingNativeWidget().valueOr(true);
 
   // Limit async FlushRendering to !resizing and Win DComp.
   // XXX relax the limitation
   if (WrBridge()->GetCompositorUseDComp() && !resizing) {
     cBridge->SendFlushRenderingAsync();
   } else if (mWidget->SynchronouslyRepaintOnResize() ||
-             StaticPrefs::LayersForceSynchronousResize()) {
+             StaticPrefs::layers_force_synchronous_resize()) {
     cBridge->SendFlushRendering();
   } else {
     cBridge->SendFlushRenderingAsync();
   }
 }
 
 void WebRenderLayerManager::WaitOnTransactionProcessed() {
   CompositorBridgeChild* bridge = GetCompositorBridgeChild();
--- a/gfx/thebes/D3D11Checks.cpp
+++ b/gfx/thebes/D3D11Checks.cpp
@@ -207,17 +207,17 @@ static bool DoesTextureSharingWorkIntern
 
   if (GetModuleHandleW(L"atidxx32.dll")) {
     nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
     if (gfxInfo) {
       nsString vendorID, vendorID2;
       gfxInfo->GetAdapterVendorID(vendorID);
       gfxInfo->GetAdapterVendorID2(vendorID2);
       if (vendorID.EqualsLiteral("0x8086") && vendorID2.IsEmpty()) {
-        if (!StaticPrefs::LayersAMDSwitchableGfxEnabled()) {
+        if (!StaticPrefs::layers_amd_switchable_gfx_enabled()) {
           return false;
         }
         gfxCriticalError(CriticalLog::DefaultOptions(false))
             << "PossiblyBrokenSurfaceSharing_UnexpectedAMDGPU";
       }
     }
   }
 
--- a/gfx/thebes/DeviceManagerDx.cpp
+++ b/gfx/thebes/DeviceManagerDx.cpp
@@ -496,17 +496,17 @@ bool DeviceManagerDx::CreateCompositorDe
 // whole graphics stack is blown away anyway. But just in case, we
 // make gpu process IDs negative and parent process IDs positive.
 static inline int32_t GetNextDeviceCounter() {
   static int32_t sDeviceCounter = 0;
   return XRE_IsGPUProcess() ? --sDeviceCounter : ++sDeviceCounter;
 }
 
 void DeviceManagerDx::CreateCompositorDevice(FeatureState& d3d11) {
-  if (StaticPrefs::LayersD3D11ForceWARP()) {
+  if (StaticPrefs::layers_d3d11_force_warp()) {
     CreateWARPCompositorDevice();
     return;
   }
 
   RefPtr<IDXGIAdapter1> adapter = GetDXGIAdapter();
   if (!adapter) {
     d3d11.SetFailed(FeatureStatus::Unavailable,
                     "Failed to acquire a DXGI adapter",
@@ -615,17 +615,17 @@ bool DeviceManagerDx::CreateDevice(IDXGI
     } while (false);
   }
 
   return true;
 }
 
 void DeviceManagerDx::CreateWARPCompositorDevice() {
   ScopedGfxFeatureReporter reporterWARP("D3D11-WARP",
-                                        StaticPrefs::LayersD3D11ForceWARP());
+                                        StaticPrefs::layers_d3d11_force_warp());
   FeatureState& d3d11 = gfxConfig::GetFeature(Feature::D3D11_COMPOSITING);
 
   HRESULT hr;
   RefPtr<ID3D11Device> device;
 
   // Use D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS
   // to prevent bug 1092260. IE 11 also uses this flag.
   UINT flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -911,32 +911,32 @@ void gfxPlatform::Init() {
   // interpret these cryptic strings.
   {
     nsAutoCString forcedPrefs;
     // D2D prefs
     forcedPrefs.AppendPrintf("FP(D%d%d", StaticPrefs::gfx_direct2d_disabled(),
                              StaticPrefs::gfx_direct2d_force_enabled());
     // Layers prefs
     forcedPrefs.AppendPrintf(
-        "-L%d%d%d%d", StaticPrefs::LayersAMDSwitchableGfxEnabled(),
-        StaticPrefs::LayersAccelerationDisabledDoNotUseDirectly(),
-        StaticPrefs::LayersAccelerationForceEnabledDoNotUseDirectly(),
-        StaticPrefs::LayersD3D11ForceWARP());
+        "-L%d%d%d%d", StaticPrefs::layers_amd_switchable_gfx_enabled(),
+        StaticPrefs::layers_acceleration_disabled_do_not_use_directly(),
+        StaticPrefs::layers_acceleration_force_enabled_do_not_use_directly(),
+        StaticPrefs::layers_d3d11_force_warp());
     // WebGL prefs
     forcedPrefs.AppendPrintf(
         "-W%d%d%d%d%d%d%d%d", StaticPrefs::WebGLANGLEForceD3D11(),
         StaticPrefs::WebGLANGLEForceWARP(), StaticPrefs::WebGLDisabled(),
         StaticPrefs::WebGLDisableANGLE(), StaticPrefs::WebGLDXGLEnabled(),
         StaticPrefs::WebGLForceEnabled(),
         StaticPrefs::WebGLForceLayersReadback(), StaticPrefs::WebGLForceMSAA());
     // Prefs that don't fit into any of the other sections
     forcedPrefs.AppendPrintf("-T%d%d%d) ",
                              StaticPrefs::gfx_android_rgb16_force(),
                              0,  // SkiaGL canvas no longer supported
-                             StaticPrefs::ForceShmemTiles());
+                             StaticPrefs::layers_force_shmem_tiles());
     ScopedGfxFeatureReporter::AppNote(forcedPrefs);
   }
 
   InitMoz2DLogging();
 
   gGfxPlatformPrefsLock = new Mutex("gfxPlatform::gGfxPlatformPrefsLock");
 
   /* Initialize the GfxInfo service.
@@ -1290,17 +1290,17 @@ void gfxPlatform::ShutdownLayersIPC() {
   if (!sLayersIPCIsUp) {
     return;
   }
   sLayersIPCIsUp = false;
 
   if (XRE_IsContentProcess()) {
     gfx::VRManagerChild::ShutDown();
     // cf bug 1215265.
-    if (StaticPrefs::ChildProcessShutdown()) {
+    if (StaticPrefs::layers_child_process_shutdown()) {
       layers::CompositorManagerChild::Shutdown();
       layers::ImageBridgeChild::ShutDown();
     }
 
     if (gfxVars::UseOMTP() && !recordreplay::IsRecordingOrReplaying()) {
       layers::PaintThread::Shutdown();
     }
   } else if (XRE_IsParentProcess()) {
@@ -1552,20 +1552,20 @@ already_AddRefed<DataSourceSurface> gfxP
 
 void gfxPlatform::ComputeTileSize() {
   // The tile size should be picked in the parent processes
   // and sent to the child processes over IPDL GetTileSize.
   if (!XRE_IsParentProcess()) {
     return;
   }
 
-  int32_t w = StaticPrefs::LayersTileWidth();
-  int32_t h = StaticPrefs::LayersTileHeight();
-
-  if (StaticPrefs::LayersTilesAdjust()) {
+  int32_t w = StaticPrefs::layers_tile_width();
+  int32_t h = StaticPrefs::layers_tile_height();
+
+  if (StaticPrefs::layers_tiles_adjust()) {
     gfx::IntSize screenSize = GetScreenSize();
     if (screenSize.width > 0) {
       // Choose a size so that there are between 2 and 4 tiles per screen width.
       // FIXME: we should probably make sure this is within the max texture
       // size, but I think everything should at least support 1024
       w = h = clamped(int32_t(RoundUpPow2(screenSize.width)) / 4, 256, 1024);
     }
   }
@@ -1857,26 +1857,26 @@ gfxFontEntry* gfxPlatform::MakePlatformF
                                             uint32_t aLength) {
   return gfxPlatformFontList::PlatformFontList()->MakePlatformFont(
       aFontName, aWeightForEntry, aStretchForEntry, aStyleForEntry, aFontData,
       aLength);
 }
 
 mozilla::layers::DiagnosticTypes gfxPlatform::GetLayerDiagnosticTypes() {
   mozilla::layers::DiagnosticTypes type = DiagnosticTypes::NO_DIAGNOSTIC;
-  if (StaticPrefs::DrawLayerBorders()) {
+  if (StaticPrefs::layers_draw_borders()) {
     type |= mozilla::layers::DiagnosticTypes::LAYER_BORDERS;
   }
-  if (StaticPrefs::DrawTileBorders()) {
+  if (StaticPrefs::layers_draw_tile_borders()) {
     type |= mozilla::layers::DiagnosticTypes::TILE_BORDERS;
   }
-  if (StaticPrefs::DrawBigImageBorders()) {
+  if (StaticPrefs::layers_draw_bigimage_borders()) {
     type |= mozilla::layers::DiagnosticTypes::BIGIMAGE_BORDERS;
   }
-  if (StaticPrefs::FlashLayerBorders()) {
+  if (StaticPrefs::layers_flash_borders()) {
     type |= mozilla::layers::DiagnosticTypes::FLASH_BORDERS;
   }
   return type;
 }
 
 BackendPrefsData gfxPlatform::GetBackendPrefs() const {
   BackendPrefsData data;
 
@@ -2443,37 +2443,37 @@ void gfxPlatform::InitAcceleration() {
     gfxVars::SetRemoteCanvasEnabled(StaticPrefs::gfx_canvas_remote() &&
                                     gfxConfig::IsEnabled(Feature::GPU_PROCESS));
   }
 }
 
 void gfxPlatform::InitGPUProcessPrefs() {
   // We want to hide this from about:support, so only set a default if the
   // pref is known to be true.
-  if (!StaticPrefs::GPUProcessEnabled() &&
-      !StaticPrefs::GPUProcessForceEnabled()) {
+  if (!StaticPrefs::layers_gpu_process_enabled() &&
+      !StaticPrefs::layers_gpu_process_force_enabled()) {
     return;
   }
 
   FeatureState& gpuProc = gfxConfig::GetFeature(Feature::GPU_PROCESS);
 
   // We require E10S - otherwise, there is very little benefit to the GPU
   // process, since the UI process must still use acceleration for
   // performance.
   if (!BrowserTabsRemoteAutostart()) {
     gpuProc.DisableByDefault(FeatureStatus::Unavailable,
                              "Multi-process mode is not enabled",
                              NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_E10S"));
   } else {
-    gpuProc.SetDefaultFromPref(StaticPrefs::GetGPUProcessEnabledPrefName(),
-                               true,
-                               StaticPrefs::GetGPUProcessEnabledPrefDefault());
+    gpuProc.SetDefaultFromPref(
+        StaticPrefs::Getlayers_gpu_process_enabledPrefName(), true,
+        StaticPrefs::Getlayers_gpu_process_enabledPrefDefault());
   }
 
-  if (StaticPrefs::GPUProcessForceEnabled()) {
+  if (StaticPrefs::layers_gpu_process_force_enabled()) {
     gpuProc.UserForceEnable("User force-enabled via pref");
   }
 
   if (IsHeadless()) {
     gpuProc.ForceDisable(FeatureStatus::Blocked, "Headless mode is enabled",
                          NS_LITERAL_CSTRING("FEATURE_FAILURE_HEADLESS_MODE"));
     return;
   }
@@ -2495,31 +2495,31 @@ void gfxPlatform::InitGPUProcessPrefs() 
 void gfxPlatform::InitCompositorAccelerationPrefs() {
   const char* acceleratedEnv = PR_GetEnv("MOZ_ACCELERATED");
 
   FeatureState& feature = gfxConfig::GetFeature(Feature::HW_COMPOSITING);
 
   // Base value - does the platform allow acceleration?
   if (feature.SetDefault(AccelerateLayersByDefault(), FeatureStatus::Blocked,
                          "Acceleration blocked by platform")) {
-    if (StaticPrefs::LayersAccelerationDisabledDoNotUseDirectly()) {
+    if (StaticPrefs::layers_acceleration_disabled_do_not_use_directly()) {
       feature.UserDisable("Disabled by pref",
                           NS_LITERAL_CSTRING("FEATURE_FAILURE_COMP_PREF"));
     } else if (acceleratedEnv && *acceleratedEnv == '0') {
       feature.UserDisable("Disabled by envvar",
                           NS_LITERAL_CSTRING("FEATURE_FAILURE_COMP_ENV"));
     }
   } else {
     if (acceleratedEnv && *acceleratedEnv == '1') {
       feature.UserEnable("Enabled by envvar");
     }
   }
 
   // This has specific meaning elsewhere, so we always record it.
-  if (StaticPrefs::LayersAccelerationForceEnabledDoNotUseDirectly()) {
+  if (StaticPrefs::layers_acceleration_force_enabled_do_not_use_directly()) {
     feature.UserForceEnable("Force-enabled by pref");
   }
 
   // Safe, headless, and record/replay modes override everything.
   if (InSafeMode()) {
     feature.ForceDisable(FeatureStatus::Blocked,
                          "Acceleration blocked by safe-mode",
                          NS_LITERAL_CSTRING("FEATURE_FAILURE_COMP_SAFEMODE"));
@@ -2969,17 +2969,17 @@ void gfxPlatform::InitWebRenderConfig() 
       // already have been forced disabled (e.g. safe mode, headless). It may
       // still be forced on by the user, and if so, this should have no effect.
       gfxConfig::Disable(Feature::HW_COMPOSITING, FeatureStatus::Blocked,
                          "Acceleration blocked by platform");
     }
 
     if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING) &&
         gfxConfig::IsEnabled(Feature::GPU_PROCESS) &&
-        !StaticPrefs::GPUProcessAllowSoftware()) {
+        !StaticPrefs::layers_gpu_process_allow_software()) {
       // We have neither WebRender nor OpenGL, we don't allow the GPU process
       // for basic compositor, and it wasn't disabled already.
       gfxConfig::Disable(Feature::GPU_PROCESS, FeatureStatus::Unavailable,
                          "Hardware compositing is unavailable.");
     }
   }
 #endif
 
@@ -3057,17 +3057,18 @@ bool gfxPlatform::AccelerateLayersByDefa
 #else
   return false;
 #endif
 }
 
 bool gfxPlatform::BufferRotationEnabled() {
   MutexAutoLock autoLock(*gGfxPlatformPrefsLock);
 
-  return sBufferRotationCheckPref && StaticPrefs::BufferRotationEnabled();
+  return sBufferRotationCheckPref &&
+         StaticPrefs::layers_bufferrotation_enabled();
 }
 
 void gfxPlatform::DisableBufferRotation() {
   MutexAutoLock autoLock(*gGfxPlatformPrefsLock);
 
   sBufferRotationCheckPref = false;
 }
 
@@ -3078,57 +3079,58 @@ bool gfxPlatform::UsesOffMainThreadCompo
   }
 
   static bool firstTime = true;
   static bool result = false;
 
   if (firstTime) {
     MOZ_ASSERT(sLayersAccelerationPrefsInitialized);
     result = gfxVars::BrowserTabsRemoteAutostart() ||
-             !StaticPrefs::LayersOffMainThreadCompositionForceDisabled();
+             !StaticPrefs::layers_offmainthreadcomposition_force_disabled();
 #if defined(MOZ_WIDGET_GTK)
     // Linux users who chose OpenGL are being grandfathered in to OMTC
-    result |= StaticPrefs::LayersAccelerationForceEnabledDoNotUseDirectly();
+    result |=
+        StaticPrefs::layers_acceleration_force_enabled_do_not_use_directly();
 
 #endif
     firstTime = false;
   }
 
   return result;
 }
 
 bool gfxPlatform::UsesTiling() const {
   bool usesSkia = GetDefaultContentBackend() == BackendType::SKIA;
 
   // We can't just test whether the PaintThread is initialized here because
   // this function is used when initializing the PaintThread. So instead we
   // check the conditions that enable OMTP with parallel painting.
   bool usesPOMTP = XRE_IsContentProcess() && gfxVars::UseOMTP() &&
-                   (StaticPrefs::LayersOMTPPaintWorkers() == -1 ||
-                    StaticPrefs::LayersOMTPPaintWorkers() > 1);
-
-  return StaticPrefs::LayersTilesEnabled() ||
-         (StaticPrefs::LayersTilesEnabledIfSkiaPOMTP() && usesSkia &&
+                   (StaticPrefs::layers_omtp_paint_workers() == -1 ||
+                    StaticPrefs::layers_omtp_paint_workers() > 1);
+
+  return StaticPrefs::layers_enable_tiles() ||
+         (StaticPrefs::layers_enable_tiles_if_skia_pomtp() && usesSkia &&
           usesPOMTP);
 }
 
 bool gfxPlatform::ContentUsesTiling() const {
   BackendPrefsData data = GetBackendPrefs();
   BackendType contentBackend = GetContentBackendPref(data.mContentBitmask);
   if (contentBackend == BackendType::NONE) {
     contentBackend = data.mContentDefault;
   }
 
   bool contentUsesSkia = contentBackend == BackendType::SKIA;
   bool contentUsesPOMTP =
-      gfxVars::UseOMTP() && (StaticPrefs::LayersOMTPPaintWorkers() == -1 ||
-                             StaticPrefs::LayersOMTPPaintWorkers() > 1);
-
-  return StaticPrefs::LayersTilesEnabled() ||
-         (StaticPrefs::LayersTilesEnabledIfSkiaPOMTP() && contentUsesSkia &&
+      gfxVars::UseOMTP() && (StaticPrefs::layers_omtp_paint_workers() == -1 ||
+                             StaticPrefs::layers_omtp_paint_workers() > 1);
+
+  return StaticPrefs::layers_enable_tiles() ||
+         (StaticPrefs::layers_enable_tiles_if_skia_pomtp() && contentUsesSkia &&
           contentUsesPOMTP);
 }
 
 /***
  * The preference "layout.frame_rate" has 3 meanings depending on the value:
  *
  * -1 = Auto (default), use hardware vsync or software vsync @ 60 hz if hw
  *      vsync fails.
@@ -3242,17 +3244,17 @@ void gfxPlatform::GetApzSupportInfo(mozi
   }
 
   if (SupportsApzAutoscrolling()) {
     aObj.DefineProperty("ApzAutoscrollInput", 1);
   }
 }
 
 void gfxPlatform::GetTilesSupportInfo(mozilla::widget::InfoObject& aObj) {
-  if (!StaticPrefs::LayersTilesEnabled()) {
+  if (!StaticPrefs::layers_enable_tiles()) {
     return;
   }
 
   IntSize tileSize = gfxVars::TileSize();
   aObj.DefineProperty("TileHeight", tileSize.height);
   aObj.DefineProperty("TileWidth", tileSize.width);
 }
 
@@ -3358,17 +3360,17 @@ bool gfxPlatform::AsyncPanZoomEnabled() 
   // this requirement.
   if (!BrowserTabsRemoteAutostart()) {
     return false;
   }
 #endif
 #ifdef MOZ_WIDGET_ANDROID
   return true;
 #else
-  return StaticPrefs::AsyncPanZoomEnabledDoNotUseDirectly();
+  return StaticPrefs::layers_async_pan_zoom_enabled_do_not_use_directly();
 #endif
 }
 
 /*static*/
 bool gfxPlatform::PerfWarnings() {
   return StaticPrefs::gfx_perf_warnings_enabled();
 }
 
@@ -3512,25 +3514,25 @@ void gfxPlatform::InitOpenGLConfig() {
     openGLFeature.DisableByDefault(
         FeatureStatus::Unavailable, "Hardware compositing is disabled",
         NS_LITERAL_CSTRING("FEATURE_FAILURE_OPENGL_NEED_HWCOMP"));
     return;
   }
 
 #ifdef XP_WIN
   openGLFeature.SetDefaultFromPref(
-      StaticPrefs::GetLayersPreferOpenGLPrefName(), true,
-      StaticPrefs::GetLayersPreferOpenGLPrefDefault());
+      StaticPrefs::Getlayers_prefer_openglPrefName(), true,
+      StaticPrefs::Getlayers_prefer_openglPrefDefault());
 #else
   openGLFeature.EnableByDefault();
 #endif
 
   // When layers acceleration is force-enabled, enable it even for blacklisted
   // devices.
-  if (StaticPrefs::LayersAccelerationForceEnabledDoNotUseDirectly()) {
+  if (StaticPrefs::layers_acceleration_force_enabled_do_not_use_directly()) {
     openGLFeature.UserForceEnable("Force-enabled by pref");
     return;
   }
 
   nsCString message;
   nsCString failureId;
   if (!IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &message,
                            failureId)) {
--- a/gfx/thebes/gfxPlatformGtk.cpp
+++ b/gfx/thebes/gfxPlatformGtk.cpp
@@ -297,17 +297,17 @@ double gfxPlatformGtk::GetFontScaleFacto
   if (dpi < 168) {
     return 1.5;
   }
   return round(dpi / 96.0);
 }
 
 bool gfxPlatformGtk::UseImageOffscreenSurfaces() {
   return GetDefaultContentBackend() != mozilla::gfx::BackendType::CAIRO ||
-         StaticPrefs::UseImageOffscreenSurfaces();
+         StaticPrefs::layers_use_image_offscreen_surfaces();
 }
 
 gfxImageFormat gfxPlatformGtk::GetOffscreenFormat() {
   // Make sure there is a screen
   GdkScreen* screen = gdk_screen_get_default();
   if (screen && gdk_visual_get_depth(gdk_visual_get_system()) == 16) {
     return SurfaceFormat::R5G6B5_UINT16;
   }
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1362,41 +1362,41 @@ void gfxWindowsPlatform::InitializeD3D11
   nsCString message;
   nsCString failureId;
   if (!gfxPlatform::IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
                                         &message, failureId)) {
     d3d11.Disable(FeatureStatus::Blacklisted, message.get(), failureId);
   }
 
   // Check if the user really, really wants WARP.
-  if (StaticPrefs::LayersD3D11ForceWARP()) {
+  if (StaticPrefs::layers_d3d11_force_warp()) {
     // Force D3D11 on even if we disabled it.
     d3d11.UserForceEnable("User force-enabled WARP");
   }
 
   InitializeAdvancedLayersConfig();
 }
 
 /* static */
 void gfxWindowsPlatform::InitializeAdvancedLayersConfig() {
   // Only enable Advanced Layers if D3D11 succeeded.
   if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
     return;
   }
 
   FeatureState& al = gfxConfig::GetFeature(Feature::ADVANCED_LAYERS);
   al.SetDefaultFromPref(
-      StaticPrefs::GetAdvancedLayersEnabledDoNotUseDirectlyPrefName(),
+      StaticPrefs::Getlayers_mlgpu_enabled_do_not_use_directlyPrefName(),
       true /* aIsEnablePref */,
-      StaticPrefs::GetAdvancedLayersEnabledDoNotUseDirectlyPrefDefault());
+      StaticPrefs::Getlayers_mlgpu_enabled_do_not_use_directlyPrefDefault());
 
   // Windows 7 has an extra pref since it uses totally different buffer paths
   // that haven't been performance tested yet.
   if (al.IsEnabled() && !IsWin8OrLater()) {
-    if (StaticPrefs::AdvancedLayersEnableOnWindows7()) {
+    if (StaticPrefs::layers_mlgpu_enable_on_windows7()) {
       al.UserEnable("Enabled for Windows 7 via user-preference");
     } else {
       al.Disable(FeatureStatus::Disabled,
                  "Advanced Layers is disabled on Windows 7 by default",
                  NS_LITERAL_CSTRING("FEATURE_FAILURE_DISABLED_ON_WIN7"));
     }
   }
 
@@ -1632,17 +1632,17 @@ bool gfxWindowsPlatform::InitGPUProcessS
                                         &message, failureId)) {
     gpuProc.Disable(FeatureStatus::Blacklisted, message.get(), failureId);
     return false;
   }
 
   if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
     // Don't use the GPU process if not using D3D11, unless software
     // compositor is allowed
-    if (StaticPrefs::GPUProcessAllowSoftware()) {
+    if (StaticPrefs::layers_gpu_process_allow_software()) {
       return gpuProc.IsEnabled();
     }
     gpuProc.Disable(FeatureStatus::Unavailable,
                     "Not using GPU Process since D3D11 is unavailable",
                     NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_D3D11"));
   } else if (!IsWin7SP1OrLater()) {
     // On Windows 7 Pre-SP1, DXGI 1.2 is not available and remote presentation
     // for D3D11 will not work. Rather than take a regression we revert back
@@ -1939,17 +1939,17 @@ gfxWindowsPlatform::CreateHardwareVsyncS
 
   RefPtr<VsyncSource> d3dVsyncSource = new D3DVsyncSource();
   return d3dVsyncSource.forget();
 }
 
 void gfxWindowsPlatform::GetAcceleratedCompositorBackends(
     nsTArray<LayersBackend>& aBackends) {
   if (gfxConfig::IsEnabled(Feature::OPENGL_COMPOSITING) &&
-      StaticPrefs::LayersPreferOpenGL()) {
+      StaticPrefs::layers_prefer_opengl()) {
     aBackends.AppendElement(LayersBackend::LAYERS_OPENGL);
   }
 
   if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
     aBackends.AppendElement(LayersBackend::LAYERS_D3D11);
   }
 }
 
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -766,17 +766,17 @@ bool nsLayoutUtils::AllowZoomingForDocum
 float nsLayoutUtils::GetCurrentAPZResolutionScale(PresShell* aPresShell) {
   return aPresShell ? aPresShell->GetCumulativeNonRootScaleResolution() : 1.0;
 }
 
 // Return the maximum displayport size, based on the LayerManager's maximum
 // supported texture size. The result is in app units.
 static nscoord GetMaxDisplayPortSize(nsIContent* aContent,
                                      nsPresContext* aFallbackPrescontext) {
-  MOZ_ASSERT(!StaticPrefs::LayersTilesEnabled(),
+  MOZ_ASSERT(!StaticPrefs::layers_enable_tiles(),
              "Do not clamp displayports if tiling is enabled");
 
   // Pick a safe maximum displayport size for sanity purposes. This is the
   // lowest maximum texture size on tileless-platforms (Windows, D3D10).
   // If the gfx.max-texture-size pref is set, further restrict the displayport
   // size to fit within that, because the compositor won't upload stuff larger
   // than this size.
   nscoord safeMaximum = aFallbackPrescontext
@@ -903,17 +903,17 @@ static nsRect GetDisplayPortFromMarginsD
   //   the choosing of the resolution to display-list building time.
   ScreenSize alignment;
 
   PresShell* presShell = presContext->PresShell();
   MOZ_ASSERT(presShell);
 
   if (presShell->IsDisplayportSuppressed()) {
     alignment = ScreenSize(1, 1);
-  } else if (StaticPrefs::LayersTilesEnabled()) {
+  } else if (StaticPrefs::layers_enable_tiles()) {
     // Don't align to tiles if they are too large, because we could expand
     // the displayport by a lot which can take more paint time. It's a tradeoff
     // though because if we don't align to tiles we have more waste on upload.
     IntSize tileSize = gfxVars::TileSize();
     alignment = ScreenSize(std::min(256, tileSize.width),
                            std::min(256, tileSize.height));
   } else {
     // If we're not drawing with tiles then we need to be careful about not
@@ -925,17 +925,17 @@ static nsRect GetDisplayPortFromMarginsD
   // Avoid division by zero.
   if (alignment.width == 0) {
     alignment.width = 128;
   }
   if (alignment.height == 0) {
     alignment.height = 128;
   }
 
-  if (StaticPrefs::LayersTilesEnabled()) {
+  if (StaticPrefs::layers_enable_tiles()) {
     // Expand the rect by the margins
     screenRect.Inflate(aMarginsData->mMargins);
   } else {
     // Calculate the displayport to make sure we fit within the max texture size
     // when not tiling.
     nscoord maxSizeAppUnits = GetMaxDisplayPortSize(aContent, presContext);
     MOZ_ASSERT(maxSizeAppUnits < nscoord_MAX);
 
@@ -1137,17 +1137,17 @@ static bool GetDisplayPortImpl(
   } else if (isDisplayportSuppressed ||
              nsLayoutUtils::ShouldDisableApzForElement(aContent)) {
     DisplayPortMarginsPropertyData noMargins(ScreenMargin(), 1);
     result = GetDisplayPortFromMarginsData(aContent, &noMargins, aMultiplier);
   } else {
     result = GetDisplayPortFromMarginsData(aContent, marginsData, aMultiplier);
   }
 
-  if (!StaticPrefs::LayersTilesEnabled()) {
+  if (!StaticPrefs::layers_enable_tiles()) {
     // Perform the desired error handling if the displayport dimensions
     // exceeds the maximum allowed size
     nscoord maxSize = GetMaxDisplayPortSize(aContent, nullptr);
     if (result.width > maxSize || result.height > maxSize) {
       switch (aBehaviour) {
         case MaxSizeExceededBehaviour::Assert:
           NS_ASSERTION(false, "Displayport must be a valid texture size");
           break;
@@ -1170,18 +1170,18 @@ static void TranslateFromScrollPortToScr
   if (scrollableFrame) {
     *aRect += scrollableFrame->GetScrollPortRect().TopLeft();
   }
 }
 
 bool nsLayoutUtils::GetDisplayPort(
     nsIContent* aContent, nsRect* aResult,
     RelativeTo aRelativeTo /* = RelativeTo::ScrollPort */) {
-  float multiplier = StaticPrefs::UseLowPrecisionBuffer()
-                         ? 1.0f / StaticPrefs::LowPrecisionResolution()
+  float multiplier = StaticPrefs::layers_low_precision_buffer()
+                         ? 1.0f / StaticPrefs::layers_low_precision_resolution()
                          : 1.0f;
   bool usingDisplayPort = GetDisplayPortImpl(aContent, aResult, multiplier);
   if (aResult && usingDisplayPort && aRelativeTo == RelativeTo::ScrollFrame) {
     TranslateFromScrollPortToScrollFrame(aContent, aResult);
   }
   return usingDisplayPort;
 }
 
@@ -1363,29 +1363,29 @@ void nsLayoutUtils::SetDisplayPortBaseIf
                                                const nsRect& aBase) {
   if (!aContent->GetProperty(nsGkAtoms::DisplayPortBase)) {
     SetDisplayPortBase(aContent, aBase);
   }
 }
 
 bool nsLayoutUtils::GetCriticalDisplayPort(nsIContent* aContent,
                                            nsRect* aResult) {
-  if (StaticPrefs::UseLowPrecisionBuffer()) {
+  if (StaticPrefs::layers_low_precision_buffer()) {
     return GetDisplayPortImpl(aContent, aResult, 1.0f);
   }
   return false;
 }
 
 bool nsLayoutUtils::HasCriticalDisplayPort(nsIContent* aContent) {
   return GetCriticalDisplayPort(aContent, nullptr);
 }
 
 bool nsLayoutUtils::GetHighResolutionDisplayPort(nsIContent* aContent,
                                                  nsRect* aResult) {
-  if (StaticPrefs::UseLowPrecisionBuffer()) {
+  if (StaticPrefs::layers_low_precision_buffer()) {
     return GetCriticalDisplayPort(aContent, aResult);
   }
   return GetDisplayPort(aContent, aResult);
 }
 
 void nsLayoutUtils::RemoveDisplayPort(nsIContent* aContent) {
   aContent->DeleteProperty(nsGkAtoms::DisplayPort);
   aContent->DeleteProperty(nsGkAtoms::DisplayPortMargins);
@@ -4033,17 +4033,17 @@ nsresult nsLayoutUtils::PaintFrame(gfxCo
         }
       }
     }
 
     builder->SetIsBuilding(false);
     builder->IncrementPresShellPaintCount(presShell);
   }
 
-  if (StaticPrefs::LayersDrawFPS()) {
+  if (StaticPrefs::layers_acceleration_draw_fps()) {
     RefPtr<LayerManager> lm = builder->GetWidgetLayerManager();
     PaintTiming* pt = ClientLayerManager::MaybeGetPaintTiming(lm);
 
     if (pt) {
       pt->dlMs() = static_cast<float>(metrics->mPartialBuildDuration);
       pt->dl2Ms() = static_cast<float>(metrics->mFullBuildDuration);
     }
   }
@@ -4114,17 +4114,17 @@ nsresult nsLayoutUtils::PaintFrame(gfxCo
   if (consoleNeedsDisplayList) {
     DumpAfterPaintDisplayList(ss, builder, list, layerManager);
   }
 
 #ifdef MOZ_DUMP_PAINTING
   gfxUtils::sDumpPaintFile = savedDumpFile;
 #endif
 
-  if (StaticPrefs::DumpClientLayers()) {
+  if (StaticPrefs::layers_dump_client_layers()) {
     std::stringstream ss;
     FrameLayerBuilder::DumpRetainedLayerTree(layerManager, ss, false);
     print_stderr(ss);
   }
 
   // Update the widget's opaque region information. This sets
   // glass boundaries on Windows. Also set up the window dragging region
   // and plugin clip regions and bounds.
@@ -8993,17 +8993,17 @@ ScrollMetadata nsLayoutUtils::ComputeScr
     if (nsLayoutUtils::GetCriticalDisplayPort(aContent, &dp)) {
       metrics.SetCriticalDisplayPort(CSSRect::FromAppUnits(dp));
     }
 
     // Log the high-resolution display port (which is either the displayport
     // or the critical displayport) for test purposes.
     if (IsAPZTestLoggingEnabled()) {
       LogTestDataForPaint(aLayerManager, scrollId, "displayport",
-                          StaticPrefs::UseLowPrecisionBuffer()
+                          StaticPrefs::layers_low_precision_buffer()
                               ? metrics.GetCriticalDisplayPort()
                               : metrics.GetDisplayPort());
     }
 
     DisplayPortMarginsPropertyData* marginsData =
         static_cast<DisplayPortMarginsPropertyData*>(
             aContent->GetProperty(nsGkAtoms::DisplayPortMargins));
     if (marginsData) {
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2095,17 +2095,17 @@ ScrollFrameHelper::ScrollFrameHelper(nsC
       mMinimumScaleSizeChanged(false),
       mVelocityQueue(aOuter->PresContext()) {
   if (LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) != 0) {
     mScrollbarActivity = new ScrollbarActivity(do_QueryFrame(aOuter));
   }
 
   EnsureFrameVisPrefsCached();
 
-  if (IsAlwaysActive() && StaticPrefs::LayersTilesEnabled() &&
+  if (IsAlwaysActive() && StaticPrefs::layers_enable_tiles() &&
       !nsLayoutUtils::UsesAsyncScrolling(mOuter) && mOuter->GetContent()) {
     // If we have tiling but no APZ, then set a 0-margin display port on
     // active scroll containers so that we paint by whole tile increments
     // when scrolling.
     nsLayoutUtils::SetDisplayPortMargins(
         mOuter->GetContent(), mOuter->PresShell(), ScreenMargin(), 0);
     nsLayoutUtils::SetZeroMarginDisplayPortOnAsyncScrollableAncestors(mOuter);
   }
--- a/layout/painting/FrameLayerBuilder.cpp
+++ b/layout/painting/FrameLayerBuilder.cpp
@@ -596,17 +596,17 @@ class PaintedLayerData {
 
 #ifdef MOZ_DUMP_PAINTING
   /**
    * Keep track of important decisions for debugging.
    */
   nsCString mLog;
 
 #  define FLB_LOG_PAINTED_LAYER_DECISION(pld, ...) \
-    if (StaticPrefs::LayersDumpDecision()) {       \
+    if (StaticPrefs::layers_dump_decision()) {     \
       pld->mLog.AppendPrintf("\t\t\t\t");          \
       pld->mLog.AppendPrintf(__VA_ARGS__);         \
     }
 #else
 #  define FLB_LOG_PAINTED_LAYER_DECISION(...)
 #endif
 
   /**
@@ -4477,17 +4477,17 @@ static void ProcessDisplayItemMarker(Dis
 void ContainerState::ProcessDisplayItems(nsDisplayList* aList) {
   AUTO_PROFILER_LABEL("ContainerState::ProcessDisplayItems",
                       GRAPHICS_LayerBuilding);
   PerfStats::AutoMetricRecording<PerfStats::Metric::LayerBuilding>
       autoRecording;
 
   nsPoint topLeft(0, 0);
 
-  int32_t maxLayers = StaticPrefs::MaxActiveLayers();
+  int32_t maxLayers = StaticPrefs::layers_max_active();
   int layerCount = 0;
 
   if (!mManager->IsWidgetLayerManager()) {
     mPaintedLayerDataTree.InitializeForInactiveLayer(
         mContainerAnimatedGeometryRoot);
   }
 
   AnimatedGeometryRoot* lastAnimatedGeometryRoot = nullptr;
@@ -6200,17 +6200,17 @@ static bool ChooseScaleAndSetTransform(
       aContainerFrame, aContainerItem, aVisibleRect, aIncomingScale.mXScale,
       aIncomingScale.mYScale, transform2d, canDraw2D);
 
   // If this is a transform container layer, then pre-rendering might
   // mean we try render a layer bigger than the max texture size. If we have
   // tiling, that's not a problem, since we'll automatically choose a tiled
   // layer for layers of that size. If not, we need to apply clamping to
   // prevent this.
-  if (aTransform && !StaticPrefs::LayersTilesEnabled()) {
+  if (aTransform && !StaticPrefs::layers_enable_tiles()) {
     RestrictScaleToMaxLayerSize(scale, aVisibleRect, aContainerFrame, aLayer);
   }
 
   // Store the inverse of our resolution-scale on the layer
   aLayer->SetBaseTransform(transform);
   aLayer->SetPreScale(1.0f / scale.width, 1.0f / scale.height);
   aLayer->SetInheritedScale(aIncomingScale.mXScale, aIncomingScale.mYScale);
 
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -2890,17 +2890,18 @@ FrameLayerBuilder* nsDisplayList::BuildL
 
     {
       PaintTelemetry::AutoRecord record(PaintTelemetry::Metric::Layerization);
 
       root = layerBuilder->BuildContainerLayerFor(aBuilder, aLayerManager,
                                                   frame, nullptr, this,
                                                   containerParameters, nullptr);
 
-      if (!record.GetStart().IsNull() && StaticPrefs::LayersDrawFPS()) {
+      if (!record.GetStart().IsNull() &&
+          StaticPrefs::layers_acceleration_draw_fps()) {
         if (PaintTiming* pt =
                 ClientLayerManager::MaybeGetPaintTiming(aLayerManager)) {
           pt->flbMs() = (TimeStamp::Now() - record.GetStart()).ToMilliseconds();
         }
       }
     }
 
     if (!root) {
@@ -3591,17 +3592,17 @@ void nsDisplayItem::FuseClipChainUpTo(ns
 }
 
 bool nsDisplayItem::ShouldUseAdvancedLayer(LayerManager* aManager,
                                            PrefFunc aFunc) const {
   return CanUseAdvancedLayer(aManager) ? aFunc() : false;
 }
 
 bool nsDisplayItem::CanUseAdvancedLayer(LayerManager* aManager) const {
-  return StaticPrefs::LayersAdvancedBasicLayerEnabled() || !aManager ||
+  return StaticPrefs::layers_advanced_basic_layer_enabled() || !aManager ||
          aManager->GetBackendType() == layers::LayersBackend::LAYERS_WR;
 }
 
 static const DisplayItemClipChain* FindCommonAncestorClipForIntersection(
     const DisplayItemClipChain* aOne, const DisplayItemClipChain* aTwo) {
   for (const ActiveScrolledRoot* asr =
            ActiveScrolledRoot::PickDescendant(aOne->mASR, aTwo->mASR);
        asr; asr = asr->mParent) {
@@ -9833,17 +9834,17 @@ bool nsDisplayMasksAndClipPaths::CanPain
   if (!aManager->IsWidgetLayerManager()) {
     return false;
   }
 
   if (!nsSVGIntegrationUtils::IsMaskResourceReady(mFrame)) {
     return false;
   }
 
-  if (StaticPrefs::DrawMaskLayer()) {
+  if (StaticPrefs::layers_draw_mask_debug()) {
     return false;
   }
 
   // We don't currently support this item creating a mask
   // for both the clip-path, and rounded rect clipping.
   if (GetClip().GetRoundedRectCount() != 0) {
     return false;
   }
--- a/layout/svg/nsSVGIntegrationUtils.cpp
+++ b/layout/svg/nsSVGIntegrationUtils.cpp
@@ -997,17 +997,17 @@ void PaintMaskAndClipPathInternal(const 
                                                        cssPxToDevPxMatrix);
     }
   }
 
   /* Paint the child */
   context.SetMatrix(matrixAutoSaveRestore.Matrix());
   aPaintChild();
 
-  if (StaticPrefs::DrawMaskLayer()) {
+  if (StaticPrefs::layers_draw_mask_debug()) {
     gfxContextAutoSaveRestore saver(&context);
 
     context.NewPath();
     gfxRect drawingRect = nsLayoutUtils::RectToGfxRect(
         aParams.borderArea, frame->PresContext()->AppUnitsPerDevPixel());
     context.SnappedRectangle(drawingRect);
     Color overlayColor(0.0f, 0.0f, 0.0f, 0.8f);
     if (maskUsage.shouldGenerateMaskLayer) {
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -3895,39 +3895,39 @@ VARCACHE_PREF(
 //---------------------------------------------------------------------------
 // Prefs starting with "layers."
 //---------------------------------------------------------------------------
 
 // Whether to disable acceleration for all widgets.
 VARCACHE_PREF(
   Once,
   "layers.acceleration.disabled",
-  LayersAccelerationDisabledDoNotUseDirectly,
+   layers_acceleration_disabled_do_not_use_directly,
   bool, false
 )
 // Instead, use gfxConfig::IsEnabled(Feature::HW_COMPOSITING).
 
 VARCACHE_PREF(
   Live,
   "layers.acceleration.draw-fps",
-  LayersDrawFPS,
+   layers_acceleration_draw_fps,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.acceleration.draw-fps.print-histogram",
-  FPSPrintHistogram,
+   layers_acceleration_draw_fps_print_histogram,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.acceleration.draw-fps.write-to-file",
-  WriteFPSToFile,
+   layers_acceleration_draw_fps_write_to_file,
   RelaxedAtomicBool, false
 )
 
 // Whether to force acceleration on, ignoring blacklists.
 #ifdef ANDROID
 // bug 838603 -- on Android, accidentally blacklisting OpenGL layers
 // means a startup crash for everyone.
 // Temporarily force-enable GL compositing.  This is default-disabled
@@ -3935,620 +3935,613 @@ VARCACHE_PREF(
 // compositing isn't default disabled in widget/android.
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.acceleration.force-enabled",
-  LayersAccelerationForceEnabledDoNotUseDirectly,
+   layers_acceleration_force_enabled_do_not_use_directly,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Live,
   "layers.advanced.basic-layer.enabled",
-  LayersAdvancedBasicLayerEnabled,
+   layers_advanced_basic_layer_enabled,
   RelaxedAtomicBool, false
 )
 
 // Whether we allow AMD switchable graphics.
 VARCACHE_PREF(
   Once,
   "layers.amd-switchable-gfx.enabled",
-  LayersAMDSwitchableGfxEnabled,
+   layers_amd_switchable_gfx_enabled,
   bool, true
 )
 
 // Whether to use async panning and zooming.
 VARCACHE_PREF(
   Once,
   "layers.async-pan-zoom.enabled",
-  AsyncPanZoomEnabledDoNotUseDirectly,
+   layers_async_pan_zoom_enabled_do_not_use_directly,
   bool, true
 )
 
 VARCACHE_PREF(
   Live,
   "layers.bench.enabled",
-  LayersBenchEnabled,
+   layers_bench_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Once,
   "layers.bufferrotation.enabled",
-  BufferRotationEnabled,
+   layers_bufferrotation_enabled,
   bool, true
 )
 
 VARCACHE_PREF(
   Live,
   "layers.child-process-shutdown",
-  ChildProcessShutdown,
+   layers_child_process_shutdown,
   RelaxedAtomicBool, true
 )
 
 #ifdef MOZ_GFX_OPTIMIZE_MOBILE
 // If MOZ_GFX_OPTIMIZE_MOBILE is defined, we force component alpha off
 // and ignore the preference.
 VARCACHE_PREF(
   Skip,
   "layers.componentalpha.enabled",
-  ComponentAlphaEnabled,
+   layers_componentalpha_enabled,
   bool, false
 )
 #else
 // If MOZ_GFX_OPTIMIZE_MOBILE is not defined, we actually take the
 // preference value, defaulting to true.
 VARCACHE_PREF(
   Once,
   "layers.componentalpha.enabled",
-  ComponentAlphaEnabled,
+   layers_componentalpha_enabled,
   bool, true
 )
 #endif
 
 VARCACHE_PREF(
   Once,
   "layers.d3d11.force-warp",
-  LayersD3D11ForceWARP,
+   layers_d3d11_force_warp,
   bool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.deaa.enabled",
-  LayersDEAAEnabled,
+   layers_deaa_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.draw-bigimage-borders",
-  DrawBigImageBorders,
+   layers_draw_bigimage_borders,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.draw-borders",
-  DrawLayerBorders,
+   layers_draw_borders,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.draw-tile-borders",
-  DrawTileBorders,
+   layers_draw_tile_borders,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.draw-layer-info",
-  DrawLayerInfo,
+   layers_draw_layer_info,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.dump",
-  LayersDump,
+   layers_dump,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.dump-texture",
-  LayersDumpTexture,
+   layers_dump_texture,
   RelaxedAtomicBool, false
 )
 
 #ifdef MOZ_DUMP_PAINTING
 VARCACHE_PREF(
   Live,
   "layers.dump-decision",
-  LayersDumpDecision,
+   layers_dump_decision,
   RelaxedAtomicBool, false
 )
 #endif
 
 VARCACHE_PREF(
   Live,
   "layers.dump-client-layers",
-  DumpClientLayers,
+   layers_dump_client_layers,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.dump-host-layers",
-  DumpHostLayers,
+   layers_dump_host_layers,
   RelaxedAtomicBool, false
 )
 
 // 0 is "no change" for contrast, positive values increase it, negative values
 // decrease it until we hit mid gray at -1 contrast, after that it gets weird.
 VARCACHE_PREF(
   Live,
   "layers.effect.contrast",
-  LayersEffectContrast,
+   layers_effect_contrast,
   AtomicFloat, 0.0f
 )
 
 VARCACHE_PREF(
   Live,
   "layers.effect.grayscale",
-  LayersEffectGrayscale,
+   layers_effect_grayscale,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.effect.invert",
-  LayersEffectInvert,
+   layers_effect_invert,
   RelaxedAtomicBool, false
 )
 
 #if defined(XP_MACOSX) || defined (OS_OPENBSD)
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.enable-tiles",
-  LayersTilesEnabled,
+   layers_enable_tiles,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 #if defined(XP_WIN)
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.enable-tiles-if-skia-pomtp",
-  LayersTilesEnabledIfSkiaPOMTP,
+   layers_enable_tiles_if_skia_pomtp,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Live,
   "layers.flash-borders",
-  FlashLayerBorders,
+   layers_flash_borders,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Once,
   "layers.force-shmem-tiles",
-  ForceShmemTiles,
+   layers_force_shmem_tiles,
   bool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.draw-mask-debug",
-  DrawMaskLayer,
+   layers_draw_mask_debug,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.force-synchronous-resize",
-  LayersForceSynchronousResize,
+   layers_force_synchronous_resize,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "layers.geometry.opengl.enabled",
-  OGLLayerGeometry,
+   layers_geometry_opengl_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.geometry.basic.enabled",
-  BasicLayerGeometry,
+   layers_geometry_basic_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.geometry.d3d11.enabled",
-  D3D11LayerGeometry,
+   layers_geometry_d3d11_enabled,
   RelaxedAtomicBool, false
 )
 
 #if defined(XP_WIN)
 #define PREF_VALUE true
 #elif defined(MOZ_WIDGET_GTK)
 #define PREF_VALUE false
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.gpu-process.allow-software",
-  GPUProcessAllowSoftware,
+   layers_gpu_process_allow_software,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.gpu-process.enabled",
-  GPUProcessEnabled,
+   layers_gpu_process_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Once,
   "layers.gpu-process.force-enabled",
-  GPUProcessForceEnabled,
+   layers_gpu_process_force_enabled,
   bool, false
 )
 
 VARCACHE_PREF(
   Once,
   "layers.gpu-process.ipc_reply_timeout_ms",
-  GPUProcessIPCReplyTimeoutMs,
+   layers_gpu_process_ipc_reply_timeout_ms,
   int32_t, 10000
 )
 
 VARCACHE_PREF(
   Live,
   "layers.gpu-process.max_restarts",
-  GPUProcessMaxRestarts,
+   layers_gpu_process_max_restarts,
   RelaxedAtomicInt32, 1
 )
 
 // Note: This pref will only be used if it is less than layers.gpu-process.max_restarts.
 VARCACHE_PREF(
   Live,
   "layers.gpu-process.max_restarts_with_decoder",
-  GPUProcessMaxRestartsWithDecoder,
+   layers_gpu_process_max_restarts_with_decoder,
   RelaxedAtomicInt32, 0
 )
 
 VARCACHE_PREF(
   Once,
   "layers.gpu-process.startup_timeout_ms",
-  GPUProcessTimeoutMs,
+   layers_gpu_process_startup_timeout_ms,
   int32_t, 5000
 )
 
 VARCACHE_PREF(
   Live,
   "layers.low-precision-buffer",
-  UseLowPrecisionBuffer,
+   layers_low_precision_buffer,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.low-precision-opacity",
-  LowPrecisionOpacity,
+   layers_low_precision_opacity,
   AtomicFloat, 1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "layers.low-precision-resolution",
-  LowPrecisionResolution,
+   layers_low_precision_resolution,
   AtomicFloat, 0.25f
 )
 
 VARCACHE_PREF(
   Live,
   "layers.max-active",
-  MaxActiveLayers,
+   layers_max_active,
   RelaxedAtomicInt32, -1
 )
 
 #if defined(XP_WIN)
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enabled",
-  AdvancedLayersEnabledDoNotUseDirectly,
+   layers_mlgpu_enabled_do_not_use_directly,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enable-buffer-cache",
-  AdvancedLayersEnableBufferCache,
+   layers_mlgpu_enable_buffer_cache,
   bool, true
 )
 
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enable-buffer-sharing",
-  AdvancedLayersEnableBufferSharing,
+   layers_mlgpu_enable_buffer_sharing,
   bool, true
 )
 
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enable-clear-view",
-  AdvancedLayersEnableClearView,
+   layers_mlgpu_enable_clear_view,
   bool, true
 )
 
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enable-cpu-occlusion",
-  AdvancedLayersEnableCPUOcclusion,
+   layers_mlgpu_enable_cpu_occlusion,
   bool, true
 )
 
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enable-depth-buffer",
-  AdvancedLayersEnableDepthBuffer,
+   layers_mlgpu_enable_depth_buffer,
   bool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.mlgpu.enable-invalidation",
-  AdvancedLayersUseInvalidation,
+   layers_mlgpu_enable_invalidation,
   RelaxedAtomicBool, true
 )
 
 #if defined(XP_WIN)
 // Both this and the master "enabled" pref must be on to use Advanced Layers
 // on Windows 7.
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.mlgpu.enable-on-windows7",
-  AdvancedLayersEnableOnWindows7,
+   layers_mlgpu_enable_on_windows7,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Once,
-  "layers.mlgpu.enable-container-resizing",
-  AdvancedLayersEnableContainerResizing,
-  bool, true
-)
-
-VARCACHE_PREF(
-  Once,
   "layers.offmainthreadcomposition.force-disabled",
-  LayersOffMainThreadCompositionForceDisabled,
+   layers_offmainthreadcomposition_force_disabled,
   bool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.offmainthreadcomposition.frame-rate",
-  LayersCompositionFrameRate,
+   layers_offmainthreadcomposition_frame_rate,
   RelaxedAtomicInt32, -1
 )
 
 VARCACHE_PREF(
   Once,
   "layers.omtp.capture-limit",
-  LayersOMTPCaptureLimit,
+   layers_omtp_capture_limit,
   uint32_t, 25 * 1024 * 1024
 )
 
 VARCACHE_PREF(
   Live,
   "layers.omtp.dump-capture",
-  LayersOMTPDumpCapture,
+   layers_omtp_dump_capture,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Once,
   "layers.omtp.paint-workers",
-  LayersOMTPPaintWorkers,
+   layers_omtp_paint_workers,
   int32_t, -1
 )
 
 VARCACHE_PREF(
   Live,
   "layers.omtp.release-capture-on-main-thread",
-  LayersOMTPReleaseCaptureOnMainThread,
+   layers_omtp_release_capture_on_main_thread,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.orientation.sync.timeout",
-  OrientationSyncMillis,
+   layers_orientation_sync_timeout,
   RelaxedAtomicUint32, (uint32_t)0
 )
 
 #ifdef XP_WIN
 VARCACHE_PREF(
   Once,
   "layers.prefer-opengl",
-  LayersPreferOpenGL,
+   layers_prefer_opengl,
   bool, false
 )
 #endif
 
 VARCACHE_PREF(
   Live,
   "layers.progressive-paint",
-  ProgressivePaint,
+   layers_progressive_paint,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.shared-buffer-provider.enabled",
-  PersistentBufferProviderSharedEnabled,
+   layers_shared_buffer_provider_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.single-tile.enabled",
-  LayersSingleTileEnabled,
+   layers_single_tile_enabled,
   RelaxedAtomicBool, true
 )
 
 // We allow for configurable and rectangular tile size to avoid wasting memory
 // on devices whose screen size does not align nicely to the default tile size.
 // Although layers can be any size, they are often the same size as the screen,
 // especially for width.
 VARCACHE_PREF(
   Once,
   "layers.tile-width",
-  LayersTileWidth,
+   layers_tile_width,
   int32_t, 512
 )
 
 VARCACHE_PREF(
   Once,
   "layers.tile-height",
-  LayersTileHeight,
+   layers_tile_height,
   int32_t, 512
 )
 
 VARCACHE_PREF(
   Once,
   "layers.tile-initial-pool-size",
-  LayersTileInitialPoolSize,
+   layers_tile_initial_pool_size,
   uint32_t, (uint32_t)50
 )
 
 VARCACHE_PREF(
   Once,
   "layers.tile-pool-unused-size",
-  LayersTilePoolUnusedSize,
+   layers_tile_pool_unused_size,
   uint32_t, (uint32_t)10
 )
 
 VARCACHE_PREF(
   Once,
   "layers.tile-pool-shrink-timeout",
-  LayersTilePoolShrinkTimeout,
+   layers_tile_pool_shrink_timeout,
   uint32_t, (uint32_t)50
 )
 
 VARCACHE_PREF(
   Once,
   "layers.tile-pool-clear-timeout",
-  LayersTilePoolClearTimeout,
+   layers_tile_pool_clear_timeout,
   uint32_t, (uint32_t)5000
 )
 
 // If this is set the tile size will only be treated as a suggestion.
 // On B2G we will round this to the stride of the underlying allocation.
 // On any platform we may later use the screen size and ignore
 // tile-width/tile-height entirely. Its recommended to turn this off
 // if you change the tile size.
 VARCACHE_PREF(
   Once,
   "layers.tiles.adjust",
-  LayersTilesAdjust,
+   layers_tiles_adjust,
   bool, true
 )
 
 #ifdef MOZ_WIDGET_ANDROID
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "layers.tiles.edge-padding",
-  TileEdgePaddingEnabled,
+   layers_tiles_edge_padding,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Live,
   "layers.tiles.fade-in.enabled",
-  LayerTileFadeInEnabled,
+   layers_tiles_fade_in_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "layers.tiles.fade-in.duration-ms",
-  LayerTileFadeInDuration,
+   layers_tiles_fade_in_duration_ms,
   RelaxedAtomicUint32, 250
 )
 
 VARCACHE_PREF(
   Live,
   "layers.tiles.retain-back-buffer",
-  LayersTileRetainBackBuffer,
+   layers_tiles_retain_back_buffer,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "layers.transaction.warning-ms",
-  LayerTransactionWarning,
+   layers_transaction_warning_ms,
   RelaxedAtomicUint32, 200
 )
 
 VARCACHE_PREF(
   Once,
   "layers.uniformity-info",
-  UniformityInfo,
+   layers_uniformity_info,
   bool, false
 )
 
 VARCACHE_PREF(
   Once,
   "layers.use-image-offscreen-surfaces",
-  UseImageOffscreenSurfaces,
+   layers_use_image_offscreen_surfaces,
   bool, true
 )
 
 //---------------------------------------------------------------------------
 // Prefs starting with "layout."
 //---------------------------------------------------------------------------
 
 // Debug-only pref to force enable the AccessibleCaret. If you want to
--- a/widget/windows/WinCompositorWidget.cpp
+++ b/widget/windows/WinCompositorWidget.cpp
@@ -32,19 +32,19 @@ WinCompositorWidget::WinCompositorWidget
       mTransparencyMode(aInitData.transparencyMode()),
       mMemoryDC(nullptr),
       mCompositeDC(nullptr),
       mLockedBackBufferData(nullptr) {
   MOZ_ASSERT(mWnd && ::IsWindow(mWnd));
 
   // mNotDeferEndRemoteDrawing is set on the main thread during init,
   // but is only accessed after on the compositor thread.
-  mNotDeferEndRemoteDrawing = StaticPrefs::LayersCompositionFrameRate() == 0 ||
-                              gfxPlatform::IsInLayoutAsapMode() ||
-                              gfxPlatform::ForceSoftwareVsync();
+  mNotDeferEndRemoteDrawing =
+      StaticPrefs::layers_offmainthreadcomposition_frame_rate() == 0 ||
+      gfxPlatform::IsInLayoutAsapMode() || gfxPlatform::ForceSoftwareVsync();
 }
 
 WinCompositorWidget::~WinCompositorWidget() { DestroyCompositorWindow(); }
 
 void WinCompositorWidget::OnDestroyWindow() {
   MutexAutoLock lock(mTransparentSurfaceLock);
   mTransparentSurface = nullptr;
   mMemoryDC = nullptr;