зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061209 - disable basic layers OMTC except on linux and e10s. r=mattwoodrow
This commit is contained in:
Родитель
a7e9a512e9
Коммит
7c2608e0a5
|
@ -872,6 +872,19 @@ nsBaseWidget::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
|
|||
aHints.AppendElement(LayersBackend::LAYERS_BASIC);
|
||||
}
|
||||
|
||||
static void
|
||||
RemoveBasicBackend(nsTArray<LayersBackend>& aHints)
|
||||
{
|
||||
#ifndef XP_WIN
|
||||
for (size_t i = 0; i < aHints.Length(); ++i) {
|
||||
if (aHints[i] == LayersBackend::LAYERS_BASIC &&
|
||||
!Preferences::GetBool("layers.offmainthreadcomposition.force-basic", false)) {
|
||||
aHints[i] = LayersBackend::LAYERS_NONE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
||||
{
|
||||
MOZ_ASSERT(gfxPlatform::UsesOffMainThreadCompositing(),
|
||||
|
@ -901,6 +914,12 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
|||
nsTArray<LayersBackend> backendHints;
|
||||
GetPreferredCompositorBackends(backendHints);
|
||||
|
||||
#ifndef MOZ_X11
|
||||
if (!mRequireOffMainThreadCompositing) {
|
||||
RemoveBasicBackend(backendHints);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool success = false;
|
||||
if (!backendHints.IsEmpty()) {
|
||||
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
|
||||
|
|
Загрузка…
Ссылка в новой задаче