Bug 1410777 - Remove unused function and dead code left over from the layers-full WR days. r?mstange
This is functionally unrelated to the bug but I noticed it while fiddling with
the code, and the lines affected are kind of intertwined with the next patch so
I'm just doing the code removal as part of this bug.
MozReview-Commit-ID: CwmluhyCdbR
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -244,17 +244,16 @@ WebRenderLayerManager::EndTransaction(Dr
void
WebRenderLayerManager::EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder)
{
MOZ_ASSERT(aDisplayList && aDisplayListBuilder);
WrBridge()->RemoveExpiredFontKeys();
AUTO_PROFILER_TRACING("Paint", "RenderLayers");
- mTransactionIncomplete = false;
#if 0
// Useful for debugging, it dumps the display list *before* we try to build
// WR commands from it
nsFrame::PrintDisplayList(aDisplayListBuilder, *aDisplayList);
#endif
// Since we don't do repeat transactions right now, just set the time
@@ -273,25 +272,16 @@ WebRenderLayerManager::EndTransactionWit
aDisplayList,
aDisplayListBuilder,
mScrollData,
contentSize);
mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder, resourceUpdates);
WrBridge()->ClearReadLocks();
- // We can't finish this transaction so return. This usually
- // happens in an empty transaction where we can't repaint a painted layer.
- // In this case, leave the transaction open and let a full transaction happen.
- if (mTransactionIncomplete) {
- DiscardLocalImages();
- WrBridge()->ProcessWebRenderParentCommands();
- return;
- }
-
if (AsyncPanZoomEnabled()) {
mScrollData.SetFocusTarget(mFocusTarget);
mFocusTarget = FocusTarget();
if (mIsFirstPaint) {
mScrollData.SetIsFirstPaint();
mIsFirstPaint = false;
}
--- a/gfx/layers/wr/WebRenderLayerManager.h
+++ b/gfx/layers/wr/WebRenderLayerManager.h
@@ -130,18 +130,16 @@ public:
// going, and when they end we discard them and remove them from the active
// list.
void AddActiveCompositorAnimationId(uint64_t aId);
void AddCompositorAnimationsIdForDiscard(uint64_t aId);
void DiscardCompositorAnimations();
WebRenderBridgeChild* WrBridge() const { return mWrChild; }
- void SetTransactionIncomplete() { mTransactionIncomplete = true; }
-
// See equivalent function in ClientLayerManager
void LogTestDataForCurrentPaint(FrameMetrics::ViewID aScrollId,
const std::string& aKey,
const std::string& aValue) {
MOZ_ASSERT(gfxPrefs::APZTestLoggingEnabled(), "don't call me");
mApzTestData.LogTestDataForPaint(mPaintSequenceNumber, aScrollId, aKey, aValue);
}
// See equivalent function in ClientLayerManager
@@ -188,18 +186,16 @@ private:
uint64_t mLatestTransactionId;
nsTArray<DidCompositeObserver*> mDidCompositeObservers;
// This holds the scroll data that we need to send to the compositor for
// APZ to do it's job
WebRenderScrollData mScrollData;
- bool mTransactionIncomplete;
-
bool mNeedsComposite;
bool mIsFirstPaint;
FocusTarget mFocusTarget;
// When we're doing a transaction in order to draw to a non-default
// target, the layers transaction is only performed in order to send
// a PLayers:Update. We save the original non-default target to
// mTarget, and then perform the transaction. After the transaction ends,