Bug 1645579 - Disable RecycleAllocator for RDD process when WebRender is disabled on Mac r=nical

Recycling caused rendering problem on a MacOS PC with OpenGL compositor. TextureHost reuse with OpenGL compositor seemed to have a problem.

Adds pref layers.recycle-allocator-rdd for disable/enable the RecycleAllocator.

Differential Revision: https://phabricator.services.mozilla.com/D79639
This commit is contained in:
sotaro 2020-06-16 18:14:46 +00:00
Родитель 5da9005f43
Коммит 3f0b08deb4
2 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -22,6 +22,7 @@
#include "mozilla/layers/SharedSurfacesChild.h" // for SharedSurfacesAnimation
#include "mozilla/layers/SharedRGBImage.h"
#include "mozilla/layers/TextureClientRecycleAllocator.h"
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/gfx/gfxVars.h"
#include "nsISupportsUtils.h" // for NS_IF_ADDREF
#include "YCbCrUtils.h" // for YCbCr conversions
@ -422,6 +423,19 @@ void ImageContainer::EnsureRecycleAllocatorForRDD(
return;
}
bool useRecycleAllocator =
StaticPrefs::layers_recycle_allocator_rdd_AtStartup();
#ifdef XP_MACOSX
// Disable RecycleAllocator for RDD on MacOS without WebRender.
// Recycling caused rendering artifact on a MacOS PC with OpenGL compositor.
if (!gfxVars::UseWebRender()) {
useRecycleAllocator = false;
}
#endif
if (!useRecycleAllocator) {
return;
}
static const uint32_t MAX_POOLED_VIDEO_COUNT = 5;
mRecycleAllocator =

Просмотреть файл

@ -5430,6 +5430,11 @@
value: true
mirror: once
- name: layers.recycle-allocator-rdd
type: bool
value: true
mirror: once
#---------------------------------------------------------------------------
# Prefs starting with "layout."
#---------------------------------------------------------------------------