Don't access mCompositor from CompositeToTarget. (bug 1339688 part 2, r=mattwoodrow)

This commit is contained in:
David Anderson 2017-02-15 19:03:20 -08:00
Родитель efe562eabb
Коммит dacafad8a4
3 изменённых файлов: 15 добавлений и 2 удалений

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

@ -1410,6 +1410,12 @@ LayerManagerComposite::AsyncPanZoomEnabled() const
return false; return false;
} }
bool
LayerManagerComposite::AlwaysScheduleComposite() const
{
return !!(mCompositor->GetDiagnosticTypes() & DiagnosticTypes::FLASH_BORDERS);
}
nsIntRegion nsIntRegion
LayerComposite::GetFullyRenderedRegion() { LayerComposite::GetFullyRenderedRegion() {
if (TiledContentHost* tiled = GetCompositableHost() ? GetCompositableHost()->AsTiledContentHost() if (TiledContentHost* tiled = GetCompositableHost() ? GetCompositableHost()->AsTiledContentHost()

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

@ -164,6 +164,10 @@ public:
void SetPaintTime(const TimeDuration& aPaintTime) { mLastPaintTime = aPaintTime; } void SetPaintTime(const TimeDuration& aPaintTime) { mLastPaintTime = aPaintTime; }
virtual bool AlwaysScheduleComposite() const {
return false;
}
TimeStamp GetCompositionTime() const { TimeStamp GetCompositionTime() const {
return mCompositionTime; return mCompositionTime;
} }
@ -279,6 +283,8 @@ public:
virtual const char* Name() const override { return ""; } virtual const char* Name() const override { return ""; }
bool AlwaysScheduleComposite() const override;
/** /**
* Post-processes layers before composition. This performs the following: * Post-processes layers before composition. This performs the following:
* *

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

@ -1034,8 +1034,9 @@ CompositorBridgeParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRec
#endif #endif
// 0 -> Full-tilt composite // 0 -> Full-tilt composite
if (gfxPrefs::LayersCompositionFrameRate() == 0 if (gfxPrefs::LayersCompositionFrameRate() == 0 ||
|| mLayerManager->GetCompositor()->GetDiagnosticTypes() & DiagnosticTypes::FLASH_BORDERS) { mLayerManager->AlwaysScheduleComposite())
{
// Special full-tilt composite mode for performance testing // Special full-tilt composite mode for performance testing
ScheduleComposition(); ScheduleComposition();
} }