mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 056cc43a50b6 (bug 854421)
This commit is contained in:
parent
69e78422fc
commit
ddc1b85e3d
@ -1,52 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef GFX_TRANSACTION_ID_ALLOCATOR_H
|
||||
#define GFX_TRANSACTION_ID_ALLOCATOR_H
|
||||
|
||||
#include "nsISupportsImpl.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
class TransactionIdAllocator {
|
||||
public:
|
||||
NS_INLINE_DECL_REFCOUNTING(TransactionIdAllocator)
|
||||
|
||||
virtual ~TransactionIdAllocator() {}
|
||||
|
||||
/**
|
||||
* Allocate a unique id number for the current refresh tick, can
|
||||
* only be called while IsInRefresh().
|
||||
*
|
||||
* If too many id's are allocated without being returned then
|
||||
* the refresh driver will suspend until they catch up.
|
||||
*/
|
||||
virtual uint64_t GetTransactionId() = 0;
|
||||
|
||||
/**
|
||||
* Notify that all work (including asynchronous composites)
|
||||
* for a given transaction id has been completed.
|
||||
*
|
||||
* If the refresh driver has been suspended because
|
||||
* of having too many outstanding id's, then this may
|
||||
* resume it.
|
||||
*/
|
||||
virtual void NotifyTransactionCompleted(uint64_t aTransactionId) = 0;
|
||||
|
||||
/**
|
||||
* Revoke a transaction id that isn't needed to track
|
||||
* completion of asynchronous work. This is similar
|
||||
* to NotifyTransactionCompleted except avoids
|
||||
* return ordering issues.
|
||||
*/
|
||||
virtual void RevokeTransactionId(uint64_t aTransactionId) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* GFX_TRANSACTION_ID_ALLOCATOR_H */
|
@ -163,7 +163,6 @@ EXPORTS.mozilla.layers += [
|
||||
'opengl/TextureClientOGL.h',
|
||||
'opengl/TextureHostOGL.h',
|
||||
'RenderTrace.h',
|
||||
'TransactionIdAllocator.h',
|
||||
'YCbCrImageDataSerializer.h',
|
||||
]
|
||||
|
||||
|
@ -1011,6 +1011,12 @@ nsRefreshDriver::ArrayFor(mozFlushType aFlushType)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* nsISupports implementation
|
||||
*/
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsRefreshDriver, nsISupports)
|
||||
|
||||
/*
|
||||
* nsITimerCallback implementation
|
||||
*/
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/layers/TransactionIdAllocator.h"
|
||||
|
||||
class nsPresContext;
|
||||
class nsIPresShell;
|
||||
@ -63,7 +62,7 @@ public:
|
||||
virtual void DidRefresh() = 0;
|
||||
};
|
||||
|
||||
class nsRefreshDriver MOZ_FINAL : public mozilla::layers::TransactionIdAllocator {
|
||||
class nsRefreshDriver MOZ_FINAL : public nsISupports {
|
||||
public:
|
||||
nsRefreshDriver(nsPresContext *aPresContext);
|
||||
~nsRefreshDriver();
|
||||
@ -71,6 +70,9 @@ public:
|
||||
static void InitializeStatics();
|
||||
static void Shutdown();
|
||||
|
||||
// nsISupports implementation
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Methods for testing, exposed via nsIDOMWindowUtils. See
|
||||
* nsIDOMWindowUtils.advanceTimeAndRefresh for description.
|
||||
@ -270,10 +272,32 @@ public:
|
||||
|
||||
bool IsInRefresh() { return mInRefresh; }
|
||||
|
||||
// mozilla::layers::TransactionIdAllocator
|
||||
virtual uint64_t GetTransactionId() MOZ_OVERRIDE;
|
||||
void NotifyTransactionCompleted(uint64_t aTransactionId) MOZ_OVERRIDE;
|
||||
void RevokeTransactionId(uint64_t aTransactionId) MOZ_OVERRIDE;
|
||||
/**
|
||||
* Allocate a unique id number for the current refresh tick, can
|
||||
* only be called while IsInRefresh().
|
||||
*
|
||||
* If too many id's are allocated without being returned then
|
||||
* the refresh driver will suspend until they catch up.
|
||||
*/
|
||||
uint64_t GetTransactionId();
|
||||
|
||||
/**
|
||||
* Notify that all work (including asynchronous composites)
|
||||
* for a given transaction id has been completed.
|
||||
*
|
||||
* If the refresh driver has been suspended because
|
||||
* of having too many outstanding id's, then this may
|
||||
* resume it.
|
||||
*/
|
||||
void NotifyTransactionCompleted(uint64_t aTransactionId);
|
||||
|
||||
/**
|
||||
* Revoke a transaction id that isn't needed to track
|
||||
* completion of asynchronous work. This is similar
|
||||
* to NotifyTransactionCompleted except avoids
|
||||
* return ordering issues.
|
||||
*/
|
||||
void RevokeTransactionId(uint64_t aTransactionId);
|
||||
|
||||
private:
|
||||
typedef nsTObserverArray<nsARefreshObserver*> ObserverArray;
|
||||
|
Loading…
Reference in New Issue
Block a user