mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset ba934ac9fc6b (bug 862448) for B2G reftest crashes.
CLOSED TREE
This commit is contained in:
parent
677c5b5128
commit
115fd0d0a5
@ -311,20 +311,26 @@ SurfaceStream_TripleBuffer_Copy::SwapProducer(SurfaceFactory* factory,
|
||||
|
||||
RecycleScraps(factory);
|
||||
if (mProducer) {
|
||||
if (mStaging) {
|
||||
// We'll re-use this for a new mProducer later on if
|
||||
// the size remains the same
|
||||
if (mStaging && mStaging->Type() != factory->Type())
|
||||
Recycle(factory, mStaging);
|
||||
}
|
||||
|
||||
Move(mProducer, mStaging);
|
||||
if (!mStaging)
|
||||
New(factory, mProducer->Size(), mStaging);
|
||||
|
||||
if (!mStaging)
|
||||
return nullptr;
|
||||
|
||||
SharedSurface::Copy(mProducer, mStaging, factory);
|
||||
// Fence now, before we start (maybe) juggling Prod around.
|
||||
mStaging->Fence();
|
||||
|
||||
New(factory, size, mProducer);
|
||||
|
||||
if (mStaging->Size() == mProducer->Size())
|
||||
SharedSurface::Copy(mStaging, mProducer, factory);
|
||||
} else {
|
||||
if (mProducer->Size() != size)
|
||||
Recycle(factory, mProducer);
|
||||
}
|
||||
|
||||
// The old Prod (if there every was one) was invalid,
|
||||
// so we need a new one.
|
||||
if (!mProducer) {
|
||||
New(factory, size, mProducer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user