Revert of Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessin… (patchset #1 id:1 of https://codereview.chromium.org/1329313002/ )
Reason for revert:
breaking the bots
Original issue's description:
> Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
>
> BUG=chromium:524717
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/eb662bc407cec0585a821946fef123102cae64db
TBR=reed@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:524717
Review URL: https://codereview.chromium.org/1334603002
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index dcff306..7f1e410 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -15,7 +15,6 @@
#include "GrRenderTarget.h"
#include "GrTextureProvider.h"
#include "SkMatrix.h"
-#include "SkMutex.h"
#include "SkPathEffect.h"
#include "SkTypes.h"
@@ -381,11 +380,6 @@
bool fDidTestPMConversions;
int fPMToUPMConversion;
int fUPMToPMConversion;
- // The sw backend may call GrContext::readSurfacePixels on multiple threads
- // We may transfer the responsibilty for using a mutex to the sw backend
- // when there are fewer code paths that lead to a readSurfacePixels call
- // from the sw backend.
- SkMutex fReadPixelsMutex;
struct CleanUpData {
PFCleanUpFunc fFunc;
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index c6fe6c2..4e8060b 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -460,7 +460,7 @@
RETURN_FALSE_IF_ABANDONED
ASSERT_OWNED_RESOURCE(src);
SkASSERT(src);
- SkAutoMutexAcquire ama(fReadPixelsMutex);
+
// Adjust the params so that if we wind up using an intermediate surface we've already done
// all the trimming and the temporary can be the min size required.
if (!GrSurfacePriv::AdjustReadPixelParams(src->width(), src->height(),