Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/gfx/gfxVars.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
#ifndef mozilla_gfx_config_gfxVars_h
7
#define mozilla_gfx_config_gfxVars_h
8
9
#include <stdint.h>
10
#include "mozilla/Assertions.h"
11
#include "mozilla/StaticPtr.h"
12
#include "mozilla/gfx/GraphicsMessages.h"
13
#include "mozilla/gfx/Point.h"
14
#include "mozilla/gfx/Types.h"
15
#include "nsTArray.h"
16
#include "nsXULAppAPI.h"
17
18
namespace mozilla {
19
namespace gfx {
20
21
class gfxVarReceiver;
22
23
// Generator for graphics vars.
24
#define GFX_VARS_LIST(_)                                                \
25
  /* C++ Name,                  Data Type,        Default Value */      \
26
  _(BrowserTabsRemoteAutostart, bool,             false)                \
27
  _(ContentBackend,             BackendType,      BackendType::NONE)    \
28
  _(SoftwareBackend,            BackendType,      BackendType::NONE)    \
29
  _(TileSize,                   IntSize,          IntSize(-1, -1))      \
30
  _(UseXRender,                 bool,             false)                \
31
  _(OffscreenFormat,            gfxImageFormat,   mozilla::gfx::SurfaceFormat::X8R8G8B8_UINT32) \
32
  _(RequiresAcceleratedGLContextForCompositorOGL, bool, false)          \
33
  _(CanUseHardwareVideoDecoding, bool,            false)                \
34
  _(PDMWMFDisableD3D11Dlls,     nsCString,        nsCString())          \
35
  _(PDMWMFDisableD3D9Dlls,      nsCString,        nsCString())          \
36
  _(DXInterop2Blocked,          bool,             false)                \
37
  _(DXNV12Blocked,              bool,             false)                \
38
  _(UseWebRender,               bool,             false)                \
39
  _(UseWebRenderANGLE,          bool,             false)                \
40
  _(UseWebRenderDCompWin,       bool,             false)                \
41
  _(UseWebRenderProgramBinary,  bool,             false)                \
42
  _(UseWebRenderProgramBinaryDisk, bool,          false)                \
43
  _(WebRenderDebugFlags,        int32_t,          0)                    \
44
  _(ScreenDepth,                int32_t,          0)                    \
45
  _(GREDirectory,               nsString,         nsString())           \
46
  _(ProfDirectory,              nsString,         nsString())           \
47
  _(UseOMTP,                    bool,             false)                \
48
  _(AllowD3D11KeyedMutex,       bool,             false)                \
49
  _(SystemTextQuality,          int32_t,          5 /* CLEARTYPE_QUALITY */) \
50
51
  /* Add new entries above this line. */
52
53
// Some graphics settings are computed on the UI process and must be
54
// communicated to content and GPU processes. gfxVars helps facilitate
55
// this. Its function is similar to gfxPrefs, except rather than hold
56
// user preferences, it holds dynamically computed values.
57
//
58
// Each variable in GFX_VARS_LIST exposes the following static methods:
59
//
60
//    const DataType& CxxName();
61
//    void SetCxxName(const DataType& aValue);
62
//
63
// Note that the setter may only be called in the UI process; a gfxVar must be
64
// a variable that is determined in the UI process and pushed to child
65
// processes.
66
class gfxVars final
67
{
68
public:
69
  // These values will be used during the Initialize() call if set.  Any
70
  // updates that come before initialization will get added to this array.
71
  static void SetValuesForInitialize(const nsTArray<GfxVarUpdate>& aInitUpdates);
72
73
  static void Initialize();
74
  static void Shutdown();
75
76
  static void ApplyUpdate(const GfxVarUpdate& aUpdate);
77
  static void AddReceiver(gfxVarReceiver* aReceiver);
78
  static void RemoveReceiver(gfxVarReceiver* aReceiver);
79
80
  // Return a list of updates for all variables with non-default values.
81
  static nsTArray<GfxVarUpdate> FetchNonDefaultVars();
82
83
public:
84
  // Each variable must expose Set and Get methods for IPDL.
85
  class VarBase
86
  {
87
  public:
88
    VarBase();
89
    virtual void SetValue(const GfxVarValue& aValue) = 0;
90
    virtual void GetValue(GfxVarValue* aOutValue) = 0;
91
    virtual bool HasDefaultValue() const = 0;
92
    size_t Index() const {
93
      return mIndex;
94
    }
95
  private:
96
    size_t mIndex;
97
  };
98
99
private:
100
  static StaticAutoPtr<gfxVars> sInstance;
101
  static StaticAutoPtr<nsTArray<VarBase*>> sVarList;
102
103
  template <typename T, T Default()>
104
  class VarImpl final : public VarBase
105
  {
106
  public:
107
    VarImpl()
108
     : mValue(Default())
109
    {}
110
    void SetValue(const GfxVarValue& aValue) override {
111
      aValue.get(&mValue);
112
      if (mListener) {
113
        mListener();
114
      }
115
    }
116
    void GetValue(GfxVarValue* aOutValue) override {
117
      *aOutValue = GfxVarValue(mValue);
118
    }
119
    bool HasDefaultValue() const override {
120
      return mValue == Default();
121
    }
122
0
    const T& Get() const {
123
0
      return mValue;
124
0
    }
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetBrowserTabsRemoteAutostartDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::BackendType, &mozilla::gfx::gfxVars::GetContentBackendDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::BackendType, &mozilla::gfx::gfxVars::GetSoftwareBackendDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, &mozilla::gfx::gfxVars::GetTileSizeDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseXRenderDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::SurfaceFormat, &mozilla::gfx::gfxVars::GetOffscreenFormatDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetRequiresAcceleratedGLContextForCompositorOGLDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetCanUseHardwareVideoDecodingDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char>, &mozilla::gfx::gfxVars::GetPDMWMFDisableD3D11DllsDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char>, &mozilla::gfx::gfxVars::GetPDMWMFDisableD3D9DllsDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetDXInterop2BlockedDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetDXNV12BlockedDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderANGLEDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderDCompWinDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDiskDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetWebRenderDebugFlagsDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetScreenDepthDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char16_t>, &mozilla::gfx::gfxVars::GetGREDirectoryDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char16_t>, &mozilla::gfx::gfxVars::GetProfDirectoryDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseOMTPDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetAllowD3D11KeyedMutexDefault>::Get() const
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetSystemTextQualityDefault>::Get() const
125
    // Return true if the value changed, false otherwise.
126
0
    bool Set(const T& aValue) {
127
0
      MOZ_ASSERT(XRE_IsParentProcess());
128
0
      if (mValue == aValue) {
129
0
        return false;
130
0
      }
131
0
      mValue = aValue;
132
0
      if (mListener) {
133
0
        mListener();
134
0
      }
135
0
      return true;
136
0
    }
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetBrowserTabsRemoteAutostartDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::BackendType, &mozilla::gfx::gfxVars::GetContentBackendDefault>::Set(mozilla::gfx::BackendType const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::BackendType, &mozilla::gfx::gfxVars::GetSoftwareBackendDefault>::Set(mozilla::gfx::BackendType const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, &mozilla::gfx::gfxVars::GetTileSizeDefault>::Set(mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseXRenderDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::SurfaceFormat, &mozilla::gfx::gfxVars::GetOffscreenFormatDefault>::Set(mozilla::gfx::SurfaceFormat const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetRequiresAcceleratedGLContextForCompositorOGLDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetCanUseHardwareVideoDecodingDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char>, &mozilla::gfx::gfxVars::GetPDMWMFDisableD3D11DllsDefault>::Set(nsTString<char> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char>, &mozilla::gfx::gfxVars::GetPDMWMFDisableD3D9DllsDefault>::Set(nsTString<char> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetDXInterop2BlockedDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetDXNV12BlockedDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderANGLEDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderDCompWinDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDiskDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetWebRenderDebugFlagsDefault>::Set(int const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetScreenDepthDefault>::Set(int const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char16_t>, &mozilla::gfx::gfxVars::GetGREDirectoryDefault>::Set(nsTString<char16_t> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char16_t>, &mozilla::gfx::gfxVars::GetProfDirectoryDefault>::Set(nsTString<char16_t> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseOMTPDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetAllowD3D11KeyedMutexDefault>::Set(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetSystemTextQualityDefault>::Set(int const&)
137
138
    void SetListener(const std::function<void()>& aListener)
139
0
    {
140
0
      mListener = aListener;
141
0
    }
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetBrowserTabsRemoteAutostartDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::BackendType, &mozilla::gfx::gfxVars::GetContentBackendDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::BackendType, &mozilla::gfx::gfxVars::GetSoftwareBackendDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>, &mozilla::gfx::gfxVars::GetTileSizeDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseXRenderDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<mozilla::gfx::SurfaceFormat, &mozilla::gfx::gfxVars::GetOffscreenFormatDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetRequiresAcceleratedGLContextForCompositorOGLDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetCanUseHardwareVideoDecodingDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char>, &mozilla::gfx::gfxVars::GetPDMWMFDisableD3D11DllsDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char>, &mozilla::gfx::gfxVars::GetPDMWMFDisableD3D9DllsDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetDXInterop2BlockedDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetDXNV12BlockedDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderANGLEDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderDCompWinDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDiskDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetWebRenderDebugFlagsDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetScreenDepthDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char16_t>, &mozilla::gfx::gfxVars::GetGREDirectoryDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<nsTString<char16_t>, &mozilla::gfx::gfxVars::GetProfDirectoryDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetUseOMTPDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<bool, &mozilla::gfx::gfxVars::GetAllowD3D11KeyedMutexDefault>::SetListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::VarImpl<int, &mozilla::gfx::gfxVars::GetSystemTextQualityDefault>::SetListener(std::__1::function<void ()> const&)
142
  private:
143
    T mValue;
144
    std::function<void()> mListener;
145
  };
146
147
#define GFX_VAR_DECL(CxxName, DataType, DefaultValue)           \
148
private:                                                        \
149
  static DataType Get##CxxName##Default() {                     \
150
    return DefaultValue;                                        \
151
  }                                                             \
152
  VarImpl<DataType, Get##CxxName##Default> mVar##CxxName;       \
153
public:                                                         \
154
0
  static const DataType& CxxName() {                            \
155
0
    return sInstance->mVar##CxxName.Get();                      \
156
0
  }                                                             \
Unexecuted instantiation: mozilla::gfx::gfxVars::BrowserTabsRemoteAutostart()
Unexecuted instantiation: mozilla::gfx::gfxVars::ContentBackend()
Unexecuted instantiation: mozilla::gfx::gfxVars::SoftwareBackend()
Unexecuted instantiation: mozilla::gfx::gfxVars::TileSize()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseXRender()
Unexecuted instantiation: mozilla::gfx::gfxVars::OffscreenFormat()
Unexecuted instantiation: mozilla::gfx::gfxVars::RequiresAcceleratedGLContextForCompositorOGL()
Unexecuted instantiation: mozilla::gfx::gfxVars::CanUseHardwareVideoDecoding()
Unexecuted instantiation: mozilla::gfx::gfxVars::PDMWMFDisableD3D11Dlls()
Unexecuted instantiation: mozilla::gfx::gfxVars::PDMWMFDisableD3D9Dlls()
Unexecuted instantiation: mozilla::gfx::gfxVars::DXInterop2Blocked()
Unexecuted instantiation: mozilla::gfx::gfxVars::DXNV12Blocked()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseWebRender()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseWebRenderANGLE()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseWebRenderDCompWin()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseWebRenderProgramBinary()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseWebRenderProgramBinaryDisk()
Unexecuted instantiation: mozilla::gfx::gfxVars::WebRenderDebugFlags()
Unexecuted instantiation: mozilla::gfx::gfxVars::ScreenDepth()
Unexecuted instantiation: mozilla::gfx::gfxVars::GREDirectory()
Unexecuted instantiation: mozilla::gfx::gfxVars::ProfDirectory()
Unexecuted instantiation: mozilla::gfx::gfxVars::UseOMTP()
Unexecuted instantiation: mozilla::gfx::gfxVars::AllowD3D11KeyedMutex()
Unexecuted instantiation: mozilla::gfx::gfxVars::SystemTextQuality()
157
0
  static DataType Get##CxxName##OrDefault() {                   \
158
0
    if (!sInstance) {                                           \
159
0
      return DefaultValue;                                      \
160
0
    }                                                           \
161
0
    return sInstance->mVar##CxxName.Get();                      \
162
0
  }                                                             \
Unexecuted instantiation: mozilla::gfx::gfxVars::GetBrowserTabsRemoteAutostartOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetContentBackendOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetSoftwareBackendOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetTileSizeOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseXRenderOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetOffscreenFormatOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetRequiresAcceleratedGLContextForCompositorOGLOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetCanUseHardwareVideoDecodingOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetPDMWMFDisableD3D11DllsOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetPDMWMFDisableD3D9DllsOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetDXInterop2BlockedOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetDXNV12BlockedOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseWebRenderOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseWebRenderANGLEOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseWebRenderDCompWinOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseWebRenderProgramBinaryDiskOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetWebRenderDebugFlagsOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetScreenDepthOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetGREDirectoryOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetProfDirectoryOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetUseOMTPOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetAllowD3D11KeyedMutexOrDefault()
Unexecuted instantiation: mozilla::gfx::gfxVars::GetSystemTextQualityOrDefault()
163
0
  static void Set##CxxName(const DataType& aValue) {            \
164
0
    if (sInstance->mVar##CxxName.Set(aValue)) {                 \
165
0
      sInstance->NotifyReceivers(&sInstance->mVar##CxxName);    \
166
0
    }                                                           \
167
0
  }                                                             \
Unexecuted instantiation: mozilla::gfx::gfxVars::SetBrowserTabsRemoteAutostart(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetContentBackend(mozilla::gfx::BackendType const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetSoftwareBackend(mozilla::gfx::BackendType const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetTileSize(mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseXRender(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetOffscreenFormat(mozilla::gfx::SurfaceFormat const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetRequiresAcceleratedGLContextForCompositorOGL(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetCanUseHardwareVideoDecoding(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetPDMWMFDisableD3D11Dlls(nsTString<char> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetPDMWMFDisableD3D9Dlls(nsTString<char> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetDXInterop2Blocked(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetDXNV12Blocked(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRender(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderANGLE(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderDCompWin(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderProgramBinary(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderProgramBinaryDisk(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetWebRenderDebugFlags(int const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetScreenDepth(int const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetGREDirectory(nsTString<char16_t> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetProfDirectory(nsTString<char16_t> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseOMTP(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetAllowD3D11KeyedMutex(bool const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetSystemTextQuality(int const&)
168
                                                                \
169
  static void                                                   \
170
  Set##CxxName##Listener(const std::function<void()>& aListener)  \
171
0
  {                                                             \
172
0
    sInstance->mVar##CxxName.SetListener(aListener);            \
173
0
  }
Unexecuted instantiation: mozilla::gfx::gfxVars::SetBrowserTabsRemoteAutostartListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetContentBackendListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetSoftwareBackendListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetTileSizeListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseXRenderListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetOffscreenFormatListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetRequiresAcceleratedGLContextForCompositorOGLListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetCanUseHardwareVideoDecodingListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetPDMWMFDisableD3D11DllsListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetPDMWMFDisableD3D9DllsListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetDXInterop2BlockedListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetDXNV12BlockedListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderANGLEListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderDCompWinListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderProgramBinaryListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseWebRenderProgramBinaryDiskListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetWebRenderDebugFlagsListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetScreenDepthListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetGREDirectoryListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetProfDirectoryListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetUseOMTPListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetAllowD3D11KeyedMutexListener(std::__1::function<void ()> const&)
Unexecuted instantiation: mozilla::gfx::gfxVars::SetSystemTextQualityListener(std::__1::function<void ()> const&)
174
175
  GFX_VARS_LIST(GFX_VAR_DECL)
176
#undef GFX_VAR_DECL
177
178
private:
179
  gfxVars();
180
181
  void NotifyReceivers(VarBase* aVar);
182
183
private:
184
  nsTArray<gfxVarReceiver*> mReceivers;
185
};
186
187
#undef GFX_VARS_LIST
188
189
} // namespace gfx
190
} // namespace mozilla
191
192
#endif // mozilla_gfx_config_gfxVars_h