diff options
author | bsalomon <bsalomon@google.com> | 2015-09-09 18:05:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-09 18:05:03 -0700 |
commit | eb662bc407cec0585a821946fef123102cae64db (patch) | |
tree | 953f4af97992459fb03bc237f99c1d5dbd7cfc96 /src/gpu | |
parent | cb1ccfd2054d90c90772cd852c2a2df1ce5fb9eb (diff) |
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
Review URL: https://codereview.chromium.org/1329313002
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 4e8060b187..c6fe6c23d3 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -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(), |