Skip to content

Commit

Permalink
Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
Browse files Browse the repository at this point in the history
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468
  • Loading branch information
Jean-Yves Avenard committed May 22, 2019
1 parent 609bc11 commit cdcbcc8
Show file tree
Hide file tree
Showing 113 changed files with 51 additions and 902 deletions.
4 changes: 2 additions & 2 deletions devtools/server/actors/highlighters/utils/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const { getComputedStyle } = require("./markup");
//
// This canvas size value is the safest we can use because most GPUs can handle it.
// It's also far from the maximum canvas memory allocation limit (4096x4096x4 is
// 67.108.864 bytes, where the limit is 500.000.000 bytes, see:
// http://searchfox.org/mozilla-central/source/gfx/thebes/gfxPrefs.h#401).
// 67.108.864 bytes, where the limit is 500.000.000 bytes, see MaxAllocSizeDoNotUseDirectly in:
// https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.h).
//
// Note:
// Once bug 1232491 lands, we could try to refactor this code to use the values from
Expand Down
1 change: 0 additions & 1 deletion dom/base/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@
#include "nsWindowSizes.h"
#include "mozilla/dom/Location.h"
#include "mozilla/dom/FontFaceSet.h"
#include "gfxPrefs.h"
#include "nsISupportsPrimitives.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleSheet.h"
Expand Down
1 change: 0 additions & 1 deletion dom/base/TextInputProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "gfxPrefs.h"
#include "mozilla/dom/Event.h"
#include "mozilla/EventForwards.h"
#include "mozilla/Maybe.h"
Expand Down
2 changes: 0 additions & 2 deletions dom/base/nsImageLoadingContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include "nsIContentPolicy.h"
#include "SVGObserverUtils.h"

#include "gfxPrefs.h"

#include "mozAutoDocUpdate.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/AutoRestore.h"
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGL2ContextQueries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "WebGL2Context.h"
#include "GLContext.h"
#include "WebGLQuery.h"
#include "gfxPrefs.h"
#include "nsThreadUtils.h"

