зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1531417
- enable shared buffer provider for software canvas on all platforms. r=nical
This commit is contained in:
Родитель
0783e0978d
Коммит
ff411088bc
|
@ -1355,6 +1355,13 @@ bool CanvasRenderingContext2D::TrySharedTarget(
|
|||
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 =
|
||||
LayerManagerFromCanvasElement(mCanvasElement);
|
||||
|
||||
|
@ -4557,7 +4564,10 @@ void CanvasRenderingContext2D::DrawWindow(nsGlobalWindowInner& aWindow,
|
|||
CompositionOp op = UsedOperation();
|
||||
bool discardContent =
|
||||
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);
|
||||
EnsureTarget(discardContent ? &drawRect : nullptr);
|
||||
if (!IsTargetValid()) {
|
||||
|
|
|
@ -5082,15 +5082,6 @@ pref("layers.prefer-opengl", false);
|
|||
// Copy-on-write canvas
|
||||
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
|
||||
pref("layers.force-active", false);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче