Skip to content

Commit

Permalink
Backed out changeset 0c3400afa45f (bug 1425257) for failing R-e10s in…
Browse files Browse the repository at this point in the history
… slave/test/build/tests/reftest/tests/image/test/reftest/pngsuite-basic-n/basn0g01.png on a CLOSED TREE
  • Loading branch information
elizabal committed Feb 6, 2018
1 parent 2768bda commit 9c4eaff
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
3 changes: 0 additions & 3 deletions gfx/2d/2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -1755,9 +1755,6 @@ class GFX2D_API Factory
// This guards access to the singleton devices above, as well as the
// singleton devices in DrawTargetD2D1.
static StaticMutex mDeviceLock;
// This synchronizes access between different D2D drawtargets and their
// implied dependency graph.
static StaticMutex mDTDependencyLock;

friend class DrawTargetD2D1;
#endif
Expand Down
11 changes: 1 addition & 10 deletions gfx/2d/DrawTargetD2D1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ DrawTargetD2D1::~DrawTargetD2D1()
mDC->EndDraw();
}

StaticMutexAutoLock lock(Factory::mDTDependencyLock);
// Targets depending on us can break that dependency, since we're obviously not going to
// be modified in the future.
for (auto iter = mDependentTargets.begin();
Expand Down Expand Up @@ -172,8 +171,7 @@ DrawTargetD2D1::Flush()
mDC->Flush();
}
}

StaticMutexAutoLock lock(Factory::mDTDependencyLock);

// We no longer depend on any target.
for (TargetSet::iterator iter = mDependingOnTargets.begin();
iter != mDependingOnTargets.end(); iter++) {
Expand Down Expand Up @@ -1287,8 +1285,6 @@ DrawTargetD2D1::MarkChanged()
MOZ_ASSERT(!mSnapshot);
}
}

StaticMutexAutoLock lock(Factory::mDTDependencyLock);
if (mDependentTargets.size()) {
// Copy mDependentTargets since the Flush()es below will modify it.
TargetSet tmpTargets = mDependentTargets;
Expand Down Expand Up @@ -1468,11 +1464,6 @@ DrawTargetD2D1::FinalizeDrawing(CompositionOp aOp, const Pattern &aPattern)
void
DrawTargetD2D1::AddDependencyOnSource(SourceSurfaceD2D1* aSource)
{
StaticMutexAutoLock lock(Factory::mDTDependencyLock);

// We grab the SnapshotLock as well, this guaranteeds aSource->mDrawTarget
// cannot be cleared in between the if statement and the dereference.
MutexAutoLock snapshotLock(*aSource->mSnapshotLock);
if (aSource->mDrawTarget && !mDependingOnTargets.count(aSource->mDrawTarget)) {
aSource->mDrawTarget->mDependentTargets.insert(this);
mDependingOnTargets.insert(aSource->mDrawTarget);
Expand Down
1 change: 0 additions & 1 deletion gfx/2d/Factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ StaticRefPtr<ID2D1Device> Factory::mD2D1Device;
StaticRefPtr<IDWriteFactory> Factory::mDWriteFactory;
bool Factory::mDWriteFactoryInitialized = false;
StaticMutex Factory::mDeviceLock;
StaticMutex Factory::mDTDependencyLock;
#endif

DrawEventRecorder *Factory::mRecorder;
Expand Down

0 comments on commit 9c4eaff

Please sign in to comment.