forked from mirrors/gecko-dev
Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true. Differential Revision: https://phabricator.services.mozilla.com/D160121
This commit is contained in:
parent
53608b802f
commit
9d245b8325
22 changed files with 49 additions and 204 deletions
|
|
@ -10,7 +10,6 @@
|
||||||
#include "ImageContainer.h"
|
#include "ImageContainer.h"
|
||||||
#include "mozilla/StaticPrefs_media.h"
|
#include "mozilla/StaticPrefs_media.h"
|
||||||
#include "mozilla/TaskQueue.h"
|
#include "mozilla/TaskQueue.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "VideoUtils.h"
|
#include "VideoUtils.h"
|
||||||
|
|
||||||
|
|
@ -210,13 +209,6 @@ int DAV1DDecoder::GetPicture(DecodedData& aData, MediaResult& aResult) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
|
||||||
if (!gfxVars::UseWebRender() && (*picture).p.bpc != 8) {
|
|
||||||
aResult = MediaResult(NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR, __func__);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RefPtr<VideoData> v = ConstructImage(*picture);
|
RefPtr<VideoData> v = ConstructImage(*picture);
|
||||||
if (!v) {
|
if (!v) {
|
||||||
LOG("Image allocation error: %ux%u"
|
LOG("Image allocation error: %ux%u"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ class gfxVarReceiver;
|
||||||
_(DXNV12Blocked, bool, false) \
|
_(DXNV12Blocked, bool, false) \
|
||||||
_(DXP010Blocked, bool, false) \
|
_(DXP010Blocked, bool, false) \
|
||||||
_(DXP016Blocked, bool, false) \
|
_(DXP016Blocked, bool, false) \
|
||||||
_(UseWebRender, bool, false) \
|
|
||||||
_(UseWebRenderANGLE, bool, false) \
|
_(UseWebRenderANGLE, bool, false) \
|
||||||
_(UseWebRenderFlipSequentialWin, bool, false) \
|
_(UseWebRenderFlipSequentialWin, bool, false) \
|
||||||
_(UseWebRenderDCompWin, bool, false) \
|
_(UseWebRenderDCompWin, bool, false) \
|
||||||
|
|
|
||||||
|
|
@ -273,9 +273,7 @@ mozilla::ipc::IPCResult GPUParent::RecvInit(
|
||||||
// processes this happens in gfxPlatform::InitWebRenderConfig.
|
// processes this happens in gfxPlatform::InitWebRenderConfig.
|
||||||
ScopedGfxFeatureReporter reporter("WR",
|
ScopedGfxFeatureReporter reporter("WR",
|
||||||
gfxPlatform::WebRenderPrefEnabled());
|
gfxPlatform::WebRenderPrefEnabled());
|
||||||
if (gfxVars::UseWebRender()) {
|
reporter.SetSuccessful();
|
||||||
reporter.SetSuccessful();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const LayerTreeIdMapping& map : aMappings) {
|
for (const LayerTreeIdMapping& map : aMappings) {
|
||||||
|
|
@ -299,14 +297,12 @@ mozilla::ipc::IPCResult GPUParent::RecvInit(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gfxVars::UseWebRender()) {
|
DeviceManagerDx::Get()->CreateDirectCompositionDevice();
|
||||||
DeviceManagerDx::Get()->CreateDirectCompositionDevice();
|
// Ensure to initialize GfxInfo
|
||||||
// Ensure to initialize GfxInfo
|
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
||||||
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
Unused << gfxInfo;
|
||||||
Unused << gfxInfo;
|
|
||||||
|
|
||||||
Factory::EnsureDWriteFactory();
|
Factory::EnsureDWriteFactory();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_GTK)
|
#if defined(MOZ_WIDGET_GTK)
|
||||||
|
|
@ -335,15 +331,13 @@ mozilla::ipc::IPCResult GPUParent::RecvInit(
|
||||||
// Ensure we have an FT library for font instantiation.
|
// Ensure we have an FT library for font instantiation.
|
||||||
// This would normally be set by gfxPlatform::Init().
|
// This would normally be set by gfxPlatform::Init().
|
||||||
// Since we bypass that, we must do it here instead.
|
// Since we bypass that, we must do it here instead.
|
||||||
if (gfxVars::UseWebRender()) {
|
FT_Library library = Factory::NewFTLibrary();
|
||||||
FT_Library library = Factory::NewFTLibrary();
|
MOZ_ASSERT(library);
|
||||||
MOZ_ASSERT(library);
|
Factory::SetFTLibrary(library);
|
||||||
Factory::SetFTLibrary(library);
|
|
||||||
|
|
||||||
// true to match gfxPlatform::FontHintingEnabled(). We must hardcode
|
// true to match gfxPlatform::FontHintingEnabled(). We must hardcode
|
||||||
// this value because we do not have a gfxPlatform instance.
|
// this value because we do not have a gfxPlatform instance.
|
||||||
SkInitCairoFT(true);
|
SkInitCairoFT(true);
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure that GfxInfo::Init is called on the main thread.
|
// Ensure that GfxInfo::Init is called on the main thread.
|
||||||
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
||||||
|
|
@ -371,22 +365,11 @@ mozilla::ipc::IPCResult GPUParent::RecvInit(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Make sure to do this *after* we update gfxVars above.
|
// Make sure to do this *after* we update gfxVars above.
|
||||||
if (gfxVars::UseWebRender()) {
|
if (gfxVars::UseCanvasRenderThread()) {
|
||||||
if (gfxVars::UseCanvasRenderThread()) {
|
gfx::CanvasRenderThread::Start();
|
||||||
gfx::CanvasRenderThread::Start();
|
|
||||||
}
|
|
||||||
wr::RenderThread::Start(aWrNamespace);
|
|
||||||
image::ImageMemoryReporter::InitForWebRender();
|
|
||||||
}
|
}
|
||||||
#ifdef XP_WIN
|
wr::RenderThread::Start(aWrNamespace);
|
||||||
else {
|
image::ImageMemoryReporter::InitForWebRender();
|
||||||
if (gfxVars::UseDoubleBufferingWithCompositor()) {
|
|
||||||
// This is needed to avoid freezing the window on a device crash on double
|
|
||||||
// buffering, see bug 1549674.
|
|
||||||
widget::WinCompositorWindowThread::Start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VRManager::ManagerInit();
|
VRManager::ManagerInit();
|
||||||
// Send a message to the UI process that we're done.
|
// Send a message to the UI process that we're done.
|
||||||
|
|
|
||||||
|
|
@ -586,10 +586,6 @@ bool GPUProcessManager::FallbackFromAcceleration(wr::WebRenderError aError,
|
||||||
|
|
||||||
bool GPUProcessManager::DisableWebRenderConfig(wr::WebRenderError aError,
|
bool GPUProcessManager::DisableWebRenderConfig(wr::WebRenderError aError,
|
||||||
const nsCString& aMsg) {
|
const nsCString& aMsg) {
|
||||||
if (!gfx::gfxVars::UseWebRender()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we have a stable compositor process, this may just be due to an OOM or
|
// If we have a stable compositor process, this may just be due to an OOM or
|
||||||
// bad driver state. In that case, we should consider restarting the GPU
|
// bad driver state. In that case, we should consider restarting the GPU
|
||||||
// process, or simulating a device reset to teardown the compositors to
|
// process, or simulating a device reset to teardown the compositors to
|
||||||
|
|
@ -658,13 +654,6 @@ void GPUProcessManager::NotifyWebRenderError(wr::WebRenderError aError) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPUProcessManager::OnDeviceReset(bool aTrackThreshold) {
|
bool GPUProcessManager::OnDeviceReset(bool aTrackThreshold) {
|
||||||
#ifdef XP_WIN
|
|
||||||
// Disable double buffering when device reset happens.
|
|
||||||
if (!gfxVars::UseWebRender() && gfxVars::UseDoubleBufferingWithCompositor()) {
|
|
||||||
gfxVars::SetUseDoubleBufferingWithCompositor(false);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Ignore resets for thresholding if requested.
|
// Ignore resets for thresholding if requested.
|
||||||
if (!aTrackThreshold) {
|
if (!aTrackThreshold) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -379,13 +379,7 @@ already_AddRefed<TextureClient> DXGIYCbCrTextureAllocationHelper::Allocate(
|
||||||
? DXGI_FORMAT_R8_UNORM
|
? DXGI_FORMAT_R8_UNORM
|
||||||
: DXGI_FORMAT_R16_UNORM,
|
: DXGI_FORMAT_R16_UNORM,
|
||||||
ySize.width, ySize.height, 1, 1);
|
ySize.width, ySize.height, 1, 1);
|
||||||
// WebRender requests keyed mutex
|
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
|
||||||
if (mDevice == gfx::DeviceManagerDx::Get()->GetCompositorDevice() &&
|
|
||||||
!gfxVars::UseWebRender()) {
|
|
||||||
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
|
|
||||||
} else {
|
|
||||||
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<ID3D10Multithread> mt;
|
RefPtr<ID3D10Multithread> mt;
|
||||||
HRESULT hr = mDevice->QueryInterface((ID3D10Multithread**)getter_AddRefs(mt));
|
HRESULT hr = mDevice->QueryInterface((ID3D10Multithread**)getter_AddRefs(mt));
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ const char* GetLayersBackendName(LayersBackend aBackend) {
|
||||||
case LayersBackend::LAYERS_NONE:
|
case LayersBackend::LAYERS_NONE:
|
||||||
return "none";
|
return "none";
|
||||||
case LayersBackend::LAYERS_WR:
|
case LayersBackend::LAYERS_WR:
|
||||||
MOZ_ASSERT(gfx::gfxVars::UseWebRender());
|
|
||||||
if (gfx::gfxVars::UseSoftwareWebRender()) {
|
if (gfx::gfxVars::UseSoftwareWebRender()) {
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
if (gfx::gfxVars::AllowSoftwareWebRenderD3D11() &&
|
if (gfx::gfxVars::AllowSoftwareWebRenderD3D11() &&
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
#include "gmock/gmock.h"
|
#include "gmock/gmock.h"
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "mozilla/layers/GeckoContentController.h"
|
#include "mozilla/layers/GeckoContentController.h"
|
||||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||||
#include "mozilla/layers/APZThreadUtils.h"
|
#include "mozilla/layers/APZThreadUtils.h"
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,6 @@ class APZCOverscrollTester : public APZCBasicTester {
|
||||||
|
|
||||||
ScrollableLayerGuid CreateSimpleRootScrollableForWebRender() {
|
ScrollableLayerGuid CreateSimpleRootScrollableForWebRender() {
|
||||||
ScrollableLayerGuid guid;
|
ScrollableLayerGuid guid;
|
||||||
if (!gfx::gfxVars::UseWebRender()) {
|
|
||||||
return guid;
|
|
||||||
}
|
|
||||||
|
|
||||||
guid.mScrollId = ScrollableLayerGuid::START_SCROLL_ID;
|
guid.mScrollId = ScrollableLayerGuid::START_SCROLL_ID;
|
||||||
guid.mLayersId = LayersId{0};
|
guid.mLayersId = LayersId{0};
|
||||||
|
|
||||||
|
|
@ -1349,11 +1345,6 @@ TEST_F(
|
||||||
|
|
||||||
#ifndef MOZ_WIDGET_ANDROID // Currently fails on Android
|
#ifndef MOZ_WIDGET_ANDROID // Currently fails on Android
|
||||||
TEST_F(APZCOverscrollTester, OverscrollByPanGesturesInterruptedByReflowZoom) {
|
TEST_F(APZCOverscrollTester, OverscrollByPanGesturesInterruptedByReflowZoom) {
|
||||||
if (!gfx::gfxVars::UseWebRender()) {
|
|
||||||
// This test is only available with WebRender.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SCOPED_GFX_PREF_BOOL("apz.overscroll.enabled", true);
|
SCOPED_GFX_PREF_BOOL("apz.overscroll.enabled", true);
|
||||||
SCOPED_GFX_PREF_INT("mousewheel.with_control.action", 3); // reflow zoom.
|
SCOPED_GFX_PREF_INT("mousewheel.with_control.action", 3); // reflow zoom.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include "TextureRecorded.h"
|
#include "TextureRecorded.h"
|
||||||
|
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "RecordedCanvasEventImpl.h"
|
#include "RecordedCanvasEventImpl.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
@ -114,13 +113,9 @@ void RecordedTextureData::OnForwardedToHost() {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureFlags RecordedTextureData::GetTextureFlags() const {
|
TextureFlags RecordedTextureData::GetTextureFlags() const {
|
||||||
TextureFlags flags = TextureFlags::NO_FLAGS;
|
|
||||||
// With WebRender, resource open happens asynchronously on RenderThread.
|
// With WebRender, resource open happens asynchronously on RenderThread.
|
||||||
// Use WAIT_HOST_USAGE_END to keep TextureClient alive during host side usage.
|
// Use WAIT_HOST_USAGE_END to keep TextureClient alive during host side usage.
|
||||||
if (gfx::gfxVars::UseWebRender()) {
|
return TextureFlags::WAIT_HOST_USAGE_END;
|
||||||
flags |= TextureFlags::WAIT_HOST_USAGE_END;
|
|
||||||
}
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|
|
||||||
|
|
@ -605,14 +605,10 @@ void D3D11TextureData::GetDXGIResource(IDXGIResource** aOutResource) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureFlags D3D11TextureData::GetTextureFlags() const {
|
TextureFlags D3D11TextureData::GetTextureFlags() const {
|
||||||
TextureFlags flags = TextureFlags::NO_FLAGS;
|
|
||||||
// With WebRender, resource open happens asynchronously on RenderThread.
|
// With WebRender, resource open happens asynchronously on RenderThread.
|
||||||
// During opening the resource on host side, TextureClient needs to be alive.
|
// During opening the resource on host side, TextureClient needs to be alive.
|
||||||
// With WAIT_HOST_USAGE_END, keep TextureClient alive during host side usage.
|
// With WAIT_HOST_USAGE_END, keep TextureClient alive during host side usage.
|
||||||
if (gfx::gfxVars::UseWebRender()) {
|
return TextureFlags::WAIT_HOST_USAGE_END;
|
||||||
flags |= TextureFlags::WAIT_HOST_USAGE_END;
|
|
||||||
}
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DXGIYCbCrTextureData* DXGIYCbCrTextureData::Create(
|
DXGIYCbCrTextureData* DXGIYCbCrTextureData::Create(
|
||||||
|
|
@ -746,14 +742,10 @@ void DXGIYCbCrTextureData::Deallocate(LayersIPCChannel*) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureFlags DXGIYCbCrTextureData::GetTextureFlags() const {
|
TextureFlags DXGIYCbCrTextureData::GetTextureFlags() const {
|
||||||
TextureFlags flags = TextureFlags::NO_FLAGS;
|
|
||||||
// With WebRender, resource open happens asynchronously on RenderThread.
|
// With WebRender, resource open happens asynchronously on RenderThread.
|
||||||
// During opening the resource on host side, TextureClient needs to be alive.
|
// During opening the resource on host side, TextureClient needs to be alive.
|
||||||
// With WAIT_HOST_USAGE_END, keep TextureClient alive during host side usage.
|
// With WAIT_HOST_USAGE_END, keep TextureClient alive during host side usage.
|
||||||
if (gfx::gfxVars::UseWebRender()) {
|
return TextureFlags::WAIT_HOST_USAGE_END;
|
||||||
flags |= TextureFlags::WAIT_HOST_USAGE_END;
|
|
||||||
}
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<TextureHost> CreateTextureHostD3D11(
|
already_AddRefed<TextureHost> CreateTextureHostD3D11(
|
||||||
|
|
@ -884,10 +876,6 @@ bool DXGITextureHostD3D11::LockInternal() {
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<gfx::DataSourceSurface> DXGITextureHostD3D11::GetAsSurface() {
|
already_AddRefed<gfx::DataSourceSurface> DXGITextureHostD3D11::GetAsSurface() {
|
||||||
if (!gfxVars::UseWebRender()) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (GetFormat()) {
|
switch (GetFormat()) {
|
||||||
case gfx::SurfaceFormat::R8G8B8X8:
|
case gfx::SurfaceFormat::R8G8B8X8:
|
||||||
case gfx::SurfaceFormat::R8G8B8A8:
|
case gfx::SurfaceFormat::R8G8B8A8:
|
||||||
|
|
@ -1772,7 +1760,7 @@ bool SyncObjectD3D11ClientContentDevice::IsSyncObjectValid() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update mDevice if the ContentDevice initialization is detected.
|
// Update mDevice if the ContentDevice initialization is detected.
|
||||||
if (!mContentDevice && dev && NS_IsMainThread() && gfxVars::UseWebRender()) {
|
if (!mContentDevice && dev && NS_IsMainThread()) {
|
||||||
mContentDevice = dev;
|
mContentDevice = dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
#include "SharedSurfacesChild.h"
|
#include "SharedSurfacesChild.h"
|
||||||
#include "SharedSurfacesParent.h"
|
#include "SharedSurfacesParent.h"
|
||||||
#include "CompositorManagerChild.h"
|
#include "CompositorManagerChild.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "mozilla/layers/IpcResourceUpdateQueue.h"
|
#include "mozilla/layers/IpcResourceUpdateQueue.h"
|
||||||
#include "mozilla/layers/SourceSurfaceSharedData.h"
|
#include "mozilla/layers/SourceSurfaceSharedData.h"
|
||||||
#include "mozilla/layers/WebRenderBridgeChild.h"
|
#include "mozilla/layers/WebRenderBridgeChild.h"
|
||||||
|
|
@ -171,7 +170,7 @@ nsresult SharedSurfacesChild::ShareInternal(SourceSurfaceSharedData* aSurface,
|
||||||
MOZ_ASSERT(aUserData);
|
MOZ_ASSERT(aUserData);
|
||||||
|
|
||||||
CompositorManagerChild* manager = CompositorManagerChild::GetInstance();
|
CompositorManagerChild* manager = CompositorManagerChild::GetInstance();
|
||||||
if (NS_WARN_IF(!manager || !manager->CanSend() || !gfxVars::UseWebRender())) {
|
if (NS_WARN_IF(!manager || !manager->CanSend())) {
|
||||||
// We cannot try to share the surface, most likely because the GPU process
|
// We cannot try to share the surface, most likely because the GPU process
|
||||||
// crashed. Ideally, we would retry when it is ready, but the handles may be
|
// crashed. Ideally, we would retry when it is ready, but the handles may be
|
||||||
// a scarce resource, which can cause much more serious problems if we run
|
// a scarce resource, which can cause much more serious problems if we run
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,6 @@ bool DeviceManagerDx::LoadD3D11() {
|
||||||
|
|
||||||
bool DeviceManagerDx::LoadDcomp() {
|
bool DeviceManagerDx::LoadDcomp() {
|
||||||
MOZ_ASSERT(gfxConfig::GetFeature(Feature::D3D11_COMPOSITING).IsEnabled());
|
MOZ_ASSERT(gfxConfig::GetFeature(Feature::D3D11_COMPOSITING).IsEnabled());
|
||||||
MOZ_ASSERT(gfxVars::UseWebRender());
|
|
||||||
MOZ_ASSERT(gfxVars::UseWebRenderANGLE());
|
MOZ_ASSERT(gfxVars::UseWebRenderANGLE());
|
||||||
MOZ_ASSERT(gfxVars::UseWebRenderDCompWin());
|
MOZ_ASSERT(gfxVars::UseWebRenderDCompWin());
|
||||||
|
|
||||||
|
|
@ -317,7 +316,7 @@ bool DeviceManagerDx::CreateCompositorDevicesLocked() {
|
||||||
// Fallback from WR to D3D11 Non-WR compositor without re-creating gpu process
|
// Fallback from WR to D3D11 Non-WR compositor without re-creating gpu process
|
||||||
// could happen when WR causes error. In this case, the attachments are loaded
|
// could happen when WR causes error. In this case, the attachments are loaded
|
||||||
// synchronously.
|
// synchronously.
|
||||||
if (!gfx::gfxVars::UseWebRender() || gfx::gfxVars::UseSoftwareWebRender()) {
|
if (gfx::gfxVars::UseSoftwareWebRender()) {
|
||||||
PreloadAttachmentsOnCompositorThread();
|
PreloadAttachmentsOnCompositorThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -925,20 +925,17 @@ void gfxPlatform::Init() {
|
||||||
gPlatform->InitWindowOcclusionConfig();
|
gPlatform->InitWindowOcclusionConfig();
|
||||||
gPlatform->InitBackdropFilterConfig();
|
gPlatform->InitBackdropFilterConfig();
|
||||||
|
|
||||||
|
#if defined(XP_WIN)
|
||||||
// When using WebRender, we defer initialization of the D3D11 devices until
|
// When using WebRender, we defer initialization of the D3D11 devices until
|
||||||
// the (rare) cases where they're used. Note that the GPU process where
|
// the (rare) cases where they're used. Note that the GPU process where
|
||||||
// WebRender runs doesn't initialize gfxPlatform and performs explicit
|
// WebRender runs doesn't initialize gfxPlatform and performs explicit
|
||||||
// initialization of the bits it needs.
|
// initialization of the bits it needs.
|
||||||
if (!UseWebRender()
|
if (XRE_IsParentProcess() && !gfxConfig::IsEnabled(Feature::GPU_PROCESS) &&
|
||||||
#if defined(XP_WIN)
|
StaticPrefs::
|
||||||
|| (UseWebRender() && XRE_IsParentProcess() &&
|
gfx_webrender_enabled_no_gpu_process_with_angle_win_AtStartup()) {
|
||||||
!gfxConfig::IsEnabled(Feature::GPU_PROCESS) &&
|
|
||||||
StaticPrefs::
|
|
||||||
gfx_webrender_enabled_no_gpu_process_with_angle_win_AtStartup())
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
gPlatform->EnsureDevicesInitialized();
|
gPlatform->EnsureDevicesInitialized();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
|
if (gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
|
||||||
GPUProcessManager* gpu = GPUProcessManager::Get();
|
GPUProcessManager* gpu = GPUProcessManager::Get();
|
||||||
|
|
@ -1014,7 +1011,7 @@ void gfxPlatform::Init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterStrongMemoryReporter(new GfxMemoryImageReporter());
|
RegisterStrongMemoryReporter(new GfxMemoryImageReporter());
|
||||||
if (XRE_IsParentProcess() && UseWebRender()) {
|
if (XRE_IsParentProcess()) {
|
||||||
RegisterStrongAsyncMemoryReporter(new WebRenderMemoryReporter());
|
RegisterStrongAsyncMemoryReporter(new WebRenderMemoryReporter());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1188,9 +1185,6 @@ bool gfxPlatform::IsHeadless() {
|
||||||
return headless;
|
return headless;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
|
||||||
bool gfxPlatform::UseWebRender() { return gfx::gfxVars::UseWebRender(); }
|
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
bool gfxPlatform::UseRemoteCanvas() {
|
bool gfxPlatform::UseRemoteCanvas() {
|
||||||
return XRE_IsContentProcess() && gfx::gfxVars::RemoteCanvasEnabled();
|
return XRE_IsContentProcess() && gfx::gfxVars::RemoteCanvasEnabled();
|
||||||
|
|
@ -1310,7 +1304,7 @@ void gfxPlatform::InitLayersIPC() {
|
||||||
widget::WinWindowOcclusionTracker::Ensure();
|
widget::WinWindowOcclusionTracker::Ensure();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!gfxConfig::IsEnabled(Feature::GPU_PROCESS) && UseWebRender()) {
|
if (!gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
|
||||||
RemoteTextureMap::Init();
|
RemoteTextureMap::Init();
|
||||||
if (gfxVars::UseCanvasRenderThread()) {
|
if (gfxVars::UseCanvasRenderThread()) {
|
||||||
gfx::CanvasRenderThread::Start();
|
gfx::CanvasRenderThread::Start();
|
||||||
|
|
@ -2107,8 +2101,8 @@ void gfxPlatform::InitializeCMS() {
|
||||||
nsTArray<uint8_t> outputProfileData =
|
nsTArray<uint8_t> outputProfileData =
|
||||||
gfxPlatform::GetPlatform()->GetPlatformCMSOutputProfileData();
|
gfxPlatform::GetPlatform()->GetPlatformCMSOutputProfileData();
|
||||||
if (!outputProfileData.IsEmpty()) {
|
if (!outputProfileData.IsEmpty()) {
|
||||||
gCMSOutputProfile = qcms_profile_from_memory_curves_only(outputProfileData.Elements(),
|
gCMSOutputProfile = qcms_profile_from_memory_curves_only(
|
||||||
outputProfileData.Length());
|
outputProfileData.Elements(), outputProfileData.Length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2602,9 +2596,7 @@ void gfxPlatform::InitWebRenderConfig() {
|
||||||
// The parent process runs through all the real decision-making code
|
// The parent process runs through all the real decision-making code
|
||||||
// later in this function. For other processes we still want to report
|
// later in this function. For other processes we still want to report
|
||||||
// the state of the feature for crash reports.
|
// the state of the feature for crash reports.
|
||||||
if (gfxVars::UseWebRender()) {
|
reporter.SetSuccessful();
|
||||||
reporter.SetSuccessful();
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2642,9 +2634,6 @@ void gfxPlatform::InitWebRenderConfig() {
|
||||||
Preferences::RegisterPrefixCallbackAndCall(SwapIntervalPrefChangeCallback,
|
Preferences::RegisterPrefixCallbackAndCall(SwapIntervalPrefChangeCallback,
|
||||||
"gfx.swap-interval");
|
"gfx.swap-interval");
|
||||||
|
|
||||||
// gfxFeature is not usable in the GPU process, so we use gfxVars to transmit
|
|
||||||
// this feature
|
|
||||||
gfxVars::SetUseWebRender(true);
|
|
||||||
reporter.SetSuccessful();
|
reporter.SetSuccessful();
|
||||||
|
|
||||||
Preferences::RegisterPrefixCallbackAndCall(WebRenderDebugPrefChangeCallback,
|
Preferences::RegisterPrefixCallbackAndCall(WebRenderDebugPrefChangeCallback,
|
||||||
|
|
@ -2807,7 +2796,7 @@ void gfxPlatform::InitWebRenderConfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Preferences::GetBool("gfx.webrender.flip-sequential", false)) {
|
if (Preferences::GetBool("gfx.webrender.flip-sequential", false)) {
|
||||||
if (UseWebRender() && gfxVars::UseWebRenderANGLE()) {
|
if (gfxVars::UseWebRenderANGLE()) {
|
||||||
gfxVars::SetUseWebRenderFlipSequentialWin(true);
|
gfxVars::SetUseWebRenderFlipSequentialWin(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2878,8 +2867,6 @@ void gfxPlatform::InitHardwareVideoConfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxPlatform::InitWebGLConfig() {
|
void gfxPlatform::InitWebGLConfig() {
|
||||||
// Depends on InitWebRenderConfig() for UseWebRender().
|
|
||||||
|
|
||||||
if (!XRE_IsParentProcess()) return;
|
if (!XRE_IsParentProcess()) return;
|
||||||
|
|
||||||
const nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
const nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
||||||
|
|
@ -3561,7 +3548,7 @@ bool gfxPlatform::FallbackFromAcceleration(FeatureStatus aStatus,
|
||||||
if (StaticPrefs::gfx_webrender_fallback_software_d3d11_AtStartup() &&
|
if (StaticPrefs::gfx_webrender_fallback_software_d3d11_AtStartup() &&
|
||||||
swglFallbackAllowed && gfxVars::AllowSoftwareWebRenderD3D11() &&
|
swglFallbackAllowed && gfxVars::AllowSoftwareWebRenderD3D11() &&
|
||||||
gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING) &&
|
gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING) &&
|
||||||
gfxVars::UseWebRender() && !gfxVars::UseSoftwareWebRender()) {
|
!gfxVars::UseSoftwareWebRender()) {
|
||||||
// Fallback to Software WebRender + D3D11 compositing.
|
// Fallback to Software WebRender + D3D11 compositing.
|
||||||
gfxCriticalNote << "Fallback WR to SW-WR + D3D11";
|
gfxCriticalNote << "Fallback WR to SW-WR + D3D11";
|
||||||
gfxVars::SetUseSoftwareWebRender(true);
|
gfxVars::SetUseSoftwareWebRender(true);
|
||||||
|
|
@ -3586,15 +3573,6 @@ bool gfxPlatform::FallbackFromAcceleration(FeatureStatus aStatus,
|
||||||
if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
|
if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
|
||||||
gfxConfig::GetFeature(Feature::D3D11_COMPOSITING)
|
gfxConfig::GetFeature(Feature::D3D11_COMPOSITING)
|
||||||
.ForceDisable(aStatus, aMessage, aFailureId);
|
.ForceDisable(aStatus, aMessage, aFailureId);
|
||||||
|
|
||||||
if (StaticPrefs::gfx_webrender_fallback_software_AtStartup() &&
|
|
||||||
swglFallbackAllowed && !gfxVars::UseWebRender()) {
|
|
||||||
// Fallback from D3D11 to Software WebRender.
|
|
||||||
gfxCriticalNote << "Fallback D3D11 to SW-WR";
|
|
||||||
gfxVars::SetUseWebRender(true);
|
|
||||||
gfxVars::SetUseSoftwareWebRender(true);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -3607,12 +3585,6 @@ bool gfxPlatform::FallbackFromAcceleration(FeatureStatus aStatus,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gfxVars::UseWebRender()) {
|
|
||||||
// We were not using WebRender in the first place, and we have disabled
|
|
||||||
// all forms of accelerated compositing.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StaticPrefs::gfx_webrender_fallback_software_AtStartup() &&
|
if (StaticPrefs::gfx_webrender_fallback_software_AtStartup() &&
|
||||||
swglFallbackAllowed && !gfxVars::UseSoftwareWebRender()) {
|
swglFallbackAllowed && !gfxVars::UseSoftwareWebRender()) {
|
||||||
// Fallback from WebRender to Software WebRender.
|
// Fallback from WebRender to Software WebRender.
|
||||||
|
|
@ -3621,8 +3593,6 @@ bool gfxPlatform::FallbackFromAcceleration(FeatureStatus aStatus,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(gfxVars::UseWebRender());
|
|
||||||
|
|
||||||
if (!gfxVars::UseSoftwareWebRender()) {
|
if (!gfxVars::UseSoftwareWebRender()) {
|
||||||
// Software WebRender may be disabled due to a startup issue with the
|
// Software WebRender may be disabled due to a startup issue with the
|
||||||
// blocklist, despite it being our only fallback option based on the prefs.
|
// blocklist, despite it being our only fallback option based on the prefs.
|
||||||
|
|
@ -3648,15 +3618,13 @@ void gfxPlatform::DisableGPUProcess() {
|
||||||
gfxVars::SetRemoteCanvasEnabled(false);
|
gfxVars::SetRemoteCanvasEnabled(false);
|
||||||
|
|
||||||
RemoteTextureMap::Init();
|
RemoteTextureMap::Init();
|
||||||
if (gfxVars::UseWebRender()) {
|
if (gfxVars::UseCanvasRenderThread()) {
|
||||||
if (gfxVars::UseCanvasRenderThread()) {
|
gfx::CanvasRenderThread::Start();
|
||||||
gfx::CanvasRenderThread::Start();
|
|
||||||
}
|
|
||||||
// We need to initialize the parent process to prepare for WebRender if we
|
|
||||||
// did not end up disabling it, despite losing the GPU process.
|
|
||||||
wr::RenderThread::Start(GPUProcessManager::Get()->AllocateNamespace());
|
|
||||||
image::ImageMemoryReporter::InitForWebRender();
|
|
||||||
}
|
}
|
||||||
|
// We need to initialize the parent process to prepare for WebRender if we
|
||||||
|
// did not end up disabling it, despite losing the GPU process.
|
||||||
|
wr::RenderThread::Start(GPUProcessManager::Get()->AllocateNamespace());
|
||||||
|
image::ImageMemoryReporter::InitForWebRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxPlatform::FetchAndImportContentDeviceData() {
|
void gfxPlatform::FetchAndImportContentDeviceData() {
|
||||||
|
|
|
||||||
|
|
@ -232,8 +232,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
|
||||||
|
|
||||||
static bool IsHeadless();
|
static bool IsHeadless();
|
||||||
|
|
||||||
static bool UseWebRender();
|
|
||||||
|
|
||||||
static bool UseRemoteCanvas();
|
static bool UseRemoteCanvas();
|
||||||
|
|
||||||
static bool IsBackendAccelerated(
|
static bool IsBackendAccelerated(
|
||||||
|
|
|
||||||
|
|
@ -438,10 +438,7 @@ void gfxWindowsPlatform::InitAcceleration() {
|
||||||
|
|
||||||
void gfxWindowsPlatform::InitWebRenderConfig() {
|
void gfxWindowsPlatform::InitWebRenderConfig() {
|
||||||
gfxPlatform::InitWebRenderConfig();
|
gfxPlatform::InitWebRenderConfig();
|
||||||
|
UpdateBackendPrefs();
|
||||||
if (gfxVars::UseWebRender()) {
|
|
||||||
UpdateBackendPrefs();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gfxWindowsPlatform::CanUseHardwareVideoDecoding() {
|
bool gfxWindowsPlatform::CanUseHardwareVideoDecoding() {
|
||||||
|
|
@ -510,11 +507,6 @@ BackendPrefsData gfxWindowsPlatform::GetBackendPrefs() const {
|
||||||
if (gfxConfig::IsEnabled(Feature::DIRECT2D)) {
|
if (gfxConfig::IsEnabled(Feature::DIRECT2D)) {
|
||||||
data.mCanvasBitmask |= BackendTypeBit(BackendType::DIRECT2D1_1);
|
data.mCanvasBitmask |= BackendTypeBit(BackendType::DIRECT2D1_1);
|
||||||
data.mCanvasDefault = BackendType::DIRECT2D1_1;
|
data.mCanvasDefault = BackendType::DIRECT2D1_1;
|
||||||
// We do not use d2d for content when WebRender is used.
|
|
||||||
if (!gfxVars::UseWebRender()) {
|
|
||||||
data.mContentBitmask |= BackendTypeBit(BackendType::DIRECT2D1_1);
|
|
||||||
data.mContentDefault = BackendType::DIRECT2D1_1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
@ -592,7 +584,7 @@ mozilla::gfx::BackendType gfxWindowsPlatform::GetPreferredCanvasBackend() {
|
||||||
mozilla::gfx::BackendType backend = gfxPlatform::GetPreferredCanvasBackend();
|
mozilla::gfx::BackendType backend = gfxPlatform::GetPreferredCanvasBackend();
|
||||||
|
|
||||||
if (backend == BackendType::DIRECT2D1_1) {
|
if (backend == BackendType::DIRECT2D1_1) {
|
||||||
if (gfx::gfxVars::UseWebRender() && !gfx::gfxVars::UseWebRenderANGLE()) {
|
if (!gfx::gfxVars::UseWebRenderANGLE()) {
|
||||||
// We can't have D2D without ANGLE when WebRender is enabled, so fallback
|
// We can't have D2D without ANGLE when WebRender is enabled, so fallback
|
||||||
// to Skia.
|
// to Skia.
|
||||||
return BackendType::SKIA;
|
return BackendType::SKIA;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
#include "mozilla/dom/SVGSVGElement.h"
|
#include "mozilla/dom/SVGSVGElement.h"
|
||||||
#include "mozilla/dom/SVGDocument.h"
|
#include "mozilla/dom/SVGDocument.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "mozilla/PendingAnimationTracker.h"
|
#include "mozilla/PendingAnimationTracker.h"
|
||||||
#include "mozilla/PresShell.h"
|
#include "mozilla/PresShell.h"
|
||||||
#include "mozilla/ProfilerLabels.h"
|
#include "mozilla/ProfilerLabels.h"
|
||||||
|
|
@ -972,13 +971,7 @@ VectorImage::Draw(gfxContext* aContext, const nsIntSize& aSize,
|
||||||
// - We are using a DrawTargetRecording because we prefer the drawing commands
|
// - We are using a DrawTargetRecording because we prefer the drawing commands
|
||||||
// in general to the rasterized surface. This allows blob images to avoid
|
// in general to the rasterized surface. This allows blob images to avoid
|
||||||
// rasterized SVGs with WebRender.
|
// rasterized SVGs with WebRender.
|
||||||
// - The size exceeds what we are willing to cache as a rasterized surface.
|
if (aContext->GetDrawTarget()->GetBackendType() == BackendType::RECORDING) {
|
||||||
// We don't do this for WebRender because the performance of the fallback
|
|
||||||
// path is quite bad and upscaling the SVG from the clamped size is better
|
|
||||||
// than bringing the browser to a crawl.
|
|
||||||
if (aContext->GetDrawTarget()->GetBackendType() == BackendType::RECORDING ||
|
|
||||||
(!gfxVars::UseWebRender() &&
|
|
||||||
aSize != SurfaceCache::ClampVectorSize(aSize))) {
|
|
||||||
aFlags |= FLAG_BYPASS_SURFACE_CACHE;
|
aFlags |= FLAG_BYPASS_SURFACE_CACHE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
#include "mozilla/dom/ImageTracker.h"
|
#include "mozilla/dom/ImageTracker.h"
|
||||||
#include "mozilla/dom/Selection.h"
|
#include "mozilla/dom/Selection.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "mozilla/gfx/PathHelpers.h"
|
#include "mozilla/gfx/PathHelpers.h"
|
||||||
#include "mozilla/intl/BidiEmbeddingLevel.h"
|
#include "mozilla/intl/BidiEmbeddingLevel.h"
|
||||||
#include "mozilla/Maybe.h"
|
#include "mozilla/Maybe.h"
|
||||||
|
|
@ -11497,8 +11496,7 @@ CompositorHitTestInfo nsIFrame::GetCompositorHitTestInfo(
|
||||||
// If WebRender is enabled, simple clip-paths can be converted into WR
|
// If WebRender is enabled, simple clip-paths can be converted into WR
|
||||||
// clips that WR knows how to hit-test against, so we don't need to mark
|
// clips that WR knows how to hit-test against, so we don't need to mark
|
||||||
// it as an irregular area.
|
// it as an irregular area.
|
||||||
if (!gfxVars::UseWebRender() ||
|
if (!SVGIntegrationUtils::UsingSimpleClipPathForFrame(this)) {
|
||||||
!SVGIntegrationUtils::UsingSimpleClipPathForFrame(this)) {
|
|
||||||
result += CompositorHitTestFlags::eIrregularArea;
|
result += CompositorHitTestFlags::eIrregularArea;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
#include "gfxContext.h"
|
#include "gfxContext.h"
|
||||||
#include "SVGPaintServerFrame.h"
|
#include "SVGPaintServerFrame.h"
|
||||||
#include "mozilla/gfx/Point.h"
|
#include "mozilla/gfx/Point.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
|
||||||
#include "mozilla/CSSClipPathInstance.h"
|
#include "mozilla/CSSClipPathInstance.h"
|
||||||
#include "mozilla/FilterInstance.h"
|
#include "mozilla/FilterInstance.h"
|
||||||
#include "mozilla/StaticPrefs_layers.h"
|
#include "mozilla/StaticPrefs_layers.h"
|
||||||
|
|
@ -1101,13 +1100,8 @@ bool SVGIntegrationUtils::CanCreateWebRenderFiltersForFrame(nsIFrame* aFrame) {
|
||||||
bool SVGIntegrationUtils::UsesSVGEffectsNotSupportedInCompositor(
|
bool SVGIntegrationUtils::UsesSVGEffectsNotSupportedInCompositor(
|
||||||
nsIFrame* aFrame) {
|
nsIFrame* aFrame) {
|
||||||
// WebRender supports masks / clip-paths and some filters in the compositor.
|
// WebRender supports masks / clip-paths and some filters in the compositor.
|
||||||
// Non-WebRender doesn't support any SVG effects in the compositor.
|
|
||||||
if (aFrame->StyleEffects()->HasFilters()) {
|
if (aFrame->StyleEffects()->HasFilters()) {
|
||||||
return !gfx::gfxVars::UseWebRender() ||
|
return !SVGIntegrationUtils::CanCreateWebRenderFiltersForFrame(aFrame);
|
||||||
!SVGIntegrationUtils::CanCreateWebRenderFiltersForFrame(aFrame);
|
|
||||||
}
|
|
||||||
if (SVGIntegrationUtils::UsingMaskOrClipPathForFrame(aFrame)) {
|
|
||||||
return !gfx::gfxVars::UseWebRender();
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -736,16 +736,6 @@ nsIXULRuntime::ContentWin32kLockdownState GetLiveWin32kLockdownState() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Win32k Lockdown requires WebRender, but WR is not currently guaranteed
|
|
||||||
// on all computers. It can also fail to initialize and fallback to
|
|
||||||
// non-WR render path.
|
|
||||||
//
|
|
||||||
// We don't want a situation where "Win32k Lockdown + No WR" occurs
|
|
||||||
// without the user explicitly requesting unsupported behavior.
|
|
||||||
if (!gfx::gfxVars::UseWebRender()) {
|
|
||||||
return nsIXULRuntime::ContentWin32kLockdownState::MissingWebRender;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Non-native theming is required as well
|
// Non-native theming is required as well
|
||||||
if (!StaticPrefs::widget_non_native_theme_enabled()) {
|
if (!StaticPrefs::widget_non_native_theme_enabled()) {
|
||||||
return nsIXULRuntime::ContentWin32kLockdownState::MissingNonNativeTheming;
|
return nsIXULRuntime::ContentWin32kLockdownState::MissingNonNativeTheming;
|
||||||
|
|
|
||||||
|
|
@ -1840,7 +1840,7 @@ nsresult GfxInfoBase::GetActiveCrashGuards(JSContext* aCx,
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
GfxInfoBase::GetWebRenderEnabled(bool* aWebRenderEnabled) {
|
GfxInfoBase::GetWebRenderEnabled(bool* aWebRenderEnabled) {
|
||||||
*aWebRenderEnabled = gfxVars::UseWebRender();
|
*aWebRenderEnabled = true;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1349,20 +1349,13 @@ already_AddRefed<WebRenderLayerManager> nsBaseWidget::CreateCompositorSession(
|
||||||
gpu->EnsureGPUReady();
|
gpu->EnsureGPUReady();
|
||||||
|
|
||||||
// If widget type does not supports acceleration, we may be allowed to use
|
// If widget type does not supports acceleration, we may be allowed to use
|
||||||
// software WebRender instead. If not, then we use ClientLayerManager even
|
// software WebRender instead.
|
||||||
// when gfxVars::UseWebRender() is true. WebRender could coexist only with
|
|
||||||
// BasicCompositor.
|
|
||||||
bool supportsAcceleration = WidgetTypeSupportsAcceleration();
|
bool supportsAcceleration = WidgetTypeSupportsAcceleration();
|
||||||
bool enableWR;
|
bool enableSWWR = true;
|
||||||
bool enableSWWR;
|
|
||||||
if (supportsAcceleration ||
|
if (supportsAcceleration ||
|
||||||
StaticPrefs::gfx_webrender_unaccelerated_widget_force()) {
|
StaticPrefs::gfx_webrender_unaccelerated_widget_force()) {
|
||||||
enableWR = gfx::gfxVars::UseWebRender();
|
|
||||||
enableSWWR = gfx::gfxVars::UseSoftwareWebRender();
|
enableSWWR = gfx::gfxVars::UseSoftwareWebRender();
|
||||||
} else {
|
|
||||||
enableWR = enableSWWR = gfx::gfxVars::UseWebRender();
|
|
||||||
}
|
}
|
||||||
MOZ_RELEASE_ASSERT(enableWR);
|
|
||||||
bool enableAPZ = UseAPZ();
|
bool enableAPZ = UseAPZ();
|
||||||
CompositorOptions options(enableAPZ, enableSWWR);
|
CompositorOptions options(enableAPZ, enableSWWR);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7957,14 +7957,6 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode) {
|
||||||
reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));
|
reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));
|
||||||
ReleaseDC(mWnd, hdc);
|
ReleaseDC(mWnd, hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable double buffering with D3D compositor for disabling compositor
|
|
||||||
// window usage.
|
|
||||||
if (HasGlass() && !gfxVars::UseWebRender() &&
|
|
||||||
gfxVars::UseDoubleBufferingWithCompositor()) {
|
|
||||||
gfxVars::SetUseDoubleBufferingWithCompositor(false);
|
|
||||||
GPUProcessManager::Get()->ResetCompositors();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue