GrContext::copyTexture->GrContext::copySurface.

Add a flush writes pixel ops flag.

Add an explicit flush writes for GrSurface.

BUG=skia:2977

Review URL: https://codereview.chromium.org/622663002
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index 37fd73f..d067f07 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -48,6 +48,12 @@
     return true;
 }
 
+void GrSurface::flushWrites() {
+    if (!this->wasDestroyed()) {
+        this->getContext()->flushSurfaceWrites(this);
+    }
+}
+
 bool GrSurface::hasPendingRead() const {
     const GrTexture* thisTex = this->asTexture();
     if (thisTex && thisTex->internalHasPendingRead()) {