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
This commit is contained in:
bsalomon 2015-09-09 18:57:49 -07:00 committed by Commit bot
parent eb662bc407
commit 32ab260ee1
2 changed files with 1 additions and 7 deletions

View File

@ -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 @@ private:
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;

View File

@ -460,7 +460,7 @@ bool GrContext::readSurfacePixels(GrSurface* src,
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(),