Bug 1531417 - enable shared buffer provider for software canvas on all platforms. r=nical

This commit is contained in:
Lee Salzman 2019-03-01 09:53:43 -05:00
Родитель 0783e0978d
Коммит ff411088bc
2 изменённых файлов: 11 добавлений и 10 удалений

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

@ -1355,6 +1355,13 @@ bool CanvasRenderingContext2D::TrySharedTarget(
return false; return false;
} }
#ifdef XP_WIN
// Bug 1285271 - Disable shared buffer provider on Windows with D2D due to instability
if (gfxPlatform::GetPlatform()->GetPreferredCanvasBackend() == BackendType::DIRECT2D1_1) {
return false;
}
#endif
RefPtr<LayerManager> layerManager = RefPtr<LayerManager> layerManager =
LayerManagerFromCanvasElement(mCanvasElement); LayerManagerFromCanvasElement(mCanvasElement);
@ -4557,7 +4564,10 @@ void CanvasRenderingContext2D::DrawWindow(nsGlobalWindowInner& aWindow,
CompositionOp op = UsedOperation(); CompositionOp op = UsedOperation();
bool discardContent = bool discardContent =
GlobalAlpha() == 1.0f && GlobalAlpha() == 1.0f &&
(op == CompositionOp::OP_OVER || op == CompositionOp::OP_SOURCE); (op == CompositionOp::OP_OVER || op == CompositionOp::OP_SOURCE) &&
(!mBufferProvider ||
(mBufferProvider->GetType() != LayersBackend::LAYERS_CLIENT &&
mBufferProvider->GetType() != LayersBackend::LAYERS_WR));
const gfx::Rect drawRect(aX, aY, aW, aH); const gfx::Rect drawRect(aX, aY, aW, aH);
EnsureTarget(discardContent ? &drawRect : nullptr); EnsureTarget(discardContent ? &drawRect : nullptr);
if (!IsTargetValid()) { if (!IsTargetValid()) {

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

@ -5082,15 +5082,6 @@ pref("layers.prefer-opengl", false);
// Copy-on-write canvas // Copy-on-write canvas
pref("layers.shared-buffer-provider.enabled", true); pref("layers.shared-buffer-provider.enabled", true);
#ifdef XP_WIN
pref("layers.shared-buffer-provider.enabled", false);
#endif
#ifdef XP_MACOSX
// cf. Bug 1324908
pref("layers.shared-buffer-provider.enabled", false);
#endif
// Force all possible layers to be always active layers // Force all possible layers to be always active layers
pref("layers.force-active", false); pref("layers.force-active", false);