mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 937878 - Don't let too many ContentHostIncremental updates queue up. r=nrc
This commit is contained in:
parent
c7cf0b5f09
commit
6929a01f36
@ -495,6 +495,7 @@ ContentHostIncremental::EnsureDeprecatedTextureHostIncremental(ISurfaceAllocator
|
||||
mUpdateList.AppendElement(new TextureCreationRequest(aTextureInfo,
|
||||
aBufferRect));
|
||||
mDeAllocator = aAllocator;
|
||||
FlushUpdateQueue();
|
||||
}
|
||||
|
||||
void
|
||||
@ -510,6 +511,20 @@ ContentHostIncremental::UpdateIncremental(TextureIdentifier aTextureId,
|
||||
aUpdated,
|
||||
aBufferRect,
|
||||
aBufferRotation));
|
||||
FlushUpdateQueue();
|
||||
}
|
||||
|
||||
void
|
||||
ContentHostIncremental::FlushUpdateQueue()
|
||||
{
|
||||
// If we're not compositing for some reason (the window being minimized
|
||||
// is one example), then we never process these updates and it can consume
|
||||
// huge amounts of memory. Instead we forcibly process the updates (during the
|
||||
// transaction) if the list gets too long.
|
||||
static const uint32_t kMaxUpdateCount = 6;
|
||||
if (mUpdateList.Length() >= kMaxUpdateCount) {
|
||||
ProcessTextureUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -296,6 +296,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
void FlushUpdateQueue();
|
||||
void ProcessTextureUpdates();
|
||||
|
||||
class Request
|
||||
|
Loading…
Reference in New Issue
Block a user