Make GrTextureStripAtlas flush pending IO on newly acquired texture
GrTextureStripAtlas uses its own lock counts to protect against
overwriting its own earlier writes, but that doesn't protect against
IO that was pending when a texture was first acquired.
BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262233002
Review-Url: https://codereview.chromium.org/2262233002
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 06c27ea..5f4e663 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -594,6 +594,14 @@
}
}
+void GrContext::flushSurfaceIO(GrSurface* surface) {
+ ASSERT_SINGLE_OWNER
+ RETURN_IF_ABANDONED
+ if (surface->surfacePriv().hasPendingIO()) {
+ this->flush();
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
int GrContext::getRecommendedSampleCount(GrPixelConfig config,
SkScalar dpi) const {