Bug 1345017 - Disable OMTA with webrender by default, r=kats

MozReview-Commit-ID: 4cA8n8XYall
This commit is contained in:
peter chang 2017-04-17 22:22:47 +08:00
Родитель 59102e0ad9
Коммит 4cf27c49b8
4 изменённых файлов: 17 добавлений и 10 удалений

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

@ -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);