зеркало из https://github.com/mozilla/gecko-dev.git
Bug 854421 - Part 9: Send DidComposite during ClientLayerManager destruction. r=roc
This commit is contained in:
Родитель
c9c9b9cb80
Коммит
58a93da0d3
|
@ -40,6 +40,7 @@ using namespace mozilla::gfx;
|
|||
ClientLayerManager::ClientLayerManager(nsIWidget* aWidget)
|
||||
: mPhase(PHASE_NONE)
|
||||
, mWidget(aWidget)
|
||||
, mLatestTransactionId(0)
|
||||
, mTargetRotation(ROTATION_0)
|
||||
, mRepeatTransaction(false)
|
||||
, mIsRepeatTransaction(false)
|
||||
|
@ -54,6 +55,9 @@ ClientLayerManager::ClientLayerManager(nsIWidget* aWidget)
|
|||
|
||||
ClientLayerManager::~ClientLayerManager()
|
||||
{
|
||||
if (mTransactionIdAllocator) {
|
||||
DidComposite(mLatestTransactionId);
|
||||
}
|
||||
ClearCachedResources();
|
||||
// Stop receiveing AsyncParentMessage at Forwarder.
|
||||
// After the call, the message is directly handled by LayerTransactionChild.
|
||||
|
@ -422,13 +426,13 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
|
|||
{
|
||||
mPhase = PHASE_FORWARD;
|
||||
|
||||
uint64_t pendingTransactionId = mTransactionIdAllocator->GetTransactionId();
|
||||
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId();
|
||||
|
||||
// forward this transaction's changeset to our LayerManagerComposite
|
||||
bool sent;
|
||||
AutoInfallibleTArray<EditReply, 10> replies;
|
||||
if (HasShadowManager() && mForwarder->EndTransaction(&replies, mRegionToClear,
|
||||
pendingTransactionId, aScheduleComposite, mPaintSequenceNumber, &sent)) {
|
||||
mLatestTransactionId, aScheduleComposite, mPaintSequenceNumber, &sent)) {
|
||||
for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {
|
||||
const EditReply& reply = replies[i];
|
||||
|
||||
|
@ -486,7 +490,7 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
|
|||
// Clear the transaction id so that it doesn't get returned
|
||||
// unless we forwarded to somewhere that doesn't actually
|
||||
// have a compositor.
|
||||
mTransactionIdAllocator->RevokeTransactionId(pendingTransactionId);
|
||||
mTransactionIdAllocator->RevokeTransactionId(mLatestTransactionId);
|
||||
}
|
||||
} else if (HasShadowManager()) {
|
||||
NS_WARNING("failed to forward Layers transaction");
|
||||
|
|
|
@ -257,6 +257,7 @@ private:
|
|||
nsRefPtr<gfxContext> mShadowTarget;
|
||||
|
||||
nsRefPtr<TransactionIdAllocator> mTransactionIdAllocator;
|
||||
uint64_t mLatestTransactionId;
|
||||
|
||||
// Sometimes we draw to targets that don't natively support
|
||||
// landscape/portrait orientation. When we need to implement that
|
||||
|
|
|
@ -1385,8 +1385,9 @@ void
|
|||
nsRefreshDriver::FinishedWaitingForTransaction()
|
||||
{
|
||||
mWaitingForTransaction = false;
|
||||
if (mSkippedPaint && (ObserverCount() || ImageRequestCount())) {
|
||||
MOZ_ASSERT(!IsInRefresh());
|
||||
if (mSkippedPaint &&
|
||||
!IsInRefresh() &&
|
||||
(ObserverCount() || ImageRequestCount())) {
|
||||
DoRefresh();
|
||||
}
|
||||
mSkippedPaint = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче