# HG changeset patch # User Kartikaya Gupta # Date 1518127905 18000 # Node ID 64480155967fa3334d42cc17b03e6b9b5ba66e8e # Parent b166f812f4ac289a4aa9cf2ddf4a962a06a50d13 Bug 1436832 - Avoid unnecessary casting. r=sotaro MozReview-Commit-ID: 2MoJv1Wg8g4 diff --git a/gfx/layers/wr/WebRenderBridgeParent.cpp b/gfx/layers/wr/WebRenderBridgeParent.cpp --- a/gfx/layers/wr/WebRenderBridgeParent.cpp +++ b/gfx/layers/wr/WebRenderBridgeParent.cpp @@ -1292,19 +1292,17 @@ WebRenderBridgeParent::FlushPendingTrans return id; } uint64_t WebRenderBridgeParent::FlushTransactionIdsForEpoch(const wr::Epoch& aEpoch, const TimeStamp& aEndTime) { uint64_t id = 0; while (!mPendingTransactionIds.empty()) { - int64_t diff = - static_cast(aEpoch.mHandle) - static_cast(mPendingTransactionIds.front().mEpoch.mHandle); - if (diff < 0) { + if (aEpoch.mHandle < mPendingTransactionIds.front().mEpoch.mHandle) { break; } #if defined(ENABLE_FRAME_LATENCY_LOG) if (mPendingTransactionIds.front().mTxnStartTime) { uint32_t latencyMs = round((aEndTime - mPendingTransactionIds.front().mTxnStartTime).ToMilliseconds()); printf_stderr("From transaction start to end of generate frame latencyMs %d this %p\n", latencyMs, this); } if (mPendingTransactionIds.front().mFwdTime) {