Fix GrRenderTargetContext::drawArc's abandoned Context handling
authorRobert Phillips <robertphillips@google.com>
Fri, 10 Feb 2017 14:31:01 +0000 (09:31 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 10 Feb 2017 15:11:27 +0000 (15:11 +0000)
This was causing a crash in --preAbandonGpuContext mode

Change-Id: Ifbd8eea05402d4db2f06c48f31aa53bce09d0c07
Reviewed-on: https://skia-review.googlesource.com/8310
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

src/gpu/GrRenderTargetContext.cpp

index 918d8d4..c2197e3 100644 (file)
@@ -1255,6 +1255,13 @@ void GrRenderTargetContext::drawArc(const GrClip& clip,
                                     SkScalar sweepAngle,
                                     bool useCenter,
                                     const GrStyle& style) {
+    ASSERT_SINGLE_OWNER
+    RETURN_IF_ABANDONED
+    SkDEBUGCODE(this->validate();)
+    GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::drawArc");
+
+    AutoCheckFlush acf(this->drawingManager());
+
     GrAAType aaType = this->decideAAType(aa);
     if (GrAAType::kCoverage == aaType) {
         const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();