namespace mozilla {
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGLContextExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "WebGLContext.h"
#include "WebGLContextUtils.h"
#include "WebGLExtensions.h"
#include "gfxPrefs.h"
#include "GLContext.h"

#include "nsString.h"
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "WebGLExtensions.h"

#include "gfxPrefs.h"
#include "GLContext.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGLFormats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "WebGLFormats.h"

#include "gfxPrefs.h"
#include "GLContext.h"
#include "GLDefs.h"
#include "mozilla/gfx/Logging.h"
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGLQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "WebGLQuery.h"

#include "gfxPrefs.h"
#include "GLContext.h"
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
#include "nsContentUtils.h"
Expand Down
1 change: 0 additions & 1 deletion dom/html/HTMLCanvasElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "mozilla/dom/HTMLCanvasElement.h"

#include "gfxPrefs.h"
#include "ImageEncoder.h"
#include "jsapi.h"
#include "jsfriendapi.h"
Expand Down
1 change: 0 additions & 1 deletion dom/ipc/BrowserChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "BrowserChild.h"

#include "gfxPrefs.h"
#ifdef ACCESSIBILITY
# include "mozilla/a11y/DocAccessibleChild.h"
#endif
Expand Down
1 change: 0 additions & 1 deletion dom/ipc/BrowserParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
#include "nsIAuthPromptCallback.h"
#include "nsAuthInformationHolder.h"
#include "nsICancelable.h"
#include "gfxPrefs.h"
#include "gfxUtils.h"
#include "nsILoginManagerPrompter.h"
#include "nsPIWindowRoot.h"
Expand Down
1 change: 0 additions & 1 deletion dom/ipc/ContentParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
#include "mozilla/net/NeckoMessageUtils.h"
#include "gfxPlatform.h"
#include "gfxPlatformFontList.h"
#include "gfxPrefs.h"
#include "prio.h"
#include "private/pprio.h"
#include "ContentProcessManager.h"
Expand Down
1 change: 0 additions & 1 deletion dom/media/AudioStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mozilla/Telemetry.h"
#include "CubebUtils.h"
#include "nsPrintfCString.h"
#include "gfxPrefs.h"
#include "AudioConverter.h"
#if defined(XP_WIN)
# include "nsXULAppAPI.h"
Expand Down
2 changes: 0 additions & 2 deletions dom/media/Benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "PDMFactory.h"
#include "VideoUtils.h"
#include "WebMDemuxer.h"
#include "gfxPrefs.h"
#include "mozilla/AbstractThread.h"
#include "mozilla/Preferences.h"
#include "mozilla/SharedThreadPool.h"
Expand Down Expand Up @@ -168,7 +167,6 @@ void Benchmark::Dispose() {
void Benchmark::Init() {
MOZ_ASSERT(NS_IsMainThread());
gfxVars::Initialize();
gfxPrefs::GetSingleton();
}

BenchmarkPlayback::BenchmarkPlayback(Benchmark* aGlobalState,
Expand Down
1 change: 0 additions & 1 deletion dom/media/systemservices/MediaSystemResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "mozilla/TaskQueue.h"

#include "gfxPrefs.h"
#include "MediaSystemResourceManagerChild.h"
#include "mozilla/layers/ImageBridgeChild.h"

Expand Down
1 change: 0 additions & 1 deletion dom/plugins/ipc/PluginInstanceParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "ImageContainer.h"
#include "GLContext.h"
#include "GLContextProvider.h"
#include "gfxPrefs.h"
#include "LayersLogging.h"
#include "mozilla/layers/TextureWrapperImage.h"
#include "mozilla/layers/TextureClientRecycleAllocator.h"
Expand Down
2 changes: 1 addition & 1 deletion gfx/config/gfxConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FeatureFailure;

// Manages the history and state of a graphics feature. The flow of a feature
// is:
// - A default value, set by all.js, gfxPrefs, or gfxPlatform.
// - A default value, set by all.js, or gfxPlatform.
// - A user value, set by an external value or user pref.
// - An environment value, determined by system/hardware factors or
// nsIGfxInfo.
Expand Down
2 changes: 1 addition & 1 deletion gfx/config/gfxVars.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class gfxVarReceiver;

// Some graphics settings are computed on the UI process and must be
// communicated to content and GPU processes. gfxVars helps facilitate
// this. Its function is similar to gfxPrefs, except rather than hold
// this. Its function is similar to StaticPrefs, except rather than hold
// user preferences, it holds dynamically computed values.
//
// Each variable in GFX_VARS_LIST exposes the following static methods:
Expand Down
1 change: 0 additions & 1 deletion gfx/gl/GLContextProviderEAGL.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "GLContextEAGL.h"
#include "nsDebug.h"
#include "nsIWidget.h"
#include "gfxPrefs.h"
#include "gfxFailure.h"
#include "prenv.h"
#include "mozilla/Preferences.h"
Expand Down
1 change: 0 additions & 1 deletion gfx/gl/GLContextProviderWGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "nsDebug.h"
#include "nsIWidget.h"
#include "gfxPlatform.h"
#include "gfxPrefs.h"
#include "gfxWindowsSurface.h"

#include "gfxCrashReporterUtils.h"
Expand Down
2 changes: 0 additions & 2 deletions gfx/gl/GLLibraryEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "prsystem.h"
#include "GLContext.h"
#include "GLContextProvider.h"
#include "gfxPrefs.h"
#include "ScopedGLHelpers.h"
#ifdef MOZ_WIDGET_GTK
# include <gdk/gdk.h>
Expand Down Expand Up @@ -86,7 +85,6 @@ PRLibrary* LoadApitraceLibrary() {
if (!path) return nullptr;

// Initialization of gfx prefs here is only needed during the unit tests...
gfxPrefs::GetSingleton();
if (!StaticPrefs::UseApitrace()) {
return nullptr;
}
Expand Down
1 change: 0 additions & 1 deletion gfx/gl/SharedSurfaceD3D11Interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <d3d11.h>
#include <d3d11_1.h>
#include "gfxPrefs.h"
#include "GLContext.h"
#include "WGLLibrary.h"
#include "nsPrintfCString.h"
Expand Down
4 changes: 0 additions & 4 deletions gfx/ipc/GPUParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "gfxConfig.h"
#include "gfxCrashReporterUtils.h"
#include "gfxPlatform.h"
#include "gfxPrefs.h"
#include "GLContextProvider.h"
#include "GPUProcessHost.h"
#include "GPUProcessManager.h"
Expand Down Expand Up @@ -110,8 +109,6 @@ bool GPUParent::Init(base::ProcessId aParentPid, const char* aParentBuildID,
// Init crash reporter support.
CrashReporterClient::InitSingleton(this);

// Ensure gfxPrefs are initialized.
gfxPrefs::GetSingleton();
gfxConfig::Init();
gfxVars::Initialize();
gfxPlatform::InitNullMetadata();
Expand Down Expand Up @@ -552,7 +549,6 @@ void GPUParent::ActorDestroy(ActorDestroyReason aWhy) {
LayerTreeOwnerTracker::Shutdown();
gfxVars::Shutdown();
gfxConfig::Shutdown();
gfxPrefs::DestroySingleton();
CrashReporterClient::DestroySingleton();
XRE_ShutdownChildProcess();
}
Expand Down
13 changes: 0 additions & 13 deletions gfx/ipc/GraphicsMessages.ipdlh
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@ using mozilla::gfx::D3D11Checks::VideoFormatOptionSet from "mozilla/gfx/D3D11Che
namespace mozilla {
namespace gfx {

union GfxPrefValue {
bool;
int32_t;
uint32_t;
float;
nsCString;
};

struct GfxPrefSetting {
int32_t index;
GfxPrefValue value;
};

struct D3D11DeviceStatus
{
bool isWARP;
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/FrameMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "FrameMetrics.h"
#include "gfxPrefs.h"

#include "nsStyleConsts.h"
#include "nsStyleStruct.h"
#include "mozilla/WritingModes.h"
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/FrameMetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ struct ScrollMetadata {
mIsAutoDirRootContentRTL = aValue;
}
bool IsAutoDirRootContentRTL() const { return mIsAutoDirRootContentRTL; }
// Implemented out of line because the implementation needs gfxPrefs.h
// Implemented out of line because the implementation needs StaticPrefs.h
// and we don't want to include that from FrameMetrics.h.
void SetUsesContainerScrolling(bool aValue);
bool UsesContainerScrolling() const { return mUsesContainerScrolling; }
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/LayerScope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "gfxContext.h"
#include "gfxUtils.h"
#include "gfxPrefs.h"

#include "nsIWidget.h"

#include "GLContext.h"
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/APZInputBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "mozilla/layers/APZInputBridge.h"

#include "gfxPrefs.h" // for gfxPrefs
#include "InputData.h" // for MouseInput, etc
#include "mozilla/dom/WheelEventBinding.h" // for WheelEvent constants
#include "mozilla/EventStateManager.h" // for EventStateManager
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/AndroidAPZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "AsyncPanZoomController.h"
#include "GeneratedJNIWrappers.h"
#include "GenericFlingAnimation.h"
#include "gfxPrefs.h"
#include "OverscrollHandoffState.h"
#include "SimpleVelocityTracker.h"
#include "ViewConfiguration.h"
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/AndroidFlingPhysics.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "AsyncPanZoomController.h"
#include "Units.h"
#include "gfxPrefs.h"
#include "mozilla/Assertions.h"

namespace mozilla {
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/Axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "nsPrintfCString.h" // for nsPrintfCString
#include "nsThreadUtils.h" // for NS_DispatchToMainThread, etc
#include "nscore.h" // for NS_IMETHOD
#include "gfxPrefs.h" // for the preferences

#define AXIS_LOG(...)
// #define AXIS_LOG(...) printf_stderr("AXIS: " __VA_ARGS__)
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/DesktopFlingPhysics.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "AsyncPanZoomController.h"
#include "Units.h"
#include "gfxPrefs.h"
#include "mozilla/Assertions.h"

#define FLING_PHYS_LOG(...)
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/GenericFlingAnimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "LayersLogging.h"
#include "Units.h"
#include "OverscrollHandoffState.h"
#include "gfxPrefs.h"
#include "mozilla/Assertions.h"
#include "mozilla/Monitor.h"
#include "mozilla/RefPtr.h"
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/GenericScrollAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "AsyncPanZoomController.h"
#include "FrameMetrics.h"
#include "gfxPrefs.h"
#include "nsPoint.h"
#include "ScrollAnimationPhysics.h"
#include "ScrollAnimationBezierPhysics.h"
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/GestureEventListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "InputBlockState.h" // for TouchBlockState
#include "base/task.h" // for CancelableTask, etc
#include "gfxPrefs.h" // for gfxPrefs
#include "InputBlockState.h" // for TouchBlockState
#include "mozilla/StaticPrefs.h" // for StaticPrefs
#include "nsDebug.h" // for NS_WARNING
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/src/HitTestingTreeNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "HitTestingTreeNode.h"

#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "gfxPrefs.h"
#include "LayersLogging.h" // for Stringify
#include "mozilla/gfx/Point.h" // for Point4D
#include "mozilla/layers/APZUtils.h" // for CompleteAsyncTransform
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/apz/src/InputBlockState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "APZUtils.h"
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "ScrollAnimationPhysics.h" // for kScrollSeriesTimeoutMs
#include "gfxPrefs.h" // for gfxPrefs

#include "mozilla/MouseEvents.h"
#include "mozilla/Telemetry.h" // for Telemetry
#include "mozilla/layers/IAPZCTreeManager.h" // for AllowedTouchBehavior
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/apz/src/InputQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "InputQueue.h"

#include "AsyncPanZoomController.h"
#include "gfxPrefs.h"

#include "InputBlockState.h"
#include "LayersLogging.h"
#include "mozilla/layers/APZThreadUtils.h"
Expand Down
2 changes: 0 additions & 2 deletions gfx/layers/apz/src/KeyboardScrollAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include "KeyboardScrollAnimation.h"
#include "ScrollAnimationBezierPhysics.h"

#include "gfxPrefs.h"

namespace mozilla {
namespace layers {

Expand Down
3 changes: 1 addition & 2 deletions gfx/layers/apz/test/gtest/APZCBasicTester.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

#include "APZTestCommon.h"
#include "gfxPrefs.h"

#include "mozilla/layers/APZSampler.h"
#include "mozilla/layers/APZUpdater.h"

Expand All @@ -25,7 +25,6 @@ class APZCBasicTester : public APZCTesterBase {

protected:
virtual void SetUp() {
gfxPrefs::GetSingleton();
APZThreadUtils::SetThreadAssertionsEnabled(false);
APZThreadUtils::SetControllerThread(MessageLoop::current());

Expand Down
Loading

0 comments on commit cdcbcc8

Please sign in to comment.