Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index eb8455adbbae89355d4521fbbbeb140ede4643f7..afe396d6536f8c02c3a08f83923f559846213075 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -1347,7 +1347,7 @@ bool GrContext::writeTexturePixels(GrTexture* texture, |
} |
} |
- if (!(kDontFlush_PixelOpsFlag & flags)) { |
+ if (!(kDontFlush_PixelOpsFlag & flags) && texture->hasPendingIO()) { |
this->flush(); |
} |
@@ -1418,7 +1418,7 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target, |
} |
} |
- if (!(kDontFlush_PixelOpsFlag & flags)) { |
+ if (!(kDontFlush_PixelOpsFlag & flags) && target->hasPendingWrite()) { |
this->flush(); |
} |