зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1345017 - Disable OMTA with webrender by default, r=kats
MozReview-Commit-ID: 4cA8n8XYall
This commit is contained in:
Родитель
59102e0ad9
Коммит
4cf27c49b8
|
@ -641,16 +641,19 @@ WebRenderBridgeParent::CompositeToTarget(gfx::DrawTarget* aTarget, const gfx::In
|
|||
return;
|
||||
}
|
||||
|
||||
nsTArray<WrOpacityProperty> opacityArray;
|
||||
nsTArray<WrTransformProperty> transformArray;
|
||||
SampleAnimations(opacityArray, transformArray);
|
||||
if (gfxPrefs::WebRenderOMTAEnabled()) {
|
||||
nsTArray<WrOpacityProperty> opacityArray;
|
||||
nsTArray<WrTransformProperty> transformArray;
|
||||
SampleAnimations(opacityArray, transformArray);
|
||||
|
||||
if (!transformArray.IsEmpty() || !opacityArray.IsEmpty()) {
|
||||
mApi->GenerateFrame(opacityArray, transformArray);
|
||||
ScheduleComposition();
|
||||
} else {
|
||||
mApi->GenerateFrame();
|
||||
if (!transformArray.IsEmpty() || !opacityArray.IsEmpty()) {
|
||||
mApi->GenerateFrame(opacityArray, transformArray);
|
||||
ScheduleComposition();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
mApi->GenerateFrame();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -37,7 +37,8 @@ WebRenderContainerLayer::RenderLayer(wr::DisplayListBuilder& aBuilder)
|
|||
Stringify(mixBlendMode).c_str());
|
||||
}
|
||||
|
||||
if (GetAnimations().Length()) {
|
||||
if (gfxPrefs::WebRenderOMTAEnabled() &&
|
||||
GetAnimations().Length()) {
|
||||
MOZ_ASSERT(GetCompositorAnimationsId());
|
||||
|
||||
CompositorAnimations anim;
|
||||
|
|
|
@ -25,7 +25,9 @@ public:
|
|||
protected:
|
||||
virtual ~WebRenderContainerLayer()
|
||||
{
|
||||
if (GetAnimations().Length()) {
|
||||
|
||||
if (gfxPrefs::WebRenderOMTAEnabled() &&
|
||||
GetAnimations().Length()) {
|
||||
mManager->AsWebRenderLayerManager()->
|
||||
AddCompositorAnimationsIdForDiscard(GetCompositorAnimationsId());
|
||||
}
|
||||
|
|
|
@ -455,6 +455,7 @@ private:
|
|||
|
||||
DECL_GFX_PREF(Live, "gfx.vsync.collect-scroll-transforms", CollectScrollTransforms, bool, false);
|
||||
DECL_GFX_PREF(Once, "gfx.vsync.compositor.unobserve-count", CompositorUnobserveCount, int32_t, 10);
|
||||
DECL_GFX_PREF(Live, "gfx.webrender.omta.enabled", WebRenderOMTAEnabled, bool, false);
|
||||
DECL_GFX_PREF(Live, "gfx.webrender.profiler.enable", WebRenderProfilerEnabled, bool, false);
|
||||
// Use vsync events generated by hardware
|
||||
DECL_GFX_PREF(Once, "gfx.work-around-driver-bugs", WorkAroundDriverBugs, bool, true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче