Bug 1403915 - Remove some leftover painting callback goop. r=jrmuizel

MozReview-Commit-ID: BycK4Ug1sgm

--HG--
extra : rebase_source : 6fa5a8da45a75ec4ed1d5a7b55cf95671845bd05
This commit is contained in:
Kartikaya Gupta 2017-10-03 16:31:08 -04:00
Родитель 2f1948343f
Коммит 9493b267c7
3 изменённых файлов: 12 добавлений и 25 удалений

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

@ -186,7 +186,7 @@ WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags)
}
// We might used painted layer images so don't delete them yet.
return EndTransactionInternal(nullptr, nullptr, aFlags);
return EndTransactionInternal(aFlags);
}
/*static*/ int32_t
@ -365,9 +365,7 @@ WebRenderLayerManager::EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
{
MOZ_ASSERT(aDisplayList && aDisplayListBuilder);
WrBridge()->RemoveExpiredFontKeys();
EndTransactionInternal(nullptr,
nullptr,
EndTransactionFlags::END_DEFAULT,
EndTransactionInternal(EndTransactionFlags::END_DEFAULT,
aDisplayList,
aDisplayListBuilder);
}
@ -708,20 +706,17 @@ WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags)
{
WrBridge()->RemoveExpiredFontKeys();
EndTransactionInternal(aCallback, aCallbackData, aFlags);
// This should never get called, all callers should use
// EndTransactionWithoutLayer instead.
MOZ_ASSERT(false);
}
bool
WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags,
WebRenderLayerManager::EndTransactionInternal(EndTransactionFlags aFlags,
nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder)
{
AutoProfilerTracing tracing("Paint", "RenderLayers");
mPaintedLayerCallback = aCallback;
mPaintedLayerCallbackData = aCallbackData;
mTransactionIncomplete = false;
if (gfxPrefs::LayersDump()) {

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

@ -156,12 +156,6 @@ public:
bool AsyncPanZoomEnabled() const override;
DrawPaintedLayerCallback GetPaintedLayerCallback() const
{ return mPaintedLayerCallback; }
void* GetPaintedLayerCallbackData() const
{ return mPaintedLayerCallbackData; }
// adds an imagekey to a list of keys that will be discarded on the next
// transaction or destruction
void AddImageKeyForDiscard(wr::ImageKey);
@ -254,9 +248,7 @@ private:
void ClearLayer(Layer* aLayer);
bool EndTransactionInternal(DrawPaintedLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags,
bool EndTransactionInternal(EndTransactionFlags aFlags,
nsDisplayList* aDisplayList = nullptr,
nsDisplayListBuilder* aDisplayListBuilder = nullptr);
@ -303,11 +295,6 @@ private:
// the compositor to discard information for.
nsTArray<uint64_t> mDiscardedCompositorAnimationsIds;
/* PaintedLayer callbacks; valid at the end of a transaciton,
* while rendering */
DrawPaintedLayerCallback mPaintedLayerCallback;
void *mPaintedLayerCallbackData;
RefPtr<WebRenderBridgeChild> mWrChild;
RefPtr<TransactionIdAllocator> mTransactionIdAllocator;

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

@ -6426,6 +6426,11 @@ PresShell::Paint(nsView* aViewToPaint,
return;
}
if (layerManager->GetBackendType() == layers::LayersBackend::LAYERS_WR) {
// TODO: bug 1405465 - create a WR display list which simulates the color layer below.
return;
}
RefPtr<ColorLayer> root = layerManager->CreateColorLayer();
if (root) {
nsPresContext* pc = GetPresContext();